Friday, March 3, 2017

NFS mount on Solaris 11 Non-Global zones

In this post, we would learn how we mount one folder from one Non-Global zone to another zone on Solaris 11 operating system.

As you know, in linux server it is less difficult in comparision to Solaris server. Here, I will take a two local zone "sun01" & "sun02". Let's take an example, we will mount one folder named "/export/backup" from "sun01" local zone to another zone "sun02" on "/project/export/data" location.

Step by Step method of NFS mount on Solaris 11:

1. In the first step we will create the directory on "sun02" zone where we want to mount the folder. 

sun02#mkdir /project/export/data

2. In second step, we will make a configuration for this process. So for this work you need to login on global zone with root access and make an entry on the dfstb configuration file.

sun#vi /etc/dfs/dfstab

share -F nfs -o rw=sun02 /zones/sun01/root/export

If you see the above entry, we have provided the read/write access to directory on sun02 server where we mount the folder from sun01 local zone.

3. In next step you need to login on sun02 server and mount the shared folder using below command.

sun02#mount sun:/zones/sun01/root/export/backup /project/export/data

4. Once you run the above command the folder is mount from one local zone to another zone temprarily. You can go to the directory and verify that the data which is listed on /export/backup folder is show on sun02 directory.

5. In the last step you need to restart the NFS service on the global zone so the configuration files and other changes makes affect. But these configuration are available until we are not taking reboot of the zone.

Please comment on the post, if you have any issue regarding the NFS mount sharing process. I will try to resolve such issue as soon as possible.

No comments:

Post a Comment