By Lewis Thompson on Sep 05, 2007
I recently had a customer contact the Solutions Centre requesting a procedure to grow a Solaris Volume Manager (previously known as Solstice DiskSuite) RAID1 mirror using an old, unwanted volume.
In order to answer the customer's question authoritatively I turned to Sun's extensive 'Global Labs', where I booked a suitable host and installed the same version of Solaris as the customer. In this circumstance the global lab I picked was actually in the same building as me, but the procedure was done remotely using the lab tools. For all intents and purposes, the system could very well have been in the global lab in Singapore.
With Solaris installed I quickly duplicated the customer's configuration. He was using two disks in his mirror, giving him good redundancy:
d10 (RAID 1 mirror, 20GB; mounted on /export/home)
|- d11 (c1t0d0s0, 20GB)
\\- d12 (c2t0d0s0, 20GB)
d20 (RAID 1 mirror, 30GB; mounted on /export/backup)
|- d21 (c1t0d0s1, 30GB)
\\- d22 (c2t0d0s1, 30GB)
In this example, the customer is now using a remote host for backup, so the d20 metadevice is no longer being used. He wanted to grow d10 by the capacity of d20.
The following simple steps achieve this with 0% downtime. It is not even necessary to unmount the volume that is being grown:
- Take a backup of /export/home. Verify this backup.
- Unmount d20:
- Remove all references to the d20 mirror and all sub-mirrors with metaclear. In this step the -r flag indicates that d20, d21 and d22 will be removed:
- Attach the slices previously used in the d20 mirror to each of the d10 sub-mirrors:
- Tell d10 that the sub-mirrors have changed and that the size of the metadevice has changed:
- Finally, we need to use growfs to grow the UFS filesystem that lives on the d10 metadevice:
# umount /export/backup
# metaclear -r d20
# metattach d11 c1t0d0s1
# metattach d12 c2t0d0s1
# metattach d10
# growfs -M /export/home /dev/md/rdsk/d10
Hopefully this simple six-step procedure will be of use to those new to Volume Manager.