Skip to content

NanoPi R5S - Samba

NanoPi R5S
5 2 508
  • Ich hatte ja schon erwähnt, das ich von NFS auf Samba wechseln musste, weil der NFS Server unterirdisch schlechte Transferraten hatte. Somit musste ich mich dann so ziemlich das erste Mal in meinem Leben mit einem Samba Server auseinandersetzen.

    8764bbf3-86a1-4777-bd97-2258b14bce5e-grafik.png

    Nach einigem Ausprobieren hatte ich es soweit, das ich zwei Freigaben hatte, die ich problemlos mit dem Dateimanager von Manjaro erreichen konnte. Ich konnte auch problemlos schreiben usw.

    Aber, mit diesen Dateipfaden aka

    smb://192.168.3.1/NAS

    kann ich nicht arbeiten. Meine vorhandenen Scripte möchten was ordentliches haben 😉 Also machte ich mich daran, diese Freigaben zu mounten.

    Also in /etc/fstab stundenlang Einträge ausprobiert. Zwischendurch auch immer versucht per Hand über die Konsole zu mounten.

    Ich bekam, egal was ich machte, immer diesen Fehler.

    CIFS: VFS: cifs_mount failed w/return code = -22
    

    Sehr aussagekräftig, weil ich dazu im Netz auch nichts vernünftiges fand. Also kurze Pause und nachdenken. Was, wenn es irgendwas mit dem Kernel zu schaffen hätte?

    Da kam mir die Idee, es mal auf meinem Linux Mint Cinnamon Notebook zu probieren und zack, schon der erste Mount-Versuch funktionierte.

    🤔

    Das Notebook benutzte einen 5.15er Kernel.

    Also, startete ich meinen Haupt-PC neu und wechselte von dem aktuellen Kernel

    Linux frank-ms7c37 5.18.12-3-MANJARO #1 SMP PREEMPT_DYNAMIC Sun Jul 17 14:33:15 UTC 2022 x86_64 GNU/Linux
    

    auf einen 5.15er Danach schnell ein Mount-Versuch und es ging! Ok, es muss irgendwas mit dem verwendeten Kernel zu schaffen haben. Den alten zu benutzen kam für mich nicht in Frage, also machte ich mich im Netz auf die Suche und stolperte über diesen Beitrag.

    Die Kernel-Version passte nicht ganz, aber egal, mal aufmerksam lesen. Man empfahl einen Beitrag als Lösung

    Wieder aufmerksam lesen... 🙂

    Lösung

    I was able to reproduce it to older Samba server (4.12.5) and could
    workaround the Samba server bug by using mount option "compress" on
    the client (which won't do anything different since it is not
    supported but interestingly it avoids the problem by adding another
    context at the end).

    Ok, man sollte also eine Mountoption compress benutzen. Also ausprobieren. Mittlerweile war der Rechner wieder auf 5.18.

    Der Mount-Befehl

    //192.168.3.1/NAS      /mnt/NAS               cifs    compress,credentials=/root/.smbcredentials,uid=1000,gid=1000 0 0
    

    funktionierte sofort!

    Die Dateiberechtigungen auf dem NanoPi R5S

    root@FriendlyWrt:~# ls -lha /mnt/sda1
    total 28K
    drwxrwxrwt  4 frankm frankm 4.0K Jul 22 10:03 .
    drwxr-xr-x  1 root   root   4.0K Jul 23 22:39 ..
    drwx------  2 frankm frankm  16K Jul 20 12:22 lost+found
    drwxr-xr-x 29 frankm frankm 4.0K Jul 24 08:08 samba
    

    Für Samba habe ich einen Linux User frankm angelegt.

    Fazit

    Es hat gedauert und zwar richtig lange um dieses Problem zu lösen. Und eine Bitte an die Coder da draußen, Error -22 hilft niemanden!!

    Interessanterweise findet man die Option compress in der Anleitung gar nicht!?

    Ok, lassen wir es und machen einen Haken dran. Die Samba Mounts funktionieren ja jetzt 🤓

  • Noch eine kurze Anmerkung, der eingesetzte Samba Server auf dem NanoPi R5S ist von März 2021.

    Kennt sich einer mit OpenWrt aus? Wird das mit 22.03 aktualisiert?

  • hab da auch nur die 4.14.12 probiert nur bei mir deutlich langsamer als nfs

    hier mal ein speed test was so netto auf der Festplatte auf dem R5S ankommt mit SMB rund 60-70MB/s

    smb.jpeg

    und das ganz noch mal mit NFS rund 130-140MB/s

    nfs.jpeg

    root@FriendlyWrt:~# cat /etc/exports
    /mnt/nvme0n1p1               192.168.0.10(rw,insecure,async,no_root_squash,subtree_check,fsid=0)
    /mnt/nvme0n1p1/ARCHiV        192.168.0.10(rw,insecure,async,no_root_squash,subtree_check)
    

    auf dem Desktop Rechner dann einfach mounten oder in fstab konfigurieren

    sudo mount -t nfs -o nfsvers=4,soft,rw 192.168.0.3:/ /mnt/NAS/NFS    
    

    bei den werten zu beachten wäre ich muss da auf die alte Verkabellung zurück greifen mit CAT5 Kabel ab bei 2,5Gbit Fehler/Aussetzer auf der Leitung

  • hab da auch nur die 4.14.12 probiert nur bei mir deutlich langsamer als nfs

    hier mal ein speed test was so netto auf der Festplatte auf dem R5S ankommt mit SMB rund 60-70MB/s

    smb.jpeg

    und das ganz noch mal mit NFS rund 130-140MB/s

    nfs.jpeg

    root@FriendlyWrt:~# cat /etc/exports
    /mnt/nvme0n1p1               192.168.0.10(rw,insecure,async,no_root_squash,subtree_check,fsid=0)
    /mnt/nvme0n1p1/ARCHiV        192.168.0.10(rw,insecure,async,no_root_squash,subtree_check)
    

    auf dem Desktop Rechner dann einfach mounten oder in fstab konfigurieren

    sudo mount -t nfs -o nfsvers=4,soft,rw 192.168.0.3:/ /mnt/NAS/NFS    
    

    bei den werten zu beachten wäre ich muss da auf die alte Verkabellung zurück greifen mit CAT5 Kabel ab bei 2,5Gbit Fehler/Aussetzer auf der Leitung

    @Dude Danke, ich werde das nochmal prüfen.

  • Test zu dem NFS Mount (240GB USB SSD an USB-Port)

    [frank-ms7c37 nfs]# dd if=/dev/zero of=sd.img bs=1M count=2048 oflag=direct,nonblock
    2048+0 Datensätze ein
    2048+0 Datensätze aus
    2147483648 Bytes (2,1 GB, 2,0 GiB) kopiert, 20,0851 s, 107 MB/s
    

    Test zum NAS Mount (Samba) (2TB 2,5Zoll HDD am USB-Port)

    [frank-ms7c37 NAS]# dd if=/dev/zero of=sd.img bs=1M count=2048 oflag=direct,nonblock
    2048+0 Datensätze ein
    2048+0 Datensätze aus
    2147483648 Bytes (2,1 GB, 2,0 GiB) kopiert, 21,4538 s, 100 MB/s
    

    Das für den NAS Mount (Samba) sollte die maximal Schreibgrenze der Festplatte sein. Mehr dürfte da nicht gehen. Das andere könnte an den Adaptern liegen, die ich dafür benutze.

    Bei mir ist NFS hier aktuell nicht viel schneller, oder ich bin zu doof dafür.

  • FrankMF FrankM hat am auf dieses Thema verwiesen
  • A Andy hat am auf dieses Thema verwiesen
  • FrankMF FrankM hat am auf dieses Thema verwiesen
  • Raspberry Pi5 - Netzteil

    RaspberryPi raspberrypi linux
    1
    0 Stimmen
    1 Beiträge
    524 Aufrufe
    Niemand hat geantwortet
  • FriendlyWrt - Upgrademöglichkeit

    FriendlyELEC nanopir5s friendlywrt
    2
    0 Stimmen
    2 Beiträge
    511 Aufrufe
    FrankMF
    Das Image auf meinem NanoPi R5S ist OpenWrt 22.03.0-rc6 r19590-042d558536 / LuCI branch git-22.213.58438-a9735e0 Aktuelles FriendlyWrt wäre OpenWrt 22.03.3 r20028-....... Aktuell seit 09.01.2023 ist OpenWrt 22.03.3 Da ich keine Probleme habe und alles zu meiner Zufriedenheit läuft, kann ich locker noch bis zum nächsten Release warten und hoffe immer noch, das der R5S endlich mal im OpenWrt landet.....
  • ZFS - Wichtige Befehle

    Linux zfs linux
    3
    0 Stimmen
    3 Beiträge
    1k Aufrufe
    FrankMF
    Heute mal drüber gestolpert, das es auch so was geben kann. root@pve2:~# zpool status pool: pool_NAS state: ONLINE status: Some supported and requested features are not enabled on the pool. The pool can still be used, but some features are unavailable. action: Enable all features using 'zpool upgrade'. Once this is done, the pool may no longer be accessible by software that does not support the features. See zpool-features(7) for details. scan: scrub repaired 0B in 00:20:50 with 0 errors on Sun Apr 13 00:44:51 2025 config: NAME STATE READ WRITE CKSUM pool_NAS ONLINE 0 0 0 mirror-0 ONLINE 0 0 0 ata-WDC_WDS100T1R0A-68A4W0_230520800733 ONLINE 0 0 0 ata-WDC_WDS100T1R0A-68A4W0_230520801376 ONLINE 0 0 0 errors: No known data errors Was machen? Als erstes mal ein Backup angestoßen. Danach root@pve2:~# zpool get all pool_NAS | grep feature pool_NAS feature@async_destroy enabled local pool_NAS feature@empty_bpobj active local pool_NAS feature@lz4_compress active local pool_NAS feature@multi_vdev_crash_dump enabled local pool_NAS feature@spacemap_histogram active local pool_NAS feature@enabled_txg active local pool_NAS feature@hole_birth active local pool_NAS feature@extensible_dataset active local pool_NAS feature@embedded_data active local pool_NAS feature@bookmarks enabled local pool_NAS feature@filesystem_limits enabled local pool_NAS feature@large_blocks enabled local pool_NAS feature@large_dnode enabled local pool_NAS feature@sha512 enabled local pool_NAS feature@skein enabled local pool_NAS feature@edonr enabled local pool_NAS feature@userobj_accounting active local pool_NAS feature@encryption enabled local pool_NAS feature@project_quota active local pool_NAS feature@device_removal enabled local pool_NAS feature@obsolete_counts enabled local pool_NAS feature@zpool_checkpoint enabled local pool_NAS feature@spacemap_v2 active local pool_NAS feature@allocation_classes enabled local pool_NAS feature@resilver_defer enabled local pool_NAS feature@bookmark_v2 enabled local pool_NAS feature@redaction_bookmarks enabled local pool_NAS feature@redacted_datasets enabled local pool_NAS feature@bookmark_written enabled local pool_NAS feature@log_spacemap active local pool_NAS feature@livelist enabled local pool_NAS feature@device_rebuild enabled local pool_NAS feature@zstd_compress enabled local pool_NAS feature@draid enabled local pool_NAS feature@zilsaxattr disabled local pool_NAS feature@head_errlog disabled local pool_NAS feature@blake3 disabled local pool_NAS feature@block_cloning disabled local pool_NAS feature@vdev_zaps_v2 disabled local Das kommt von neuen Funktionen, die zu ZFS hinzugefügt wurden und bei Erstellung des Pools nicht vorhanden waren. Dann upgraden wir mal root@pve2:~# zpool upgrade pool_NAS This system supports ZFS pool feature flags. Enabled the following features on 'pool_NAS': zilsaxattr head_errlog blake3 block_cloning vdev_zaps_v2 Kontrolle root@pve2:~# zpool status pool: pool_NAS state: ONLINE scan: scrub repaired 0B in 00:20:50 with 0 errors on Sun Apr 13 00:44:51 2025 config: NAME STATE READ WRITE CKSUM pool_NAS ONLINE 0 0 0 mirror-0 ONLINE 0 0 0 ata-WDC_WDS100T1R0A-68A4W0_230520800733 ONLINE 0 0 0 ata-WDC_WDS100T1R0A-68A4W0_230520801376 ONLINE 0 0 0 errors: No known data errors Features kontrollieren root@pve2:~# zpool get all pool_NAS | grep feature pool_NAS feature@async_destroy enabled local pool_NAS feature@empty_bpobj active local pool_NAS feature@lz4_compress active local pool_NAS feature@multi_vdev_crash_dump enabled local pool_NAS feature@spacemap_histogram active local pool_NAS feature@enabled_txg active local pool_NAS feature@hole_birth active local pool_NAS feature@extensible_dataset active local pool_NAS feature@embedded_data active local pool_NAS feature@bookmarks enabled local pool_NAS feature@filesystem_limits enabled local pool_NAS feature@large_blocks enabled local pool_NAS feature@large_dnode enabled local pool_NAS feature@sha512 enabled local pool_NAS feature@skein enabled local pool_NAS feature@edonr enabled local pool_NAS feature@userobj_accounting active local pool_NAS feature@encryption enabled local pool_NAS feature@project_quota active local pool_NAS feature@device_removal enabled local pool_NAS feature@obsolete_counts enabled local pool_NAS feature@zpool_checkpoint enabled local pool_NAS feature@spacemap_v2 active local pool_NAS feature@allocation_classes enabled local pool_NAS feature@resilver_defer enabled local pool_NAS feature@bookmark_v2 enabled local pool_NAS feature@redaction_bookmarks enabled local pool_NAS feature@redacted_datasets enabled local pool_NAS feature@bookmark_written enabled local pool_NAS feature@log_spacemap active local pool_NAS feature@livelist enabled local pool_NAS feature@device_rebuild enabled local pool_NAS feature@zstd_compress enabled local pool_NAS feature@draid enabled local pool_NAS feature@zilsaxattr enabled local pool_NAS feature@head_errlog active local pool_NAS feature@blake3 enabled local pool_NAS feature@block_cloning enabled local pool_NAS feature@vdev_zaps_v2 enabled local So, alle neuen Features aktiviert. Jetzt kann der Pool weiterhin seine Arbeit machen.
  • Armbian Images

    Armbian armbian linux
    1
    3
    0 Stimmen
    1 Beiträge
    358 Aufrufe
    Niemand hat geantwortet
  • Kopia 0.7.x released

    Kopia kopia linux
    1
    0 Stimmen
    1 Beiträge
    249 Aufrufe
    Niemand hat geantwortet
  • FAN control OMV Auyfan 0.10.12: gitlab-ci-linux-build-184, Kernel 5.6

    Linux linux
    12
    1 Stimmen
    12 Beiträge
    1k Aufrufe
    M
    Hi, since I'm currently change my rockpro64 setup I came across this. With the kernel from ayufan you need to set PWM_CTL to /sys/devices/platform/pwm-fan/hwmon/hwmon3/pwm1 for my self compiled one I need /sys/devices/platform/pwm-fan/hwmon/hwmon0/pwm1 But I got it only working with one entry for PWM_CTL e.g. PWM_CTL = "/sys/devices/platform/pwm-fan/hwmon/hwmon0/pwm1", after that you need to start ats again sudo systemctl stop ats sudo systemctl start ats initially the fan should start immediately for a short period of time. In case it is even a different one on your kernel you can find the right one using this command. sudo find /sys -name pwm1 | grep hwmon So far I'm not sure which kernel parameter or modul changes this. Martin
  • checkmk - systemd crasht

    Verschoben checkmk checkmk linux
    1
    0 Stimmen
    1 Beiträge
    688 Aufrufe
    Niemand hat geantwortet
  • Restic - Update

    Restic linux restic
    1
    0 Stimmen
    1 Beiträge
    461 Aufrufe
    Niemand hat geantwortet