nfs4

Embed Size (px)

DESCRIPTION

nfs in linux

Citation preview

NFS v3 to NFSV4 migration-------------------------[root@Server1 ~]# cat /etc/exports/home *(rw,no_root_squash,async)[root@Server1 ~]# exportfs -vaexporting *:/home[root@Server1 ~]#Create the NFS4 pseudofilesystem:-------------------------------[root@Server1 ~]# mkdir /NFS4[root@Server1 ~]# chmod 777 /NFS4/Create a place for /home to go------------------------------[root@Server1 ~]# mkdir /NFS4/home[root@Server1 ~]# mount --bind /home /NFS4/home[root@Server1 ~]# grep NFS /etc/fstab/home /NFS4/home none defaults,bind 0 0export /NFS4 and /NFS4/home. /NFS4 must have fsid=0 to indicate its the root of the pseudofilesystem-----------------------------------------------------------------------------------------------------[root@Server1 ~]# cat /etc/exports/home *(rw,no_root_squash,async)/NFS4 *(rw,fsid=0,no_subtree_check,sync,no_root_squash)/NFS4/home *(rw,no_subtree_check,sync,no_root_squash)[root@Server1 ~]#because of this NFS4 pseudofilesystem stuff, clients dont mount /NFS4/home, they mount /home! If you have -t nfs4 then its actually mounting /NFS4/home, otherwise it mounts /home through NFS3client side-----------root@solaris:~# mount -t nfs4 10.222.222.44:/ /d01root@solaris:~# df -h /d01Filesystem Size Used Available Capacity Mounted on10.222.222.44:/ 49G 3.3G 43G 8% /d01root@solaris:~#