• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

Solaris Volume Manager (SVM) : Growing concat metadevice

by admin

Solaris Volume Manager (SVM) : Growing mirrored metadevices online
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.

SVM concat metadevice resize

The resizing operation is offline and has to be done umounting 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.

The deletion of metadevice does NOT destroy data on the partition. So when you recreate the metadevice using the same partition, you get all your data intact. And off course there is no need to create new file system on this 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 mirrored metadevices online
Solaris Volume Manager (SVM) : Growing RAID 5 metadevices online

Filed Under: SVM

Some more articles you might also be interested in …

  1. Solaris Volume Manager (SVM) : Understanding metadb Flags
  2. SVM : How to un-encapsulate root disk (SPARC)
  3. Solaris Volume Manager (SVM) : How to Use Mirrors to Roll Back System Changes
  4. Solaris Volume Manager (SVM) command line reference (Cheat Sheet)
  5. Solaris Volume Manager (SVM) : Growing mirrored metadevices online
  6. How to replace failed root disk under Solaris Volume Manager (SVM)
  7. SVM : How to set boot device at OBP for mirrored root disk
  8. SVM : How to Use Metadevadm to Maintain Device Relocation Information After Disk Replacement
  9. SVM – How to create Soft Partitions
  10. How to add Additional Storage Space Created from Dynamic LUN Expansion in SVM online

You May Also Like

Primary Sidebar

Recent Posts

  • fprintd-delete Command Examples in Linux
  • fprintd-delete: command not found
  • foreman: command not found
  • foreman Command Examples in Linux

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright