Não é possível montar o compartilhamento remoto do NFS durante a inicialização

1

Estou tentando montar o diretório durante a inicialização no Ubuntu 16.04. Eu segui os passos exatos mencionados neste tutorial link . Consegui montar e desmontar as pastas manualmente.

Como mencionado no tutorial, eu também fiz alterações no / etc / fstab, mas infelizmente quando eu inicializo o sistema, a montagem automática está falhando.

Também tentei montagem manual e ambos estão funcionando bem.

sudo mount -a
sudo start nfs-home.mount

/ etc / fstab

nth@nthYOGA:~$ cat /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sda8 during installation
UUID=3384679d-4d31-4617-b9e4-d4ba7f0d4334 /               ext4    errors=remount-ro 0       1
# /boot/efi was on /dev/sda1 during installation
UUID=CC87-B297  /boot/efi       vfat    umask=0077      0       1
# swap was on /dev/sda9 during installation
UUID=d18f6756-5068-4b1c-99f7-eeff16bf3edf none            swap    sw              0       0

XX.XX.XX.XX:/var/nfs/general    /nfs/general   nfs auto,nofail,noatime,nolock,intr,tcp,actimeo=1800 0 0
XX.XX.XX.XX:/home       /nfs/home      nfs auto,nofail,noatime,nolock,intr,tcp,actimeo=1800 0 0 

Aqui estão os registros

nth@nthYOGA:~$ systemctl status nfs-home.mount 
● nfs-home.mount - /nfs/home
   Loaded: loaded (/etc/fstab; bad; vendor preset: enabled)
   Active: failed (Result: exit-code) since Thu 2018-05-10 20:49:24 CEST; 13min ago
    Where: /nfs/home
     What: XX.XX.XX.XX:/home
     Docs: man:fstab(5)
           man:systemd-fstab-generator(8)
  Process: 1038 ExecMount=/bin/mount XX.XX.XX.XX:/home /nfs/home -t nfs -o noatime,nolock,intr,tcp,actimeo=1800 (code=exited, status=32)


nth@nthYOGA:~$ journalctl -u nfs-home.mount 
-- Logs begin at Thu 2018-05-10 20:49:22 CEST, end at Thu 2018-05-10 21:05:01 CEST. --
May 10 20:49:24 nthYOGA systemd[1]: Mounting /nfs/home...
May 10 20:49:24 nthYOGA mount[1038]: mount.nfs: Network is unreachable
May 10 20:49:24 nthYOGA systemd[1]: nfs-home.mount: Mount process exited, code=exited status=32
May 10 20:49:24 nthYOGA systemd[1]: Failed to mount /nfs/home.
May 10 20:49:24 nthYOGA systemd[1]: nfs-home.mount: Unit entered failed state.


systemctl show nfs-home.mount 
Where=/nfs/home
What=XX.XX.XX.XX:/home
Options=rw,noatime,vers=4.0,rsize=1048576,wsize=1048576,namlen=255,acregmin=1800,acregmax=1800,acdirmin=1800,acdirmax=1800,hard,proto=tcp,timeo=600,retrans=2,sec=sys,clientaddr=192.168.0.2,local_lock=none,addr=XX.XX.XX.XX
Type=nfs4
TimeoutUSec=1min 30s
ControlPID=0
DirectoryMode=0755
SloppyOptions=no
Result=success
ExecMount={ path=/bin/mount ; argv[]=/bin/mount XX.XX.XX.XX:/home /nfs/home -t nfs -o noatime,nolock,intr,tcp,actimeo=1800 ; ignore_errors=no ; start_time=[Thu 2018-05-10 21:15:06 CEST] ; stop_time=[Thu 2018-05-10 21:15:07 CEST] ; pid=2256 ; cod
Slice=system.slice
ControlGroup=/system.slice/nfs-home.mount
MemoryCurrent=18446744073709551615
CPUUsageNSec=18446744073709551615
TasksCurrent=18446744073709551615
Delegate=no
CPUAccounting=no
CPUShares=18446744073709551615
...
...
...
KillSignal=15
SendSIGKILL=yes
SendSIGHUP=no
Id=nfs-home.mount
Names=nfs-home.mount
Requires=-.mount system.slice
Wants=network-online.target
WantedBy=remote-fs.target
Conflicts=umount.target
Before=umount.target remote-fs.target
After=-.mount system.slice systemd-journald.socket network.target remote-fs-pre.target network-online.target
RequiresMountsFor=/nfs
Documentation=man:fstab(5) man:systemd-fstab-generator(8)
Description=/nfs/home
LoadState=loaded
ActiveState=active
SubState=mounted
FragmentPath=/run/systemd/generator/nfs-home.mount
SourcePath=/etc/fstab
....
....
    
por BhanuKiran 10.05.2018 / 21:46

1 resposta

0

Eu tive o mesmo problema. Corrigido alterando auto para x-systemd.automount,noauto em /etc/fstab .

Exemplo:

192.168.178.42:/disk1/data /media/data nfs nouser,rsize=32768,wsize=32768,atime,x-systemd.automount,noauto,rw,dev,noexec,suid 0 0

Em systemd.mount (5) :

x-systemd.automount

An automount unit will be created for the file system. See systemd.automount(5) for details.

    
por sergej 28.08.2018 / 20:46