Mar 072008

/!\ Remember to delete the service maps for NFS using svccfg command

With Solaris 10 and VCS 5.x, nfsd HAS TO run under VCS control. In order to achieve that, the following needs ton happen (on every node that will host the NFS share) —

Disable/Delete the NFS services from SMF

<span class="anchor" id="line-11"></span># svccfg delete -f svc:/network/nfs/server:default<br /><span class="anchor" id="line-12"></span># svccfg delete -f svc:/network/nfs/status:default<br /><span class="anchor" id="line-13"></span># svccfg delete -f svc:/network/nfs/nlockmgr:default<br /><span class="anchor" id="line-14"></span>

Manually restart lockd, statd and automountd

# /usr/lib/nfs/lockd<br /><span class="anchor" id="line-20"></span># /usr/lib/nfs/statd<br /><span class="anchor" id="line-21"></span># /usr/lib/fs/autofs/automount<br /><span class="anchor" id="line-22"></span># /usr/lib/autofs/automountd<br /><span class="anchor" id="line-23"></span>

NOTE: In this example (see below), the NFSgrp is configured only for one node. To add another node, add the node name and number to SystemList and AutoStartList

       group NFSgrp (<br />               SystemList = { hostA = 0 }<br />               AutoStartList = { hostA }<br /><span class="anchor" id="line-30"></span>        )<br /><span class="anchor" id="line-31"></span><br /><span class="anchor" id="line-32"></span>        DiskGroup nfsDG (<br /><span class="anchor" id="line-33"></span>               Critical = 0<br /><span class="anchor" id="line-34"></span>               DiskGroup = testdg<br /><span class="anchor" id="line-35"></span>        )<br /><span class="anchor" id="line-36"></span><br /><span class="anchor" id="line-37"></span>        Volume nfsVOL (<br /><span class="anchor" id="line-38"></span>              Critical = 0<br /><span class="anchor" id="line-39"></span>              Volume = testnfshome<br /><span class="anchor" id="line-40"></span>              DiskGroup = testdg<br /><span class="anchor" id="line-41"></span>        )<br /><span class="anchor" id="line-42"></span><br /><span class="anchor" id="line-43"></span><br /><span class="anchor" id="line-44"></span>        IP IPres (<br /><span class="anchor" id="line-45"></span>                Device = bge0<br />               Address = ""<br /><span class="anchor" id="line-47"></span>                NetMask = ""<br /><span class="anchor" id="line-48"></span>        )<br /><span class="anchor" id="line-49"></span>        Mount Mountres (<br /><span class="anchor" id="line-50"></span>                MountPoint = "/nfs/testnfs"<br /><span class="anchor" id="line-51"></span>                BlockDevice = "/dev/vx/dsk/testdg/testnfshome"<br /><span class="anchor" id="line-52"></span>                FSType = vxfs<br /><span class="anchor" id="line-53"></span>                MountOpt = rw<br /><span class="anchor" id="line-54"></span>                FsckOpt = "-y"<br /><span class="anchor" id="line-55"></span>        )<br /><span class="anchor" id="line-56"></span>        NFS NFSres (<br /><span class="anchor" id="line-57"></span>                Nservers = 16<br /><span class="anchor" id="line-58"></span>        )<br /><span class="anchor" id="line-59"></span><br /><span class="anchor" id="line-60"></span>        NFSLock NFSLockres (<br /><span class="anchor" id="line-61"></span>                PathName = "/nfs/testnfs"<br /><span class="anchor" id="line-62"></span>        )<br /><span class="anchor" id="line-63"></span>        NIC NICres (<br /><span class="anchor" id="line-64"></span>                Device = bge0<br /><span class="anchor" id="line-65"></span>        )<br /><span class="anchor" id="line-66"></span>        Share Shareres (<br /><span class="anchor" id="line-67"></span>                PathName = "/nfs/testnfs"<br /><span class="anchor" id="line-68"></span>                Options = "-o rw -d \"test home dirs\""<br /><span class="anchor" id="line-69"></span>        )<br /><span class="anchor" id="line-70"></span><br /><span class="anchor" id="line-71"></span><br /><span class="anchor" id="line-72"></span><br /><span class="anchor" id="line-73"></span>        // IPres requires Shareres<br /><span class="anchor" id="line-74"></span>        IPres requires NICres<br /><span class="anchor" id="line-75"></span>        nfsVOL requires nfsDG<br /><span class="anchor" id="line-76"></span>        Mountres requires nfsVOL<br /><span class="anchor" id="line-77"></span>        NFSLockres requires Mountres<br /><span class="anchor" id="line-78"></span>        Shareres requires NFSLockres<br /><span class="anchor" id="line-79"></span>        Shareres requires NFSres<br /><span class="anchor" id="line-80"></span><br /><span class="anchor" id="line-81"></span>        // resource dependency tree<br /><span class="anchor" id="line-82"></span>        //<br /><span class="anchor" id="line-83"></span>        // group NFSgrp<br /><span class="anchor" id="line-84"></span>        // {<br /><span class="anchor" id="line-85"></span>        // IP IPres<br /><span class="anchor" id="line-86"></span>        //      {<br /><span class="anchor" id="line-87"></span>        //      NIC NICres<br /><span class="anchor" id="line-88"></span>        //      Share Shareres<br /><span class="anchor" id="line-89"></span>        //          {<br /><span class="anchor" id="line-90"></span>        //          NFSLock NFSLockres<br /><span class="anchor" id="line-91"></span>        //              {<br /><span class="anchor" id="line-92"></span>        //              Mount Mountres<br /><span class="anchor" id="line-93"></span>        //                  {<br /><span class="anchor" id="line-94"></span>        //                  Volume nfsVOL<br /><span class="anchor" id="line-95"></span>        //                      {<br /><span class="anchor" id="line-96"></span>        //                      DG nfsDG<br /><span class="anchor" id="line-97"></span>        //                      }<br /><span class="anchor" id="line-98"></span>        //                  }<br /><span class="anchor" id="line-99"></span>        //              }<br /><span class="anchor" id="line-100"></span>        //          NFS NFSres<br /><span class="anchor" id="line-101"></span>        //          }<br /><span class="anchor" id="line-102"></span>        //       }<br /><span class="anchor" id="line-103"></span>        // }<br />

 Posted by at 7:17 pm