English
Ask Your Question
0

Remote Samba share will not mount at boot time

asked 2017-03-16 13:44:33 +0000

Dave J gravatar image
  • I am running Fedora25 on an Intel NUC with a WiFi internet connection.
  • I want to mount a remote Samba shared directory automatically during boot.
  • The mount fails with "mount error(101): Network is unreachable" (see log below)

Here is my /etc/fstab entry:

//192.168.2.150/music   /home/music/Music   cifs    ro,auto,username=music,credentials=/etc/.smbpasswd,_netdev  0   0

After boot, I can successfully mount the share like this:

sudo mount /home/music/Music
  • I was able to mount an NFS share using Fedora24 with no problem
  • When I tried mounting an NFS share using Fedora25, I got the same results as I did with the Samba share
  • From the log, it appears that the network connection is not available even though the Network Manager Wait Online service says that it is.

Any advice on what to try next?


/var/log/messages

Mar  7 08:02:16 mediabox systemd: Started Network Manager Wait Online.
Mar  7 08:02:16 mediabox systemd: Reached target Network is Online.
Mar  7 08:02:16 mediabox systemd: Mounting /home/music/Music...
Mar  7 08:02:16 mediabox kernel: FS-Cache: Loaded
Mar  7 08:02:16 mediabox kernel: Key type dns_resolver registered
Mar  7 08:02:16 mediabox kernel: FS-Cache: Netfs 'cifs' registered for caching
Mar  7 08:02:16 mediabox kernel: Key type cifs.spnego registered
Mar  7 08:02:16 mediabox kernel: Key type cifs.idmap registered
Mar  7 08:02:16 mediabox mount: mount error(101): Network is unreachable
Mar  7 08:02:16 mediabox mount: Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
Mar  7 08:02:16 mediabox kernel: CIFS VFS: Error connecting to socket. Aborting operation.
Mar  7 08:02:16 mediabox kernel: CIFS VFS: cifs_mount failed w/return code = -101
Mar  7 08:02:16 mediabox systemd: home-music-Music.mount: Mount process exited, code=exited status=32
Mar  7 08:02:16 mediabox systemd: Failed to mount /home/music/Music.
Mar  7 08:02:16 mediabox systemd: Dependency failed for Remote File Systems.
Mar  7 08:02:16 mediabox systemd: remote-fs.target: Job remote-fs.target/start failed with result 'dependency'.
Mar  7 08:02:16 mediabox systemd: home-music-Music.mount: Unit entered failed state.
edit retag flag offensive close merge delete

Comments

If you using wifi it is possible that network is not ready on boot, you could to connect to the share after user login.

aeperezt ( 2017-03-16 13:59:03 +0000 )edit

1 answer

Sort by ยป oldest newest most voted
2

answered 2017-03-16 17:27:11 +0000

mgscott gravatar image

updated 2017-03-16 17:36:06 +0000

I would look into autofs. I typically automount my network shares since they don't come into existence until you actually access them. This way you don't run into problems of waiting for the network to be established.

https://access.redhat.com/documentati...HatEnterpriseLinux/7/html/StorageAdministration_Guide/nfs-autofs.html

https://access.redhat.com/documentati...HatEnterpriseLinux/6/html/StorageAdministration_Guide/s2-nfs-config-autofs.html

Update: I just realized you are using SMB shares and these refer to NFS (what I typically use). Here is a post discussing SMB: https://www.howtoforge.com/accessingwindowsorsambasharesusingautofs

edit flag offensive delete link more

Comments

Thanks, mgscott. I was able to mount the share using autofs. In addition to the resources you provided, here are some I also found useful:

Arch Wiki Autofs

configure-autofs-to-access-windows-domain-server

Dave J ( 2017-03-17 21:54:17 +0000 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

[hide preview]

Use your votes!

  • Use the 30 daily voting points that you get!
  • Up-vote well framed questions that provide enough information to enable people provide answers.
  • Thank your helpers by up-voting their comments and answers. If a question you asked has been answered, accept the best answer by clicking on the checkbox on the left side of the answer.
  • Down-voting might cost you karma, but you should consider doing so for incorrect or clearly detrimental questions and answers.

Question Tools

Follow
2 followers

Stats

Asked: 2017-03-16 13:44:33 +0000

Seen: 285 times

Last updated: Mar 16