Bug 1023737 - fstab method of CIFS/NFS mounts will not mount on startup
Summary: fstab method of CIFS/NFS mounts will not mount on startup
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: systemd
Version: 20
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: systemd-maint
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Keywords:
: 1027114 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-10-27 14:22 UTC by Andrew Dunn
Modified: 2015-05-25 12:26 UTC (History)
11 users (show)

(edit)
Clone Of:
(edit)
Last Closed: 2015-05-25 12:26:53 UTC


Attachments (Terms of Use)
systemctl --boot (192.70 KB, text/plain)
2013-10-27 14:36 UTC, Andrew Dunn
no flags Details

Description Andrew Dunn 2013-10-27 14:22:50 UTC
Description of problem:

Using /etc/fstab to mount CIFS shares on boot via this set of options:

//<host>/<share> /mnt/<host>/<user>/<share> cifs _netdev,credentials=/etc/samba.<user>,uid=<user>,gid=<user>,forceuid,forcegid 0 0

Upon boot, running 'df -h' shows that the CIFS mount points have not been mounted. If you run 'sudo mount -a -v' all shares will mount properly.

Checking /var/log/messages yeilds: (excerpt)

Oct 27 09:50:11 kraken mount: mount error: could not resolve address for <host>: Unknown error
Oct 27 09:50:11 kraken systemd: mnt-crypt-<user>-<share>.mount mount process exited, code=exited status=1

Immediately I changed out the /etc/fstab to have ip addresses instead of host names, rebooted, no change in behavior.

Looking online, found someone experiencing similar issues where it was suspected that networking is coming online after systemd attempts to mount the shares. So, for troubleshooting enabled a service:

'sudo systemctl enable NetworkManager-wait-online.service'

Rebooting multiple times, no change in behavior, the mounts don't appear at boot time but will successfully mount if an administrative user runs 'sudo mount -a'

I've disabled the 'NetworkManager-wait-online.service' to take the system back to unmolseted Fedora 20.

This is a fresh install of Fedora 20, no systemctl/systemd other than the single troubleshooting step I mentioned has been done.

How reproducible:

Fully reproducible.

Steps to Reproduce:
1. Add a network share to /etc/fstab
2. Reboot
3. No network share
4. Run 'sudo mount -a'
5. Network share is now mounted (without issues)

Actual results:

The /etc/fstab method of mounting shares doesn't result in them being mounted at boot time.

Expected results:

The /etc/fstab method of mounting shares results in them being mounted at boot time.
Additional info:

Comment 1 Andrew Dunn 2013-10-27 14:36:09 UTC
Created attachment 816520 [details]
systemctl --boot

Comment 2 Hilary Wright 2014-03-27 14:10:49 UTC
Hi, 

I installed F20 (replacing F19) two days ago and I am experiencing exactly the 

same poblem. My fstab specified mounts are not mounting at boot but can be mounted manually as above. Exactly the same mounts worked OK in F19.

The reason is the the network is not available when the mounts are tried. I get this in boot.log, 

[[1;31mFAILED[0m] Failed to mount /home/home/NAS.
See 'systemctl status home-home-NAS.mount' for details.
[[1;33mDEPEND[0m] Dependency failed for Remote File Systems.

executing the advice to see the status, I get, 

Mar 27 08:29:06 localhost.localdomain mount[1000]: mount error(101): Network is unreachable

I have installed the latest fixes, including the latest Networkmanager fix.

Is there a solution for this?

Comment 3 Lennart Poettering 2014-06-20 00:06:40 UTC
*** Bug 1027114 has been marked as a duplicate of this bug. ***

Comment 4 Lukáš Nykrýn 2014-08-18 14:30:05 UTC
Can you please enable persistent journal "mkdir /var/log/journal", boot with "debug" on kernel cmdline and then post here logs from journal?

Comment 5 Andrew Dunn 2014-08-18 14:35:16 UTC
Lukáš:

I've found a work around that worked for me, I should have updated this ticket long ago. Using the comment parameter in fstab I can pass "systemd.automount" which behaves as I would want it to. 

Essentially, on a device that moves around on different networks, I want the mount to process when the user requests it through the Desktop environment. This method makes it so that the mounts don't process on boot, but process when I click on the folder within nautilus.

Example fstab:

//<host>/<share> /mnt/<host>/<user>/<share> cifs _netdev,noauto,comment=systemd.automount,credentials=/etc/samba.<user>,uid=<user>,gid=<user>,forceuid,forcegid     0 0

Comment 6 Mark Eackloff 2014-11-15 02:17:21 UTC
This problem could be on the server side.

I upgraded from Fedora 18 to 20 on my client.  Did not have any problem.  I then upgraded from Fedora 14 to 20 on my server.  Had no problem on the server side with /home.  I then setup the /etc/exports file on the server and ran exportfs to export /home.  On the client I commented out the line for /home and added a line for /home as an nfs share.  Rebooted client only to find that I had a /home mount point but nothing in it.  Also no entry in /etc/mtab for /home.

I have since accidentally discovered that running "mount -a" on the server after boot time connected me with my home directory on the server.  But I have to do this every time I boot.  So the line for /home in the client fstab in probably ok and there is probably no firewall problem.

Both hosts "up2date" as of yesterday.

Comment 7 Andrew Dunn 2015-05-25 12:26:53 UTC
Sorry I took so long to close this. I should have closed it out back on 2014-08-18.


Note You need to log in before you can comment on or make changes to this bug.