Dynamic LUN expansion in Veritas Volume Manager on Solaris OS

In gurkulindia.com under Storage Configuration section, we have already discussed many examples on how to expand a filesystem using the new Storage LUNs allocated to a server. There are situations, that storage team sometimes just expands the already assigned LUN to the extra size ( provided that that the storage array supporting the operations, while preserving the existing data safe), and then the system admins have to make the operating system and VERITAS VOLUME MANAGER  know about new size and expand the existing filesystem to new size.

Before VxSF 4.0 , this task used to be a backup and restore ( backup the data, reconfigure the LUN , expand the volume and Filesystem and then restore the data). But Starting from VxSF 4.0 we have an option to perform Dynamic LUN expansion. Here I will be giving the procedure for online Dynamic LUN Expansion(DLE) of  storage LUN in veritas.

Note: If you are doing this operation very first time, please take the entire data backup of the filesystem.

Before Proceeding for DLE collect the below output:

In this scenario we have volume vol01 made up on a disk  c1t1d0s2 using the entire disk space (i.e. approx 10GB):

# vxdisk list
DEVICE       TYPE            DISK         GROUP        STATUS
c1t1d0s2     auto:cdsdisk    disk01       newdg        online
c1t2d0s2     auto:cdsdisk    disk02       newdg        online
c1t3d0s2     auto:cdsdisk    disk03       newdg        online

# vxprint -ht

dm disk01       c1t1d0s2      auto     2048     20965120
dm disk02       c1t2d0s2      auto     2048     428530240 –
dm disk03       c1t3d0s2      auto     2048     428530240 –

v  vol01        –            ENABLED  ACTIVE   20965120 SELECT    –        fsgen
pl vol01-01     vol01        ENABLED  ACTIVE   20965120 CONCAT    –        RW
sd disk01-01    vol01-01     disk01   0        20965120 0         c1t1d0   ENA

# prtvtoc /dev/rdsk/c1t1d0s2

*                          First      Sector    Last
* Partition  Tag  Flags    Sector     Count     Sector    Mount Directory
       2      5    01          0      20967424  20967423
       7     15    01          0      20967424  20967423

From Storage Array side the LUN was dynamically expanded to 20GB. And out task to expand the volume Vol01 to the 20GB.

In the below procedure  we are leaving the disk  remain in the disk group, and the volumes can remain mounted. And remember that,  after the LUN has been grown on the array, nothing on the host will appear different; the format command and the prtvtoc command will both show the old (10Gb) size, as will the vxprint -ht command

to let Solaris and VxVM to recognize new LUN size we have to run the below command

# vxdisk resize c1t1d0s2

This command queries the LUN to determine the new size and then updates the disk’s label as well as the data structures in the VxVM private region on the disk to reflect the new size.

At this point, we can rerun commands we ran before and see the differences:

# vxprint -ht

dm disk01       c1t1d0s2      auto     2048     41936640
dm disk02       c1t2d0s2      auto     2048     428530240 –
dm disk03       c1t3d0s2      auto     2048     428530240 –

v  vol01        –            ENABLED  ACTIVE   20965120 SELECT    –        fsgen
pl vol01-01     vol01        ENABLED  ACTIVE   20965120 CONCAT    –        RW
sd disk01-01    vol01-01     disk01   0        20965120 0         c1t1d0   ENA

# prtvtoc /dev/rdsk/c1t1d0s2

*                          First     Sector    Last
* Partition  Tag  Flags    Sector    Count     Sector    Mount Directory
       2      5    01          0     41938944  41938943
       7     15    01          0     41938944  41938943

The disk label is now showing its new size (20 Gb, 41938944 sectors) and vxprint -ht is now showing disk01 with a larger public region (41936640 sectors). The volume vol01 has NOT been grown. To resize the vol01 to new size we have to use below command.

# /etc/vx/bin/vxresize -g mydg -F vxfs vol01 +10G

Now you can see that new volume information was increased to 20Gb, from vxprint -ht output

 

Additional information about DLE :

The vxdisk resize command can update the VTOC of the disk automatically. It is not required to run the format command to change the length of partition 2 of the disk in advance.

A disk group must have at least two disks to perform the DLE operation because, during the DLE operation, the disk will be temporarily removed from the disk group, and it is not possible to remove the last disk from a disk group. If there is only one disk in the disk group, vxdisk resize fails with the following command:

VxVM vxdisk ERROR V-5-1-8643 Device  Disk_xxx : resize failed: Cannot remove last disk in disk group


 

 

 

 

Ramdev

Ramdev

I have started unixadminschool.com ( aka gurkulindia.com) in 2009 as my own personal reference blog, and later sometime i have realized that my leanings might be helpful for other unixadmins if I manage my knowledge-base in more user friendly format. And the result is today's' unixadminschool.com. You can connect me at - https://www.linkedin.com/in/unixadminschool/

2 Responses

  1. Maniswara Pavan says:

    Nice Post ……

  1. September 18, 2015

    […] Read – Dynamic LUN expansion in Veritas Volume Manager on Solaris OS […]

What is in your mind, about this post ? Leave a Reply

Close
  Our next learning article is ready, subscribe it in your email

What is your Learning Goal for Next Six Months ? Talk to us