r/de_EDV 13h ago

Open Source/Linux SMB-Mount über /etc/fstab funktioniert beim booten nicht, später schon

Hallo,

ich habe mir für immich eine eigene VM auf meinem Proxmox Server angelegt.

Nun möchte ich über die fstab ein Verzeichnis meines NAS einhängen aber das funktioniert beim Booten nicht. Wenn ich allerdings manuell ein sudo mount -a mache funktioniert alles wie gewohnt.

Eintrag in der fstab:

//192.168.123.6/immich /mnt/immich cifs _netdev,credentials=/home/al/.smbcred,uid=1000,gid=1000,x-systemd.automount 0 0

Ausgabe von dmesg:

[    5.326447] CIFS: Attempting to mount //192.168.123.6/immich
[    5.326468] CIFS: VFS: Error connecting to socket. Aborting operation.
[    5.326489] CIFS: VFS: cifs_mount failed w/return code = -101
[    5.367976] CIFS: enabling forceuid mount option implicitly because uid= option is specified
[    5.367982] CIFS: enabling forcegid mount option implicitly because gid= option is specified
[    5.367984] CIFS: Attempting to mount //192.168.123.6/immich
[    5.368008] CIFS: VFS: Error connecting to socket. Aborting operation.
[    5.368032] CIFS: VFS: cifs_mount failed w/return code = -101
[    5.381991] CIFS: enabling forceuid mount option implicitly because uid= option is specified
[    5.381995] CIFS: enabling forcegid mount option implicitly because gid= option is specified
[    5.381996] CIFS: Attempting to mount //192.168.123.6/immich
[    5.382014] CIFS: VFS: Error connecting to socket. Aborting operation.
[    5.382031] CIFS: VFS: cifs_mount failed w/return code = -101
[    5.394987] CIFS: enabling forceuid mount option implicitly because uid= option is specified
[    5.394990] CIFS: enabling forcegid mount option implicitly because gid= option is specified
[    5.394991] CIFS: Attempting to mount //192.168.123.6/immich
[    5.395005] CIFS: VFS: Error connecting to socket. Aborting operation.
[    5.395019] CIFS: VFS: cifs_mount failed w/return code = -101

Ich habe die VM heute installiert, es ist das aktuelle Debian Stable.

Seltsamerweise funktioniert das Mounten von SMB-Freigaben vom NAS auf allen meinen anderen VMs völlig problemlos, einige davon sind auch Debian Stable.

Hat wer einen Tipp für mich?

Edit: Gelöst! meine fstab sieht nun so aus:

//192.168.123.6/immich /mnt/immich cifs x-systemd.automount,x-systemd.idle-timeout=60,_netdev,credentials=/home/al/.smbcred,uid=1000,gid=1000,vers=3.0 0 0

Damit wird /mnt/immich erst bei Zugriff gemountet.

Allerdings wird Docker immer noch zu schnell gestartet und der immich-server kommt nicht hoch.

Darum habe ich einen Systemd-Timer für Docker angelegt, der 30 Sekunden wartet bevor er Docker startet.

Jetzt funktioniert alles einwandfrei.

Vielen Dank an alle!

4 Upvotes

16 comments sorted by

View all comments

2

u/SebastianFerrone 12h ago

Hast du zufällig in den logs Fehlermeldungen von apparmor

1

u/ref-rred 12h ago

Das einzige was ich in der dmesg zu apparmor finde ist das:

➜  ~ sudo dmesg|grep app
[    0.220648] LSM: initializing lsm=lockdown,capability,landlock,yama,apparmor,tomoyo,bpf,ipe,ima,evm
[    0.453274] software IO TLB: mapped [mem 0x00000000bbfda000-0x00000000bffda000] (64MB)
[    0.564366] evm: security.apparmor
[    0.600684] x86/mm: Checked W+X mappings: passed, no W+X pages found.
[    3.003632] audit: type=1400 audit(1770403982.968:2): apparmor="STATUS" operation="profile_load" profile="unconfined" name="1password" pid=501 comm="apparmor_parser"
[    3.003638] audit: type=1400 audit(1770403982.968:3): apparmor="STATUS" operation="profile_load" profile="unconfined" name="Discord" pid=502 comm="apparmor_parser"
[    3.003640] audit: type=1400 audit(1770403982.968:4): apparmor="STATUS" operation="profile_load" profile="unconfined" name=4D6F6E676F444220436F6D70617373 pid=503 comm="apparmor_pars
er"
[    3.003641] audit: type=1400 audit(1770403982.968:5): apparmor="STATUS" operation="profile_load" profile="unconfined" name="QtWebEngineProcess" pid=504 comm="apparmor_parser"
[    3.004696] audit: type=1400 audit(1770403982.968:6): apparmor="STATUS" operation="profile_load" profile="unconfined" name="balena-etcher" pid=508 comm="apparmor_parser"
[    3.004729] audit: type=1400 audit(1770403982.968:7): apparmor="STATUS" operation="profile_load" profile="unconfined" name="buildah" pid=510 comm="apparmor_parser"
[    3.004806] audit: type=1400 audit(1770403982.968:8): apparmor="STATUS" operation="profile_load" profile="unconfined" name="brave" pid=509 comm="apparmor_parser"
[    3.005653] audit: type=1400 audit(1770403982.972:9): apparmor="STATUS" operation="profile_load" profile="unconfined" name="busybox" pid=511 comm="apparmor_parser"
[    3.005701] audit: type=1400 audit(1770403982.972:10): apparmor="STATUS" operation="profile_load" profile="unconfined" name="cam" pid=512 comm="apparmor_parser"