So either you can find and kill that process or let the process complete. This is most likely because the mount_point on which your NFS file system is mounted is in use by some process. It is possible sometimes you may get this error umount.nfs4: : device is busy Next use df or mount command to make sure the NFS FS is not mounted any more. So in our example to un-mount our NFS File System we will use ~]# umount /tmp/logs # umount NFS_SERVER:/PATH/TO/EXPORTED/DIR OR if you are not aware of the mount point you can also provide the REMOTE_SERVER and REMOTE_DIR PATH i.e. To un-mount the NFS mount point you can just use umount command followed by the mount point path # umount /MOUNT_POINT If no rsize and wsize options are specified, the default varies by which version of NFS we are using. The mount command options rsize and wsize specify the size of the chunks of data that the client and server pass back and forth to each other. Setting Block Size to Optimize Transfer Speeds Similarly if your client and server supports you can provide different NFS version. If your NFS server allows you to choose a NFS version for the client mount then you can use -o nfsvers=, for example to mount using NFSv3 ~]# mount -o nfsvers=3 10.43.138.1:/ISS /tmp/logs Provide NFS version while mounting the NFS File System So while performing the mount we have an option to modify these values.
Here this command tells us that the NFS was mounted using NFSv4 with different rsize, wsize etc. This section will be applicable based on your NFS server configuration.įor example in the above case if I check for the options using which NFS was mounted ~]# mount | grep logsġ0.43.138.1:/ISS on /tmp/logs type nfs4 (rw,relatime,vers=4.1,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,clientaddr=10.43.138.2,local_lock=none,addr=10.43.138.1) That's it so next time your client reboots, the NFS File System will be automatically mounted as long as your NFS server is up and running.Īdditional Options to mount NFS File System Now verify if your NFS File System is properly mounted: ~]# df -h /tmp/logs You can safely execute this command and it will not break anything in your environment ~]# mount -a Now we will use fstab to mount all the FS available in /etc/fstab. Next to verify if this is working, first un-mount the NFS File System (if in mounted state) ~]# umount /tmp/logs # NFS_SERVER:/PATH/TO/EXPORTED/DIR /MOUNT_POINT_ON_CLIENT TYPE_OF_FS OPTIONS DUMP PASSġ0.10.0.10:/backups /var/backups nfs defaults 0 0
#PARTITION FIND AND MOUNT GUIDE UPDATE#
Next update /etc/fstab with below content In this article we will use our traditional fstab to auto-mount the file system. First of all make sure your mount point exists ~]# mkdir /tmp/logs So if you wish to mount your NFS File System after every reboot then you must add this in /etc/fstab or create a systemd unit file to update fstab during reboot.
Now with mount command the changes are not persistent and will not survive a reboot. Now based on the permission of your NFS share you can access the data of /ISS from server1 on /tmp/logs on server2 Verify if the NFS FS is mounted properly ~]# df -h /tmp/logsįilesystem Size Used Avail Use% Mounted onġ0.43.138.1:/ISS 685G 169G 482G 26% /tmp/logs
Next mount the NFS file system from server1 on server2 ~]# mount -t nfs 10.43.138.1:/ISS /tmp/logs We need the mount point, so I will create the mount point ~]# mkdir /tmp/logs So to mount NFS manually we will execute below command on the client i.e. to mount NFS share on the client from the server. In this article we will only cover the NFS client part i.e.