I recently ran out of disk space on one of my devices, and needed to extend the size of an existing LUN on out EMC Clariion storage array. To extend the LUN on our storage array, I first logged into EMC powerlink and read up on the Clariion’s ability to grow LUNs. The Clariion allows you to create meta LUNs, which are logical RAID (concatenated or striped) devices comprising multiple LUNs. I chose to use a concatenated meta LUN with four members.
Once I conducted a full system backup, I created the meta LUN with Navisphere manager. The meta LUN included my existing LUN and three new members. Once the meta LUN was created, I had to zero the LUN’s VTOC to allow the new disk geometry settings to take effect:
dd if=/dev/zero of=/dev/dsk/c2t1d0s2 bs=512 count=1
Once the VTOC was zero’ed out, I ran format, and installed the new VTOC (which contained the new disk geometry information). You can view the VTOC with the Solaris prtvtoc(1m) utility:
prtvtoc /dev/dsk/c2t1d0s2 |more
* /dev/dsk/c2t1d0s2 partition map
* 512 bytes/sector
* 255 sectors/track
* 16 tracks/cylinder
* 4080 sectors/cylinder
* 57461 cylinders
* 57459 accessible cylinders
Once the new VTOC was in place, I configured partition 0 to span the entire drive, labeled the device with the new partition table, and ran growfs(1m) to grow the file system:
growfs -M /test /dev/rdsk/c2t1d0s0
After growfs completes, you can run the df utility to view the file system size.
I was super paranoid about doing this, and spent three nights reading through the Solaris Kernel Internals UFS chapters to understand how UFS file systems are organized on disk (this change is actually quite simple once you understand how things are organized). All changes similar to this should be tested on non-production systems prior to implementation. Use this information at your own risk!