Changes between Version 10 and Version 11 of TipAndDoc/network/nfs


Ignore:
Timestamp:
Mar 21, 2016 2:42:43 AM (9 years ago)
Author:
mitty
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • TipAndDoc/network/nfs

    v10 v11  
    2727 * [http://linux.die.net/man/5/exports exports(5): NFS server export table - Linux man page] 
    2828 > For NFSv4, there is a distinguished filesystem which is the root of all exported filesystem. This is specified with fsid=root or fsid=0 both of which mean exactly the same thing. 
     29 
     30 = NFS with DHCP = 
     31 * 結果として、静的割当を行わないと起動時のマウントには成功しなかった 
     32 
     33 * Linux 4.4.5-1-ARCH 
     34 * nfs-utils 1.3.3-3 
     35 
     36 * mitty@nfs-client:~$ systemctl status srv-nfs4.mount 
     37{{{ 
     38● srv-nfs4.mount - /srv/nfs4 
     39   Loaded: loaded (/etc/fstab; bad; vendor preset: disabled) 
     40   Active: failed (Result: exit-code) since Tue 2016-03-15 00:20:17 JST; 7min ago 
     41    Where: /srv/nfs4 
     42     What: nfs-server.local.mitty.jp:/ 
     43     Docs: man:fstab(5) 
     44           man:systemd-fstab-generator(8) 
     45 
     46Mar 15 00:20:17 nfs-client systemd[1]: Mounting /srv/nfs4... 
     47Mar 15 00:20:17 nfs-client mount[229]: mount.nfs4: Failed to resolve server nfs-server.local.mitty.jp: Name or service not known 
     48Mar 15 00:20:17 nfs-client systemd[1]: srv-nfs4.mount: Mount process exited, code=exited status=32 
     49Mar 15 00:20:17 nfs-client systemd[1]: Failed to mount /srv/nfs4. 
     50Mar 15 00:20:17 nfs-client systemd[1]: srv-nfs4.mount: Unit entered failed state. 
     51}}} 
     52 * [[Image(nfs-dhcp.png,33%)]] 
     53 
     54 * 以下、効果が無かったもの 
     55  * rpcbind.service, nfs-client.serviceの有効化 
     56{{{ 
     57mitty@nfs-client:~$ sudo systemctl enable rpcbind.service 
     58Created symlink from /etc/systemd/system/sockets.target.wants/rpcbind.socket to /usr/lib/systemd/system/rpcbind.socket. 
     59mitty@nfs-client:~$ sudo systemctl enable nfs-client.target 
     60Created symlink from /etc/systemd/system/multi-user.target.wants/nfs-client.target to /usr/lib/systemd/system/nfs-client.target. 
     61Created symlink from /etc/systemd/system/remote-fs.target.wants/nfs-client.target to /usr/lib/systemd/system/nfs-client.target. 
     62mitty@nfs-client:~$ sudo systemctl enable remote-fs.target 
     63}}} 
     64  * [http://baptiste-wicht.com/posts/2014/10/linux-tip-force-systemd-networkd-to-wait-for-dhcp.html Linux tip: Force systemd networkd to wait for DHCP | @Blog("Baptiste Wicht")] 
     65{{{ 
     66mitty@nfs-client:~$ sudo vim /etc/systemd/system/multi-user.target.wants/remote-fs.target 
     67Wants=network-online.target 
     68After=remote-fs-pre.target network-online.target 
     69mitty@nfs-client:~$ sudo systemctl enable systemd-networkd-wait-online.service 
     70Created symlink from /etc/systemd/system/network-online.target.wants/systemd-networkd-wait-online.service to /usr/lib/systemd/system/systemd-networkd-wait-online.service. 
     71}}} 
     72{{{ 
     73Wants=dhcpcd.service 
     74After=remote-fs-pre.target dhcpcd.service 
     75}}}