Tuesday, February 3, 2015

Solaris 11.2: Configuring Symantec ODM devices in a Solaris 11 Zone


I was happy to see that Symantec supplied an IPS repository for Storage Foundation 6.0pr1.
I was disappointed to see that the documentation for installed and enable Storage foundation for Solaris 11 zones was incomplete and didn't work.
After digging through the documentation and performing a little troubleshooting, here is the procedure for installing and enable ODM support for Solaris 11 Zones.

1. The first step is to add the IPS repository as a publisher & install the packages, then unset the publisher

root@testzone: # ls
VRTSpkgs.p5p info

 
root@testzone: # pkg set-publisher -P -g `pwd`/VRTSpkgs.p5p Symantec
root@testzone: # pkg install --accept VRTSvlic VRTSodm VRTSperl

If you are using the Zone with VCS, you can also install the 3 VCS packages specified in the install docs

root@testzone: # pkg install --accept VRTSvcs VRTSvcsag VRTSvcsea

Unset the publisher

root@testzone: # pkg unset-publisher Symantec

2. Now we will update the zone configuration to add the LOFS mount for the VERITAS license files, the ODM device mapping and then the adding permission to the zone to make an ODM mount. You will want to reboot the zone after this step.


root@testzone: # cat > /tmp/odm_zonecfg << EOF
set fs-allowed=default,odm
add fs
set dir=/etc/vx/licenses/lic
set special=/etc/vx/licenses/lic
set type=lofs
end
add device
set match=/dev/odm
end
EOF

root@testzone: # zonecfg -z testzone-01 -f /tmp/odm_zonecfg

3. After reboot the zone, login to the zone and verify that the /dev/odm mapping is present in the zone and test the /dev/odm mount.

root@testzone-01:~# ls -d /dev/odm
/dev/odm
root@testzone-01:~# mount -F odm /dev/odm /dev/odm
root@testzone-01:~# ls /dev/odm
cluster ctl fid ktrace stats

If you get an error on the mount such as

root@testzone-01:~# mount -F odm /dev/odm /dev/odm
Not owner: /dev/odm

Then the fs-allow property for the zone is not set to allow for odm filesystem types.

Now you have a working ODM configuration, however /dev/odm will not mount on reboot. This can easily be handled with a Solaris service.
Here I created a service called odm_mount to handle the ODM mounting at boot.  You can download a tarball of the service and install script here.

Here is the installation process

root@testzone:/var/tmp/odm_mount# ./install.sh
copying odm_mount manifest and script into place
importing odm_mount manifest and enabling service
STATE STIME FMRI
online 13:24:32 svc:/system/filesystem/odm_mount:default
root@testzone:/var/tmp/odm_mount# df -h /dev/odm
Filesystem Size Used Available Capacity Mounted on
/dev/odm 0K 0K 0K 0% /dev/odm

Solaris 11.2: Enabling Solaris 11.2 Kernel Zones with VMWare Fusion


Here is a quick trick if you are looking to test out Solaris 11.2 Kernel Zones with Vmware Fusion.
I'm fairly sure that this trick will also work with the other VMWare products.
Out of the box, if you attempt to install a kernel-zone brand zone, you will see the following error:

# zoneadm -z myfirstkz install
Platform does not support the kernel-zone brand.
zoneadm: zone myfirstkz failed to verify

Running virtinfo confirms it:

root@s112test# virtinfo
NAME            CLASS    
vmware          current  
non-global-zone supported

1. First thing is that you need to be running i5/i7 generation processor that will support nested paging.
2. Shutdown your VM and then go into the container/folder for the VM and modify the .vmx file and add the following to the bottom:


vhv.enable = "TRUE"

3. Save the file and then restart your VM
4. Verify Support with virtinfo:


root@s112test# virtinfo
NAME            CLASS    
vmware          current  
non-global-zone supported
kernel-zone     supported

5. If you have accepted the default drive size of 16GB in VMWare Fusion, you will want to add an additional drive and create a new zfs pool for zone as the default rpool size is too small for a kernel zone and the zonecreate will abort during the zone creation.