No Time For Narrative – Solaris 11 Express ZFS and NFS share to VMWare ESXi 4.1u1

Welcome to my scratchpad. See links for some excellent write ups.

This article is based on Solaris 11 Express and VMWare ESXi 4.1.

Step 0: Build your hardware and install Solaris.

HCL: http://www.oracle.com/webfolder/technetwork/hcl/index.html

Step 1: Mirror the rpool

zpool status #figure out what’s already allocated

cfgadm -s "select=type(disk)" #list disks

fdisk -W - [rootdisk2] #check

fdisk -B [rootdisk2] #apply a default Solaris partition to the disk

fdisk -W - [rootdisk2] #check again

prtvtoc /dev/rdsk/[rootdisk1] | fmthard -s - /dev/rdsk/[rootdisk2] #slice and dice! You must define slices for rpools, so this step mirrors the original disk’s slice-age to the second root disk

zpool attach -f rpool [rootdisk1] [rootdisk2] #attach, not add. Attach = mirror. Add = stripe.

zpool status #check

installgrub /boot/grub/stage1 /boot/grub/stage2 /dev/rdsk/[rootdisk2] #install grub onto second boot disk

zpool status #check again

see: http://constantin.glez.de/blog/2011/03/how-set-zfs-root-pool-mirror-oracle-solaris-11-express

For more on rpool manipulation, namely on how to shrink an rpool, see: http://blogs.oracle.com/mock/entry/how_to_shrink_a_mirrored

Step 2: Configure networking

ifconfig -a #cheat and take advantage of nwam’s device lists

svcadm disable network/physical:nwam #disable nwam

svcadm enable network/physical:default #then enable the default config tools

ipadm create-if e1000g0 #or whatever your nic is

ipadm show-if #check

ipadm create-addr -T static -a mg.mt.ip.addy/prefix e1000g0/v4 #create the address

ipadm show-addr #confirm

#link aggregate group (LACP)

dladm create-aggr -l [nic2] -l [nic 3] #create link aggregate group:

Then the same ipadm commands

ipadm create-if aggr1 #configure aggr1 for persistence

ipadm show-if #confirm it was added, should show down.

ipadm create-addr -T static -a 1.2.3.4/24 aggr1/v4 #create the address

ipadm show-addr #confirm it was added, show-if should now show “OK”

netstat -rn #check routing tables

route -p add default 1.2.3.1 #add persistent default route

vi /etc/resolv.conf #configure nameservers

vi /etc/hosts #configure name

vi /etc/nsswitch.conf #enable dns lookups for “hosts” line

svcsadm restart ssh #restart ssh after modifying networking

ping 4.2.2.1 #ping Level3′s DNS resolvers to confirm routing

reboot #reboot to confirm persistency

Step 3: Do your AD thing. I know you love it.

read this: http://blog.scottlowe.org/2006/08/15/solaris-10-and-active-directory-integration/

also: http://download.oracle.com/docs/cd/E19963-01/html/821-1449/index.html

Step 4: Configure ZFS

format #to present list of disks. exit out, leaving the list in screen buffer

or: cfgadm -s "select=type(disk)"

zpool create tank mirror c7t0d0 c7t1d0 mirror c7t2d0 c7t3d0 cache c7t4d0 #create your main zpool. This is 4 drives in raid 10 and a read cache. use “log c#t#d#” to add a ZIL device

zfs set dedup=on tank #enable dedup

zfs set compression=on tank #enable compression.

Note that changes made to the pool will apply to its children when they are created.

zfs create tank/VMOS #create your ESXi share

zfs set sharenfs=none,nosuid,root=1.2.3.xx:1.2.3.xy tank/VMOS #share with 1.2.3.xx and 1.2.3.xy

From esxi 4.1:

esxcfg-nas -a -o IP.Or.Host.Name -s /tank/VMOS [esxiDatastoreName]# http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1005057

ZFS /Solaris links

http://lildude.co.uk/zfs-cheatsheet

http://download.oracle.com/docs/cd/E19963-01/index.html

iSCSI - Solaris 11 = use COMSTAR.

http://wikis.sun.com/display/OpenSolarisInfo200906/Configuring+an+iSCSI+Storage+Array+With+COMSTAR+%28Task+Map%29

Tags: , , , , ,

Leave a Reply

XHTML: You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>