Solaris Volume Manager (SVM) : Growing RAID 5 metadevices online
In the example shown below, the concat metadevice d80 is configured using the slice c1t3d0s0 of size 1 GB. The high level steps to grow this metadevice are :
1. Umount the file system on the metadevice if any.
2. Increase the size of disk partition being used by metadevice.
3. Recreate the metadevice.
4. Growing the file system.
# metastat d10 d10: Concat/Stripe Size: 2104515 blocks (1.0 GB) === 1gb of size Stripe 0: Device Start Block Dbase Reloc c1t3d0s0 0 No Yes
Increase size of disk partition
We would increase the size of partition 0 on disk c1t3d0 to around 1.5 GB. Check the prtvtoc command output for the increased space :
# prtvtoc /dev/rdsk/c1t3d0s0 * /dev/rdsk/c1t3d0s0 partition map * ....(output truncated for brevity) * * First Sector Last * Partition Tag Flags Sector Count Sector Mount Directory 0 0 00 417690 3148740 3566430 === Size increased to 1.5gb (3148740 sectors) .....
Interestingly, if you see the metastat command output, it would still show the size of metadevice d10 same as previous (1 GB).
Recreate the metadevice
Now, to reflect the change in size for metadevice d10, we have to recreate it. Make sure the file system using this metadevice is un-mounted before recreating the metadevice.
# metaclear -r d10 d10: Concat/Stripe is cleared
# metainit d10 1 1 c1t3d0s0 d10: Concat/Stripe is setup
Verify the chnage in size :
# metastat -c d10 s 1.5GB c1t3d0s0 === 1.5gb of size
Growing the UFS file system
The final step is to increase the file system.
# growfs -M /data /dev/md/rdsk/d80 /dev/md/rdsk/d80: 3148740 sectors in 209 cylinders of 240 tracks, 63 sectors 1537.5MB in 35 cyl groups (6 c/g, 44.30MB/g, 10688 i/g) super-block backups (for fsck -F ufs -o b=#) at: 32, 90816, 181600, 272384, 363168, 453952, 544736, 635520, 726304, 817088, 2269632, 2360416, 2451200, 2541984, 2632768, 2723552, 2814336, 2905120, 2995904, 3086688
Mount the file system and verify the new size of the file system :
# df -h /data Filesystem size used avail capacity Mounted on /dev/md/dsk/d80 1.5G 18M 1.4G 2% /data
Solaris Volume Manager (SVM) : Growing RAID 5 metadevices online