• 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

How to add Additional Storage Space Created from Dynamic LUN Expansion in SVM online

by admin

Most of the storage arrays now-a-days provides the feature of dynamic LUN expansion. This feature allows you to grow your existing volume on the fly without affecting existing data or I/O. Dynamic LUN expansion increases the capacity of the physical storage. You must then make Solaris aware that the device has grown, and if a file system resides on the device, it must also be grown.

Before LUN expansion

1. Here is the disk that was used to create the SVM mwtadevice as seen in the format command output :

# format

< . . . . >

  97. c7t600A0B80002FBC5D00001AC952B3294Cd0 [SUN-LCSM100_F-0670 cyl 51198 alt 2 hd 128 sec 64]  svm-vol
      /scsi_vhci/ssd@g600a0b80002fbc5d00001ac952b3294c

   format> partition
   partition> print
      Part      Tag    Flag     Cylinders         Size            Blocks
        2     backup    wu       0 - 51197      199.99GB    (51198/0/0) 419414016

2. Here is the sequence of commands that originally created the metadevice and UFS file system on this LUN :

# metainit d100 1 1 c7t600A0B80002FBC5D00001AC952B3294Cd0s2
# newfs /dev/md/rdsk/d100
# mkdir /svm-vol
# mount /dev/md/dsk/d100 /svm-vol
# df -k /svm-vol
  Filesystem           kbytes     used   avail     capacity  Mounted on
  /dev/md/dsk/d100     206532277  204809 204262146 1%        /svm-vol

After LUN expansion

In this example, 50GB are added to the existing volume on the storage array. The steps involved in adding the space in SVM are :

1. Delete the metadevice. Doing so has no effect on the data.
2. Expand the disk device.
3. Recreate the metadevice.
4. Mount and grow the file system.

Step 1: Delete the metadevice
Document the metadevice information properly and then delete the metadevice.

# metastat -p d100
    d100 1 1 /dev/dsk/c7t600A0B80002FBC5D00001AC952B3294Cd0s2
# umount /svm-vol
# metaclear d100
    d100: Concat/Stripe is cleared

Step 2 : Expand the disk device

# format c7t600A0B80002FBC5D00001AC952B3294Cd0
     selecting c7t600A0B80002FBC5D00001AC952B3294Cd0: svm-vol
   format> type
     AVAILABLE DRIVE TYPES:
     0. Auto configure
     < . . . . >
   Specify disk type (enter its number)[19]: 0
     c7t600A0B80002FBC5D00001AC952B3294Cd0: configured with capacity of 249.99GB
     [SUN-LCSM100_F-0670 cyl 63998 alt 2 hd 128 sec 64]
   format> partition
   partition> 2
       Enter partition id tag[backup]: [Enter]
       Enter partition permission flags[wu]: [Enter]
       Enter new starting cyl[0]:  (0 was the value prior to the expansion)
       Enter partition size[524271616b, 63998c, 63997e, 255992.00mb, 249.99gb]: $
    partition> label
    Ready to label disk, continue? yes
    partition> quit
    format> quit

Step 3 : Re-create the metadevice

# metainit d100 1 1 /dev/dsk/c7t600A0B80002FBC5D00001AC952B3294Cd0s2
    d100: Concat/Stripe is setup

Step 4 : Mount and grow the file system

# mount /dev/md/dsk/d100 /svm-vol
# growfs -M /svm-vol /dev/md/rdsk/d100
# metastat d100
    d100: Concat/Stripe
    Size: 524271616 blocks (249 GB)
    Stripe 0:
    Device                                             Start Block  Dbase   Reloc
    /dev/dsk/c7t600A0B80002FBC5D00001AC952B3294Cd0s2          0     No      Yes

Verify the df -h output to confirm the filesystem space has increased.

# df -k /svm-vol
    Filesystem            kbytes    used   avail     capacity  Mounted on
    /dev/md/dsk/d100     258167212  256009 255845881    1%     /svm-vol

The LUN on the storage array has been expanded. Additional space has been given to the Solaris disk device. The metadevice has been recreated to pick up the new size. The UFS file system has been grown to take advantage of the added space. The operation is complete.

Filed Under: Solaris, SVM Tagged With: LUN expansion, SVM

Some more articles you might also be interested in …

  1. Solaris 10 patching with SVM : Traditional method (non-live upgrade)
  2. SVM : How to Use Metadevadm to Maintain Device Relocation Information After Disk Replacement
  3. How to add Additional Storage Space Created from Dynamic LUN Expansion in ZFS online
  4. SVM : How to un-encapsulate root disk (SPARC)
  5. SVM root encapsulation and mirroring [SPARC]

You May Also Like

Primary Sidebar

Recent Posts

  • qsub Command Examples in Linux
  • qsub: command not found
  • qrcp Command Examples in Linux
  • qmrestore Command Examples in Linux

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright