[fstab mount points] nfs and cifs shares

Greetings !!

It is now from july, I think, that I perpetrated the worse error I did since 1996 concerning Linux system: installing LEAP 15 on all my private computers :{

I still not have understood nore fixed the following issues:

The nfs shares are mounted “at random”, sometimes at first boot, sometimes I have to reboot two or more times to have them mounted at boot.
The smb shares from one particular samba server couldn’t be mounted at boot (I think this is because of the “mangled names=no” directive, to be tested soon).

All those shares are mounted manually.

The “incriminated samba server” is called rasalgethi, used as samba server at work.


[global]
    workgroup = DEZORDI.WORLD
    passdb backend = smbpasswd:/etc/samba/smbpasswdfile
    printing = cups
    printcap name = cups
    printcap cache time = 750
    cups options = raw
    map to guest = Bad User
    usershare allow guests = No
    domain master = No
  local master = Yes
  preferred master  Yes
    netbios name = RASALGETHI
    security = user
    wins support = Yes
    server string = rasalgethi (4.7.8)
    os level = 80

#avoiding windows shares file names to be messed up 
  mangled names = no

  browse list = yes
  browseable = yes

  name resolve order = wins bcast lmhosts

# REGLAGES

    unix extensions = No
    wide links = Yes
    follow symlinks = Yes

    strict sync = no
  sync always = no

# Logging

    log level = 2 
    log file = /var/log/samba/log.%I
  max log size = 2000

Concerning the “nfs shares”, I found nothing interresting in the different “systemctl status XXX.mount” commands…
As they are mounted “sometimes” it is not very urgent but concerning the local network at school, I lost hours to try fix the issue up.

I tested at house and effectively, rasalgethi as server and aldebaran as client with share listed in /etc/fstab, the share can not be mounted at boot.

I tried with NetworkManager-wait-online, without success.
I tried with “onNFSroot”, without success.

I will try to comment mangled names=no and then try to mount cifs filesystem at boot.
That is the last setting changed before have realized none of the personnal folder of the students were mounted at boot but manually once system booted.

It works at home with same distribution, same medium (ethernet) and it works with those configuration

smb.conf PDC antares


[global]
#    add machine script = /usr/sbin/useradd  -c Machine -d /var/lib/nobody -s /bin/false %m$
    domain master = Yes
    local master = Yes
    netbios name = ANTARES
    os level = 80
    passdb backend = smbpasswd
    preferred master = Yes
    security = user
    usershare allow guests = No
    wins support = Yes
    workgroup = DEZORDI.WORLD
    server string = antares (PDC -- LEAP15)
    
    mangled names = no

    browse list = yes
    browseable = yes
    
    name resolve order = wins bcast lmhosts
    
# Réglages hardcore

    unix extensions = no
    follow symlinks = Yes
    wide links = Yes
    
    #log file = /var/log/samba/samba.log
    log level = 2
    
#    socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=65536 SO_SNDBUF=65536
    strict sync = no
    sync always = no
  
    interfaces = eth0

smb.conf DC sirius


[global]
    workgroup = DEZORDI.WORLD
    passdb backend = smbpasswd
    printing = cups
    printcap name = cups
    printcap cache time = 750
    cups options = raw
    map to guest = Bad User
    #include = /etc/samba/dhcp.conf
    usershare allow guests = No
    netbios name = SIRIUS
    wins support = Yes
    name resolve order = wins bcast lmhosts
    server string = sirius (samba 4.7.8)

And the different tools used to verify it works, always work


sirius:/exemples # ssh antares.dezordi.world 
Password: 
Last login: Sun Nov 25 21:37:32 2018 from 192.168.0.4
Bienvenue sur Antares !!
Ne faites pas les connards !!

antares:~ # smbstatus 

Samba version 4.7.10-git.124.8d97fe90926lp150.3.9.1-SUSE-oS15.0-x86_64
PID     Username     Group        Machine                                   Protocol Version  Encryption           Signing              
----------------------------------------------------------------------------------------------------------------------------------------
2877    root         root         192.168.0.4 (ipv4:192.168.0.4:49938)      NT1               -                    -                    

Service      pid     Machine       Connected at                     Encryption   Signing     
---------------------------------------------------------------------------------------------
exercices    2877    192.168.0.4   Sun Nov 25 13:42:36 2018 CET     -            -           
IPC$         2877    192.168.0.4   Sun Nov 25 13:42:36 2018 CET     -            -           

No locked files

and the fstab from sirius (here the client)


//192.168.0.3/exercices      /datas1/nfsshares/exercices  cifs     user=root,password=tralalalalalalalalalala         0  0
192.168.0.3:/windows/Ntfs2   /datas1/nfsshares/Ntfs2            nfs      nfsvers=3                                              0  0
192.168.0.3:/windows/Ntfs1   /datas1/nfsshares/Ntfs1            nfs      nfsvers=3                                              0  0
192.168.0.3:/windows/Linux   /datas1/nfsshares/Linux            nfs      nfsvers=3                                              0  0
192.168.0.3:/windows/Datas3  /datas1/nfsshares/Datas3           nfs      nfsvers=3                                              0  0
192.168.0.3:/windows/Datas2  /datas1/nfsshares/Datas2           nfs      nfsvers=3                                              0  0
192.168.0.3:/windows/Datas1  /datas1/nfsshares/Datas1           nfs      nfsvers=3                                              0  0

I tried with version=3.0 at the level of cifs in the clients of rasalgethi but it doesn’t fix.
I should have tried sec=ntlmv2 as shown in the different threads seen concerning this type of issue but I did not yet (answer tomorrow at school)

Precisions: the different server versions are now 4.7.10 and the term “manually” indicates the use of “mount -a” by my students.

Is this hardwired or WiFI. Using Network manager implies WiFI but may not be.

Might want to look at systemctl-analyze blame to see the boot sequence NetworkManager may not be up when needed to mount the shares

Be sure the NM has been set to be used by all users which forces earlier loading. There is a check box in the settings. Default is not to start until the user logs on not at system start.

Thank you.
I used systemd-analyze critical-chain but we did not log the output from the different machines, we’ll do it.

I remember have checked all the NetworkManager setttings for every computer and all the users on every system could use NM.
I set autonegotiation in order to have the 1Gb ethernet be choosen on every computer.

When full_audit is set: where could I check for the logs ? journalctl never page all the messages related to the samba shares use (for example from 1st sept to 1st december).
On the different client logs, there is nothing related to full_audit.

I did not yet switched to wicked instead of NM on all clients… was the last resort for me.

Greetings !!

I just set up the server this morning and concerning the lab at school everything went back all good: all the /etc/fstab were mounted without any problem, with nothing changed since last thursday → ???
Nothing changed at the configuration of the server nore the last configurations done on the /etc/fstab file on each client machine.

That’s nice…

But concerning the local network, here at home, using NFS: I got once again those messages: this morning it (sirius) booted very well

/var/log/boot.log


...
  OK  ] Started Setup Virtual Console.
[FAILED] Failed to mount /root.
See 'systemctl status root.mount' for details.
[DEPEND] Dependency failed for Local File Systems.
[DEPEND] Dependency failed for Early Kernel Boot Messages.
         Starting Restore /run/initramfs on shutdown...
...
  OK  ] Started Security Auditing Service.
         Starting Update UTMP about System Boot/Shutdown...
[FAILED] Failed to mount /datas1/nfsshares/exercices.
See 'systemctl status datas1-nfsshares-exercices.mount' for details.
[DEPEND] Dependency failed for Remote File Systems.
  OK  ] Started Update UTMP about System Boot/Shutdown.
         Starting Update UTMP about System Runlevel Changes...
  OK  ] Started Update UTMP about System Runlevel Changes.
[FAILED] Failed to mount /datas2.
See 'systemctl status datas2.mount' for details.
[FAILED] Failed to mount /datas1/nfsshares/Datas3.
See 'systemctl status datas1-nfsshares-Datas3.mount' for details.
[FAILED] Failed to mount /datas1/nfsshares/Linux.
See 'systemctl status datas1-nfsshares-Linux.mount' for details.
[FAILED] Failed to mount /datas1/nfsshares/Datas2.
See 'systemctl status datas1-nfsshares-Datas2.mount' for details.
[FAILED] Failed to mount /datas1/nfsshares/Datas1.
See 'systemctl status datas1-nfsshares-Datas1.mount' for details.
[FAILED] Failed to mount /datas1/nfsshares/Ntfs1.
See 'systemctl status datas1-nfsshares-Ntfs1.mount' for details.
[FAILED] Failed to mount /datas1/nfsshares/Ntfs2.
See 'systemctl status datas1-nfsshares-Ntfs2.mount' for details.
  OK  ] Stopped Forward Password Requests to Plymouth Directory Watch.
...

I have no informations for journalctl -u root.mount and the other datas1-nfsshares-* files as I always have to reboot once those messages are displayed during boot.
Sometimes I got a fallback shell but it appears randomly (with the CTRL-D to continue). When I got this message it is related 9 time on ten when windows (the other system rarely used on dualboot) forgot to clean up the dirty flag from one of the ntfs partitions.

The /root partition is btrfs as shown below:


sirius:/exemples # btrfs filesystem show

Label: 'racinelinux'  uuid: a80dc236-b35f-403c-993d-48d4255c073b
        Total devices 2 FS bytes used 28.81GiB
        devid    1 size 40.00GiB used 7.51GiB path /dev/sda6
        devid    2 size 150.00GiB used 28.03GiB path /dev/sdc1

Label: 'DATAS1'  uuid: 2cb28a00-35b4-4f22-95c8-2781dee5b201
        Total devices 1 FS bytes used 189.23GiB
        devid    1 size 256.00GiB used 240.00GiB path /dev/sdb1

Label: 'rootext'  uuid: dede3cf3-9fe2-4f0d-afb9-2104ffa16b12
        Total devices 1 FS bytes used 63.64GiB
        devid    1 size 73.57GiB used 73.56GiB path /dev/sdc2

Label: 'home'  uuid: adb86e35-7aae-4575-9874-673d4a251fe1
        Total devices 1 FS bytes used 1.30GiB
        devid    1 size 11.76GiB used 11.76GiB path /dev/sda7                                                                                                                            
                                                                                                                                                                                         
sirius:/exemples # df -h   
                                                                                                                                                              
Filesystem                   Size  Used Avail Use% Mounted on                                                                                                                            
devtmpfs                     7.8G  4.0K  7.8G   1% /dev                 
tmpfs                        7.9G   52M  7.8G   1% /dev/shm                                                                                                                              
tmpfs                        7.9G  9.7M  7.9G   1% /run                                                                                                                                  
tmpfs                        7.9G     0  7.9G   0% /sys/fs/cgroup                                                                                                                        
/dev/sda6                    191G   29G  162G  16% /                                                                                                                                     
/dev/sda6                    191G   29G  162G  16% /.snapshots
/dev/sdb2                    210G  178G   33G  85% /datas2
/dev/sdb1                    256G  191G   63G  76% /datas1
/dev/sdc2                     74G   64G  9.3G  88% /root
/dev/sda7                     12G  1.4G   11G  12% /home

//192.168.0.3/exercices       14G  6.0G  7.8G  44% /datas1/nfsshares/exercices
192.168.0.3:/windows/Linux   276G  209G   67G  76% /datas1/nfsshares/Linux
192.168.0.3:/windows/Datas1  160G   34G  127G  21% /datas1/nfsshares/Datas1
192.168.0.3:/windows/Datas2  306G  277G   30G  91% /datas1/nfsshares/Datas2
192.168.0.3:/windows/Ntfs2   250G  118G  133G  48% /datas1/nfsshares/Ntfs2
192.168.0.3:/windows/Datas3  380G  100G  280G  27% /datas1/nfsshares/Datas3
192.168.0.3:/windows/Ntfs1   513G  388G  125G  76% /datas1/nfsshares/Ntfs1

tmpfs                        1.6G  8.0K  1.6G   1% /run/user/0

Have no idea why /root cannot mount at random.

I am just jumping in because I see a mentioning of /root as being a separate file system.

I have no idea why you have /root as a separate file sytem, but it should not.be one. /root is specialy there to be sure that de home directory of user root is always present, regardless of the fact that /home (where home directories are normaly stored) may not be available for some reason. This so that root can always log in. And of course, /root should be kept at the minimum, the home directory of root should not be burdened by things that can easilty be elsewhere.

As I said you have to check the box to allow all users in the settings to get NM to load at boot not just when a user logs on. It is not clear to me you have done this.

And I agree not a good idea to have /root on it’s own partition . It is where it is for good reasons. Also looks like you dump a lot of thing there also. Root is a special user and should be treated as special. Do not use root as a normal user would it use their directories. In fact you should never ever log into a GUI as root. You will break stuff. Only become root from a normal user login using su or other of the family

Getting back very late but I solved the issue with auto.master and auto.nfs.