• 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 RAID 5 metadevices online

by admin

Solaris Volume Manager (SVM) : Growing mirrored metadevices online
Solaris Volume Manager (SVM) : Growing concat metadevice

In the example below, we have a 3 column RAID5 metadevice d10 [ size – 1GB ] with 3 disks – c5t23d0s1, c5t24d0s1, c5t25d0s1. The high level steps to grow the RAID 5 metadevice d10 are :

1. Attaching a new disk to the RAID 5 metadevice as a concatenated device.
2. Growing the file system online.

Once we have done growing the RAID 5 metadevice, we would still have a 3 column stripe, but across 4 disks.

Growing RAID 5 SVM metadevice

We start off with a 3 disk (3 column) RAID 5 metadevice.

# metastat d10
   d10: RAID
     State: Okay
     Interlace: 32 blocks
     Size: 4161536 blocks (2.0 GB)
   Original device:
     Size: 4193600 blocks (2.0 GB)
         Device      Start Block  Dbase        State Reloc  Hot Spare
         c5t23d0s1        330        No         Okay   Yes
         c5t24d0s1        330        No         Okay   Yes
         c5t25d0s1        330        No         Okay   Yes
# df -k /data
   Filesystem          kbytes     used         avail   capacity  Mounted on
   /dev/md/dsk/d10      2017455    1904833    10883     96%     /data

Growing the metadevice

First thing is to partition the new disk similar to other disks in the d10 metadevice :

# prtvtoc /dev/rdsk/c5t25d0s2 | fmthard -s - /dev/rdsk/c5t26d0s2
  fmthard:  New volume table of contents now in place.

Now we can grow the metadevice d10 by attaching this new disk to it :

# metattach d10 c5t26d0s1
   d10: component is attached

Check for the new metastat output. You can see the newly attached concatenated device at the end.

# metastat d10
   d10: RAID
      State: Okay
      Interlace: 32 blocks
      Size: 6258688 blocks (3.0 GB)
   Original device:
      Size: 4193600 blocks (2.0 GB)
          Device      Start Block  Dbase        State Reloc  Hot Spare
          c5t23d0s1        330        No         Okay   Yes
          c5t24d0s1        330        No         Okay   Yes
          c5t25d0s1        330        No         Okay   Yes
   Concatenated Devices:
      Size: 2096800 blocks (1023 MB)
          Device      Start Block  Dbase State        Reloc Hot Spare
          c5t26d0s1        330        No         Okay   Yes

Growing the file system

Now we can grow the file system. Note that file system is write locked until grow completes (reads are allowed).

# growfs -M /data /dev/md/rdsk/d10
   /dev/md/rdsk/d10:  6258688 sectors in 191 cylinders of 128 tracks, 256 sectors
  3056.0MB in 64 cyl groups (3 c/g, 48.00MB/g, 11648 i/g)
   super-block backups (for fsck -F ufs -o b=#) at:
   32......................6209312

Verify the file system size in the df -h output.

# df -k /data
   Filesystem           kbytes       used      avail     capacity  Mounted on
   /dev/md/dsk/d10      3035199    1904833     1130366     67%     /data
Solaris Volume Manager (SVM) : Growing mirrored metadevices online
Solaris Volume Manager (SVM) : Growing concat metadevice

Filed Under: SVM

Some more articles you might also be interested in …

  1. The ultimate Solaris Volume Manager (SVM) interview questions
  2. SVM : How to set boot device at OBP for mirrored root disk
  3. How to add Additional Storage Space Created from Dynamic LUN Expansion in SVM online
  4. Solaris Volume Manager (SVM) : Understanding metadb Flags
  5. How to replace failed root disk under Solaris Volume Manager (SVM)
  6. SVM root encapsulation and mirroring [SPARC]
  7. Solaris 10 patching with SVM : Traditional method (non-live upgrade)
  8. Solaris Volume Manager (SVM) : Growing mirrored metadevices online
  9. SVM : How to Use Metadevadm to Maintain Device Relocation Information After Disk Replacement
  10. Solaris Volume Manager (SVM) : How to Use Mirrors to Roll Back System Changes

You May Also Like

Primary Sidebar

Recent Posts

  • vgextend Command Examples in Linux
  • setpci command – configure PCI device
  • db_load command – generate db database
  • bsdtar command – Read and write tape archive files

© 2022 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright