Jump to content

Within /etc/fstab the _netdev directive is being ignored so a mount to a remote server is failing during OS boot-up.


Go to solution Solved by Myron,

Recommended Posts

Posted
Armbianmonitor:

It's possible I may have uncovered a bug.

I'm having a problem getting a remote share to mount on boot.
The mount is attempted before the network interface is ready and I've got `_netdev` on the required line in `/etc/fstab` . . . .

 

//192.168.0.160/raspi /zeus/raspi cifs rw,auto,uid=1001,gid=1002,file_mode=0755,dir_mode=0755,_netdev,vers=3,credentials=/etc/.smbcredentials_raspi_01 0 0

 

Here is the part of `dmesg` that explains the issue better than I can:

 

[ 41.572110] sun7i-dwmac 1c50000.ethernet eth0: PHY [stmmac-0:01] driver [RTL8211E Gigabit Ethernet] (irq=POLL)
[ 41.574888] sun7i-dwmac 1c50000.ethernet eth0: No Safety Features support found
[ 41.574913] sun7i-dwmac 1c50000.ethernet eth0: RX IPC Checksum Offload disabled
[ 41.574928] sun7i-dwmac 1c50000.ethernet eth0: No MAC Management Counters available
[ 41.574941] sun7i-dwmac 1c50000.ethernet eth0: PTP not supported by HW
[ 41.611180] sun7i-dwmac 1c50000.ethernet eth0: configuring for phy/rgmii-id link mode
[ 43.915166] ieee80211 phy0: brcmf_p2p_create_p2pdev: timeout occurred
[ 43.915201] ieee80211 phy0: brcmf_cfg80211_add_iface: add iface p2p-dev-wlan0 type 10 failed: err=-5
[ 44.368680] FS-Cache: Loaded
[ 45.251206] FS-Cache: Netfs 'cifs' registered for caching
[ 45.377166] Key type cifs.spnego registered
[ 45.377203] Key type cifs.idmap registered
[ 45.379138] CIFS: Attempting to mount //XXX.XXX.0.160/raspi
[ 45.379624] CIFS: VFS: Error connecting to socket. Aborting operation.
[ 45.379661] CIFS: VFS: cifs_mount failed w/return code = -101
[ 45.708719] sun7i-dwmac 1c50000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx
[ 45.708788] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[ 48.676700] PPP generic driver version 2.4.2
[ 48.732746] NET: Registered protocol family 24
[ 48.990513] l2tp_core: L2TP core driver, V2.0
[ 49.045525] l2tp_netlink: L2TP netlink interface
[ 49.103512] l2tp_ppp: PPPoL2TP kernel driver, V2.0
[ 79.972498] device eth0 entered promiscuous mode
[ 609.194770] CIFS: Attempting to mount //XXX.XXX.0.160/raspi

 

At 863.282125 I manually issued the command `mount /zeus/raspi` which successfully created the remote fs mount.

I've been trying to sort this one out for more than a month.
Can anyone help me to get the OS to wait for the network physical link and IP protocol stack to be fully up before trying to connect to the remote share using the line in `/etc/fstab`?

  • Myron changed the title to Within /etc/fstab the _netdev directive is being ignored so a mount to a remote server is failing during OS boot-up.
Posted
7 hours ago, lanefu said:

 

Thank-you for the advice. This is a little bit over my head as I don't want to mess with the /etc/fstab and make the Armbian Linux unstable. I have noticed that the advice is for the Manjaro distribution of Linux that I've not heard of until this moment.

Here is the contents of my /etc/fstab file:

UUID=dffd2ee5-5480-480b-9853-7884f8ba5e47 / ext4 defaults,noatime,commit=600,errors=remount-ro 0 1
tmpfs /tmp tmpfs defaults,nosuid 0 0
//192.168.0.160/raspi /zeus/raspi cifs rw,auto,uid=1001,gid=1002,file_mode=0755,dir_mode=0755,_netdev,vers=3,credentials=/etc/.smbcredentials_raspi_01 0 0

 

The example shows how to mount a remote nfs file system.   I'm not sure how to apply this to my configuration.

Posted

I also had problems with cifs (on OSMC which is debian based like armbian). Using sshfs works well though:

share@ccb-adm035:/home/share /mnt/ccb_adm035  fuse.sshfs noauto,x-systemd.automount,_netdev,users,idmap=user,follow_symlinks,allow_other,reconnect 0 0

You need to have sshfs installed. Check you can ssh to the remote machine and ssh-copy-id to it so it doesn't need a password.

  • Solution
Posted

Thank-you @lanefu. Your pointer to a solution worked, but it took some time for me to learn how to do this.  Finally came across this one page that explained how to automount a share using systemd.

https://anteru.net/blog/2019/automatic-mounts-using-systemd/

 

This worked for me:

root@loki:/etc/systemd/system# cat zeus-raspi.mount
[Unit]
Description=/zeus/raspi

[Mount]
What=//192.168.0.160/raspi
Where=/zeus/raspi
Type=cifs
Options=rw,auto,uid=1001,gid=1002,file_mode=0755,dir_mode=0755,vers=3,credentials=/etc/.smbcredentials_raspi_01
DirectoryMode=0755

[Install]
WantedBy=multi-user.target

-----

root@loki:/etc/systemd/system# cat zeus-raspi.automount
[Unit]
Description=/zeus/raspi

[Automount]
Where=/zeus/raspi

[Install]
WantedBy=multi-user.target

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines