[SOLVED!] CIFS share in fstab does not automount (MGA3)

[SOLVED!] CIFS share in fstab does not automount (MGA3)

Postby jaywalker » Feb 4th, '14, 19:26

This is a very similar topic to one discussed here last October ([SOLVED] mageia3 fstab nfs not mounted at boot time) but the solution there doesn't work for my problem.

It has been a long time since I first successfully got samba shares to mount during boot. I haven't needed the facility for some years, but now I must get it working again.

I must say I am surprised it is no longer just a matter of running the mcc wizard to select the share, tweak a couple of options and have it save the changes to /etc/fstab.

The relevant fstab entries are:
Code: Select all
//BTHUB5/USB2 /home/EKshare cifs sec=none 0 0
//BTHUB3/USB_Disk /home/EKshare2 cifs sec=none 0 0

Naturally, this works just fine when I run mount -a after booting, but that isn't exactly automatic.

Any ideas?

Richard
Last edited by jaywalker on Feb 5th, '14, 00:04, edited 1 time in total.
jaywalker
 
Posts: 341
Joined: Nov 17th, '11, 02:38
Location: Belfast, Northern Ireland

Re: CIFS share in fstab does not automount (MGA3)

Postby doktor5000 » Feb 4th, '14, 20:01

Mark them as remote filesystems with _netdev and maybe even nofail. This is used by systemd partly to get the ordering correct (so that it knows network is required to mount those shares) otherwise it won't know about this, try to mount them when network is not yet up, it will silently timeout or fail, and will not try again later.
https://wiki.mageia.org/en/Mageia_2_Err ... t_in_fstab
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18018
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: CIFS share in fstab does not automount (MGA3)

Postby jaywalker » Feb 4th, '14, 20:45

Yes, I read all that in the thread I referenced. As for the NFS problem then discussed, the _netdev suggestion similarly has not fixed my problem.

The reference you quoted is very old and mcc network share wizard is still not "aware" of the need for _netdev, so perhaps there is another obvious solution? I would be happy even for a pointer to what sort of error/failure warning I should be looking for in the boot log. I see nothing untoward related to "mount" or "network", and nothing else fails.

R
jaywalker
 
Posts: 341
Joined: Nov 17th, '11, 02:38
Location: Belfast, Northern Ireland

Re: CIFS share in fstab does not automount (MGA3)

Postby doktor5000 » Feb 4th, '14, 21:55

Well, it's rather old yes, but that doesn't automatically obsolete it. Also the network share wizard is quite unmaintained and unchanged for the most part since ages.
Anyways, you should report that as a bug, after searching if it hasn't been reported yet already: https://wiki.mageia.org/en/How_to_report_a_bug_properly
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18018
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: CIFS share in fstab does not automount (MGA3)

Postby jaywalker » Feb 4th, '14, 22:11

I'll get on to that now Dok, thanks.

By the way, do you reckon that should be two bugs or just one?
1. _netdev does not work as expected in /etc/fstab CIFS mount line
2. mcc network share wizard does not apply _netdev option to generated fstab entry

It looks like 2 is irrelevant, perhaps not even a bug, if the _netdev option is a thing of the past. Should I start with (1) and then file a report on (2) if the _netdev option really is expected to work?

No need to answer, I should do it one at a time.

R
jaywalker
 
Posts: 341
Joined: Nov 17th, '11, 02:38
Location: Belfast, Northern Ireland

Re: CIFS share in fstab does not automount (MGA3)

Postby jaywalker » Feb 4th, '14, 22:29

OK Dok, I added my fourpenceworth to Bug 7673. It is only a couple of years old so it might take a while ...
jaywalker
 
Posts: 341
Joined: Nov 17th, '11, 02:38
Location: Belfast, Northern Ireland

Re: CIFS share in fstab does not automount (MGA3)

Postby doktor5000 » Feb 4th, '14, 22:53

Yes those are two separate bugs.

As mentioned in the bugreport, what does
Code: Select all
journalctl -ab | grep -i mount
as root say?
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18018
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: CIFS share in fstab does not automount (MGA3)

Postby jaywalker » Feb 4th, '14, 23:10

Hmm, rather a lot. I eliminated all of the machine name references to make it a bit easier to read (wish journalctl would do it for me):
Code: Select all
Feb 04 21:01:51 kernel: Mount-cache hash table entries: 256
Feb 04 21:01:51 kernel: EXT4-fs (sdb5): mounted filesystem with ordered data mode. Opts: (null)
Feb 04 21:01:51 dracut: Mounting /dev/disk/by-label/MGA3broot with -o acl,relatime
Feb 04 21:01:51 kernel: EXT4-fs (sdb5): mounted filesystem with ordered data mode. Opts: acl
Feb 04 21:01:51 dracut: Mounted root filesystem /dev/sdb5
Feb 04 21:01:51 dracut: Mounting /usr with -o acl,relatime
Feb 04 21:01:51 kernel: EXT4-fs (sdb6): mounted filesystem with ordered data mode. Opts: acl
Feb 04 21:01:51 systemd[1]: Starting Arbitrary Executable File Formats File System Automount Point.
Feb 04 21:01:51 systemd[1]: Set up automount Arbitrary Executable File Formats File System Automount Point.
Feb 04 21:01:51 systemd[1]: Starting Remount Root and Kernel File Systems...
Feb 04 21:01:51 systemd[1]: Mounting POSIX Message Queue File System...
Feb 04 21:01:51 systemd[1]: Mounting Huge Pages File System...
Feb 04 21:01:51 systemd[1]: Mounting Debug File System...
Feb 04 21:01:51 kernel: EXT4-fs (sdb6): re-mounted. Opts: acl
Feb 04 21:01:51 systemd[1]: Mounted FUSE Control File System.
Feb 04 21:01:51 systemd[1]: Mounted Configuration File System.
Feb 04 21:01:51 systemd[1]: Mounted POSIX Message Queue File System.
Feb 04 21:01:51 systemd[1]: Mounted Huge Pages File System.
Feb 04 21:01:51 systemd[1]: Mounted Debug File System.
Feb 04 21:01:51 kernel: EXT4-fs (sdb5): re-mounted. Opts: acl
Feb 04 21:01:51 systemd[1]: Started Remount Root and Kernel File Systems.
Feb 04 21:01:51 systemd[1]: Mounting Temporary Directory...
Feb 04 21:01:51 systemd[1]: Mounted Temporary Directory.
Feb 04 21:01:54 systemd[1]: Mounting /home...
Feb 04 21:01:55 systemd[1]: Mounted /home.
Feb 04 21:01:55 kernel: EXT4-fs (sdb7): mounted filesystem with ordered data mode. Opts: acl
Feb 04 21:02:24 kernel: EXT4-fs (sdb5): re-mounted. Opts: acl,commit=0
Feb 04 21:02:24 kernel: EXT4-fs (sdb6): re-mounted. Opts: acl,commit=0
Feb 04 21:02:24 kernel: EXT4-fs (sdb7): re-mounted. Opts: acl,commit=0
Feb 04 21:02:32 systemd[1]: Starting Automounts filesystems on demand...
Feb 04 21:02:34 systemd[1]: Started Automounts filesystems on demand.
Feb 04 21:03:03 systemd[1]: Mounting FUSE Control File System...
Feb 04 21:03:03 systemd[1]: Mounted FUSE Control File System.


Ignore that reference to Automounts. I installed it thinking it would be a way around the problem. The I read the documentation. On balance I think it will be quicker to get this bug fixed:~)

R
jaywalker
 
Posts: 341
Joined: Nov 17th, '11, 02:38
Location: Belfast, Northern Ireland

Re: CIFS share in fstab does not automount (MGA3)

Postby doktor5000 » Feb 4th, '14, 23:19

Can you show the output as root of
Code: Select all
systemctl status remote-fs.target
systemctl status network-up.service


And please have a look at viewtopic.php?p=40883#p40883 and viewtopic.php?p=18967#p18967
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18018
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: CIFS share in fstab does not automount (MGA3)

Postby jaywalker » Feb 4th, '14, 23:27

Code: Select all
[root@BabyBuffalo ~]# systemctl status remote-fs.target
remote-fs.target - Remote File Systems
     Loaded: loaded (/usr/lib/systemd/system/remote-fs.target; disabled)
     Active: inactive (dead)
       Docs: man:systemd.special(7)

[root@BabyBuffalo ~]# systemctl status network-up.service
network-up.service - LSB: Wait for the hotplugged network to be up
     Loaded: loaded (/etc/rc.d/init.d/network-up)
     Active: active (exited) since Tue, 2014-02-04 21:02:32 GMT; 22min ago
    Process: 4084 ExecStart=/etc/rc.d/init.d/network-up start (code=exited, status=0/SUCCESS)
     CGroup: name=systemd:/system/network-up.service


It looks like
Code: Select all
Loaded: loaded (/usr/lib/systemd/system/remote-fs.target; disabled)
may have something to do with it. Why would that be disabled? I am fairly sure I didn't do it.

I'll go and check those references now...

R
jaywalker
 
Posts: 341
Joined: Nov 17th, '11, 02:38
Location: Belfast, Northern Ireland

Re: CIFS share in fstab does not automount (MGA3)

Postby doktor5000 » Feb 4th, '14, 23:31

Does
Code: Select all
systemctl enable remote-fs.target && systemctl start remote-fs.target
as root help?
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18018
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: CIFS share in fstab does not automount (MGA3)

Postby jaywalker » Feb 4th, '14, 23:48

I'll try that next.

Just for the record, after reading the man pages on systemctl.special, remote-fs.target and the referenced local file system target, my fstab entries have evolved into:
Code: Select all
//BTHUB5/USB2 /mnt/USB2 cifs _netdev,auto,comment=systemd.mount,sec=none 0 0
//BTHUB3/USB_Disk /mnt/USB_Disk cifs _netdev,auto,comment=systemd.mount,sec=none


But as remote-fs.target still shows as disabled it has made no difference yet.

Trying now with your enabler....
jaywalker
 
Posts: 341
Joined: Nov 17th, '11, 02:38
Location: Belfast, Northern Ireland

Re: CIFS share in fstab does not automount (MGA3)

Postby jaywalker » Feb 4th, '14, 23:50

Code: Select all
[root@BabyBuffalo etc]# systemctl enable remote-fs.target && systemctl start remote-fs.target
ln -s '/usr/lib/systemd/system/remote-fs.target' '/etc/systemd/system/multi-user.target.wants/remote-fs.target'
[root@BabyBuffalo etc]#

Wow, that looks so simple! Back after the next boot ....
jaywalker
 
Posts: 341
Joined: Nov 17th, '11, 02:38
Location: Belfast, Northern Ireland

Re: CIFS share in fstab does not automount (MGA3)

Postby jaywalker » Feb 5th, '14, 00:04

Code: Select all
[richard@BabyBuffalo ~]$ cat /etc/mtab | grep BTHUB
//BTHUB5/USB2 /mnt/USB2 cifs rw,relatime,vers=1.0,sec=ntlm,cache=strict,uid=0,noforceuid,gid=0,noforcegid,addr=192.168.1.254,unix,posixpaths,serverino,acl,rsize=61440,wsize=65536,actimeo=1 0 0
//BTHUB3/USB_Disk /mnt/USB_Disk cifs rw,relatime,vers=1.0,sec=ntlm,cache=strict,uid=0,noforceuid,gid=0,noforcegid,addr=192.168.1.63,unix,posixpaths,serverino,acl,rsize=61440,wsize=65536,actimeo=1 0 0


I think that says it all for me. And to think that I wasted so much time struggling with the man pages for fstab, mount, mount.cifs, smbclient, not to mention my pan-global wanderings with google and it turned out to be yet another improvement from systemd!

Well done Dok, it looks like you have cracked yet another greybearded bug. I hope it works for the original reporter too.

Out of interest, why do you suppose that "target" was not enabled on a network-connected computer with, at one time NFS and now CIFS targets to reach? What is the anticipated set of circumstances which would have had this configuration properly set?

OK, marking this solved and setting out on the task of undoing all of the tentative configuration changes I made which didn't work! Then I have to repeat the magic on the other machines on this net.

Thanks

Richard
jaywalker
 
Posts: 341
Joined: Nov 17th, '11, 02:38
Location: Belfast, Northern Ireland

Re: [SOLVED!]CIFS share in fstab does not automount (MGA3)

Postby jaywalker » Feb 5th, '14, 00:20

And finally,

Or maybe not. I have reverted to the original minimalist fstab entries I was using,
Code: Select all
//BTHUB5/USB2 /home/EKshare cifs sec=none 0 0
//BTHUB3/USB_Disk /home/EKshare2 cifs sec=none 0 0


Please note that I am not saying that _netdev isn't needed; it is just that it was not needed at the most recent re-boot. I will keep an eye on this and see how it goes.

R
jaywalker
 
Posts: 341
Joined: Nov 17th, '11, 02:38
Location: Belfast, Northern Ireland

Re: CIFS share in fstab does not automount (MGA3)

Postby doktor5000 » Feb 5th, '14, 00:56

jaywalker wrote:Out of interest, why do you suppose that "target" was not enabled on a network-connected computer with, at one time NFS and now CIFS targets to reach? What is the anticipated set of circumstances which would have had this configuration properly set?

Well, seems another bug, I've asked that myself: viewtopic.php?p=40905#p40905
Should probably be reported as bug, but first lets see what comes out of https://bugs.mageia.org/show_bug.cgi?id=7673
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18018
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: CIFS share in fstab does not automount (MGA3)

Postby jaywalker » Feb 5th, '14, 01:16

doktor5000 wrote:, but first lets see what comes out of https://bugs.mageia.org/show_bug.cgi?id=7673


Yes, I think we will get there faster if we don't rush. I have just attempted to apply the fix to another m/c on this net and it didn't produce the expected success. It is too late now to go into it much further, besides, before I venture again into the labyrinth of systemd I want to be sure I have a large ball of strong string with me:-)

R
jaywalker
 
Posts: 341
Joined: Nov 17th, '11, 02:38
Location: Belfast, Northern Ireland


Return to Networking

Who is online

Users browsing this forum: No registered users and 0 guests

cron