Skip to content

FSTAB failing to mount on boot due to running before the network connection is established #914

@synthosomatic

Description

@synthosomatic

FSTAB failing to mount on boot due to running before the network connection is established -

As posted here, two more options should be added to your automount instructions so that ocamlfuse only mounts them when they're actually accessed.

"The current thinking is to modify your fstab declaration by adding two options to your list: noauto,x-systemd.automount:

//192.168.xx.xx/Media /mnt/Media cifs credentials=/home/xxxxx/.smbcredentials1,uid=xxxxx,noauto,x-systemd.automount 0 0

Then make systemd happy:

sudo systemctl daemon-reload
sudo systemctl restart remote-fs.target

noauto == makes it so it will not mount automatically at boot
x-systemd.automount == makes it so it will mount on demand

This may seem counterintuitive since you are telling it to not mount automatically but the way this works is it will mount only when the mount point is accessed. That can happen when you access it through Nautilus, or if you access it through another application, or you access it through a script, ....

The problem is fstab is being accessed way too early in the boot process so the network stack isn't fully operational and the cifs mount fails. After you log in everything should be operational so the automount now works and is why issuing a "mount -a" works."

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions