This article will give you a step by step guide on how to configure a DLE with VeritasVM on Sun Solaris. In a recent scenario for one of our clients, it was imperative that we manage this via DLE, rather than spanning an existing disk group with another LUN. It is always a good idea to perform and sucessfully execute a test first. In our findings, this is what we came up the second time around (Our first test, well, was rather interesting – When it comes to DLE, you must execute it with the VX tools, traditional Solaris volume managing will DESTROY the volume groups). The key thing to understand when expanding a diskgroup that only has 1 diskgroup, is that you need a temporary diskgroup before you can resize successfully. That is what this article will cover.
First things first, you need to unmount and deport your disk group before having the expansion done on the SAN:
root@solaris [/] # umount /p01 root@solaris [/] # vxdg deport oraproddg root@solaris [/] # vxdisk list DEVICE TYPE DISK GROUP STATUS c2t54d0s2 auto:cdsdisk - - online c2t54d1s2 auto:cdsdisk archlogsdg01 archlogsdg online c2t54d2s2 auto:cdsdisk oraproddbdg01 oraproddbdg online root@solaris [/] # vxdisk -o alldgs list DEVICE TYPE DISK GROUP STATUS c2t54d0s2 auto:cdsdisk - (oraproddg) online c2t54d1s2 auto:cdsdisk archlogsdg01 archlogsdg online c2t54d2s2 auto:cdsdisk oraproddbdg01 oraproddbdg online
Above you can see the disk group removed from the first vxdisk list
. The second command appends -o alldgs
, which shows you all disk groups deported or exported – very handy.
At this point, we waited for our SAN engineer to expand the volume on the device itself and represent it back to us.
NOTE: IN ORDER TO DO A DLE, YOU NEED ANOTHER DISK/LUN IN THE DISK GROUP YOU WANT TO EXPAND. THIS IS NEEDED FOR RESIZING ONLY! IT CAN THEN BE REMOVED/DESTROYED.
After our first test, we realized we needed another disk/lun presented so we could add it to the disk group. Our SAN engineer then presented LUN0 with added space, and a NEW TEMPORARY LUN (LUN5) for expanding LUN0.
Once it’s presented, do the usual devfsadm -vC
, cfgadm -al
, and vxdctl enable
. Make sure that after you format/label the temporary LUN, that you vxdisk scandisks
. this should prompt it from going to error to online invalid. Finish up by initializing the new temporary LUN (vxdisksetup -i
). Here’s a list of the commands I executed to get the new LUN up and added to the oraproddg.
root@solaris [/] # vxdisk list DEVICE TYPE DISK GROUP STATUS c2t54d0s2 auto:cdsdisk oraproddg01 oraproddg online c2t54d1s2 auto:cdsdisk archlogsdg01 archlogsdg online c2t54d2s2 auto:cdsdisk oraproddbdg01 oraproddbdg online c2t54d5s2 auto - - error root@solaris [/] # format Searching for disks...done AVAILABLE DISK SELECTIONS: [trimmed] 9. c2t54d5/pci@7c0/pci@0/pci@8/SUNW,emlxs@0/fp@0,0/ssd@w50060e80141a5051,5 Specify disk (enter its number): 9 selecting c2t54d5 [disk formatted] format> label Ready to label disk, continue? y format> quit root@solaris [/] # vxdisk scandisks root@solaris [/] # vxdisk list DEVICE TYPE DISK GROUP STATUS c2t54d0s2 auto:cdsdisk oraproddg01 oraproddg online c2t54d1s2 auto:cdsdisk archlogsdg01 archlogsdg online c2t54d2s2 auto:cdsdisk oraproddbdg01 oraproddbdg online c2t54d5s2 auto:none - - online invalid root@solaris [/] # vxdisksetup -i c2t54d5 root@solaris [/] # vxdisk list DEVICE TYPE DISK GROUP STATUS c2t54d0s2 auto:cdsdisk oraproddg01 oraproddg online c2t54d1s2 auto:cdsdisk archlogsdg01 archlogsdg online c2t54d2s2 auto:cdsdisk oraproddbdg01 oraproddbdg online c2t54d5s2 auto:cdsdisk - - online root@solaris [/] # vxdg -g oraproddg adddisk temp=c2t54d5s2 root@solaris [/] # vxdisk list DEVICE TYPE DISK GROUP STATUS c2t54d0s2 auto:cdsdisk oraproddg01 oraproddg online c2t54d1s2 auto:cdsdisk archlogsdg01 archlogsdg online c2t54d2s2 auto:cdsdisk oraproddbdg01 oraproddbdg online c2t54d5s2 auto:cdsdisk temp oraproddg online
Now that the temporary LUN is assigned to the main diskgroup (temp->oraproddg), you can run the resize commands and remove the temp diskgroup:
root@solaris [/] # vxdisk -g oraproddg resize c2t54d0s2 root@solaris [/] # vxdg -g oraproddg rmdisk temp root@solaris [/] # vxdisk list DEVICE TYPE DISK GROUP STATUS c2t54d0s2 auto:cdsdisk oraproddg01 oraproddg online c2t54d1s2 auto:cdsdisk archlogsdg01 archlogsdg online c2t54d2s2 auto:cdsdisk oraproddbdg01 oraproddbdg online c2t54d5s2 auto:cdsdisk - - online
Before removing the temporary LUN, I like to finish up the rest of the resizing process. Next we want to run vxprint -g oraproddg -htr
to obatain the new size of the volume group.
root@solaris [/] # vxprint -g oraproddg -htr [trimmed] dg oraproddg default default 17000 1208985048.25.solaris dm oraproddg01 c2t54d0s2 auto 65536 291551488 - v volp01 - DISABLED ACTIVE 209627136 SELECT - fsgen pl volp01-01 volp01 DISABLED ACTIVE 209627136 CONCAT - RW sd oraproddg01-01 volp01-01 oraproddg01 0 209627136 0 c2t54d0 ENA
Here you can see the difference from the DM (291551488) and the V (209627136). It’s best to use vxassist
to get the correct block value for expanding. (Also, make sure your volumes are started if you haven’t done so already):
root@solaris [/] # vxvol -g oraproddg startall root@solaris [/] # vxassist -g oraproddg maxgrow volp01 Volume volp01 can be extended by 81924096 to: 291551232 (142359Mb) root@solaris [/] # vxassist -g oraproddg growto volp01 291551232 root@solaris [/] # vxprint -g oraproddg -htr [trimmed] dg oraproddg default default 17000 1208985048.25.solaris dm oraproddg01 c2t54d0s2 auto 65536 291551488 - v volp01 - ENABLED ACTIVE 291551232 SELECT - fsgen pl volp01-01 volp01 ENABLED ACTIVE 291551232 CONCAT - RW sd oraproddg01-01 volp01-01 oraproddg01 0 291551232 0 c2t54d0 ENA
You can now see that veritas sees the filesystem growth… last step is we need to mount the volume, and grow it on the solaris side:
root@solaris [/] # mount -F vxfs /dev/vx/dsk/oraproddg/volp01 /p01 root@solaris [/] # fsadm -b 291551232 /p01 (Note: The blocksize specified here is exactly the same as the total value used with vxassist growto!)
Lastly, let’s remove our temporary LUN…
root@solaris [/] # vxdisk rm c2t54d5s2 root@solaris [/] # vxdisk list DEVICE TYPE DISK GROUP STATUS c2t54d0s2 auto:cdsdisk oraproddg01 oraproddg online c2t54d1s2 auto:cdsdisk archlogsdg01 archlogsdg online c2t54d2s2 auto:cdsdisk oraproddbdg01 oraproddbdg online
Now that we’re all cleaned up… check the data! Everything should be good to go. 🙂