Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
linux_maintenance_nfs [2019/05/20 13:04] – [Set up NFS Server] andonovjlinux_maintenance_nfs [2020/04/08 09:05] (current) andonovj
Line 28: Line 28:
 </sxh> </sxh>
  
-And reload the export rules:+You can have many clients accessing the same server directory but you have to specify different fsid as foolows:
  
 +<sxh bash>
 +root@tain-cx-backup1:/backups# cat /etc/exports
 +/backups/oracle             server(rw,sync)
 +/backups/mongo              serverA(rw,sync,fsid=1)
 +/backups/mongo              serverB(rw,sync,fsid=2)
 +</sxh>
  
 +And reload the export rules:
 <sxh bash> <sxh bash>
-root@nfs-server:/backups/mongo# exportfs -a+root@nfs-server:/backups/mongo# exportfs -ra
 exportfs: /etc/exports [1]: Neither 'subtree_check' or 'no_subtree_check' specified for export "amg-cx-odb1:/backups/oracle". exportfs: /etc/exports [1]: Neither 'subtree_check' or 'no_subtree_check' specified for export "amg-cx-odb1:/backups/oracle".
   Assuming default behaviour ('no_subtree_check').   Assuming default behaviour ('no_subtree_check').
Line 114: Line 121:
 root@tain-cx-backup1:/backups/mongo# root@tain-cx-backup1:/backups/mongo#
 </sxh> </sxh>
 +
 +===Check for possible problems===
 +You can check if there are problems with the mount using verbose mode:
 +
 +<sxh bash>
 +mount -t nfs IP_ADDR:/backups/mongo /apphome/backup/mongo -vvv -o mountproto=tcp
 +</sxh>
 +
 +
 +======Unmount NFS======
 +To unmount NFS, you can use the standard:
 +<sxh bash>
 +umount /apphome/backup/mongo
 +</sxh>
 +
 +However in a lot of cases, you cannot do that because, the NFS isn't responsible or the device is busy. You have to use the force option:
 +
 +===Force===
 +<sxh bash>
 +umount -f /apphome/backup/mongo
 +</sxh>
 +
 +===Lazy===
 +However, the upper command relies that the NFS is responsible up to some amount and that isn't always teh case. In such cases, we can do so called Lazy unmount which will unmount the FS now and clean the slots when the NFS becoms available again:
 +
 +<sxh bash>
 +umount -l /apphome/backup/mongo
 +</sxh>
 +
 +===Really force===
 +In some cases, we really need to shutdown the NFS and kick everyone and burn the server to the ground :)
 +For that we can use:
 +
 +<sxh bash>
 +fuser -ks /apphome/backup/mongo
 +</sxh>
 +
 +That will kick all the processes from that file system and most probably kick you from the server as well.
 +
 +
 +
  
  
  
  • linux_maintenance_nfs.1558357461.txt.gz
  • Last modified: 2019/10/18 20:04
  • (external edit)