Search This Blog

Saturday, April 12, 2014

Extending Mirror-Concat Volume in Veritas Volume Manager



File System Size before FS Extension:
#bdf /test_mnt
Filesystem          kbytes    used   avail %used Mounted on
/dev/vx/dsk/testdg/testvol
                   4159488   17768 4109376    0% /test_mnt

Checking the Layout of the volume:

#vxprint -htg testdg -v testvol
V  NAME         RVG/VSET/CO  KSTATE   STATE    LENGTH   READPOL   PREFPLEX UTYPE
PL NAME         VOLUME       KSTATE   STATE    LENGTH   LAYOUT    NCOL/WID MODE
SD NAME         PLEX         DISK     DISKOFFS LENGTH   [COL/]OFF DEVICE   MODE
SV NAME         PLEX         VOLNAME  NVOLLAYR LENGTH   [COL/]OFF AM/NM    MODE
SC NAME         PLEX         CACHE    DISKOFFS LENGTH   [COL/]OFF DEVICE   MODE
DC NAME         PARENTVOL    LOGVOL
SP NAME         SNAPVOL      DCO
EX NAME         ASSOC        VC                       PERMS    MODE     STATE

v  testvol      -            ENABLED  ACTIVE   4159488  SELECT    -        fsgen
pl testvol-01   testvol      ENABLED  ACTIVE   4159488  CONCAT    -        RW
sd testdg01_4g-01 testvol-01 testdg01_4g 0     4159488  0         apevmx11_0398 ENA
pl testvol-02   testvol      ENABLED  ACTIVE   4159488  CONCAT    -        RW
sd testdg01_4gm-01 testvol-02 testdg01_4gm 0   4159488  0         apevmx12_0398 ENA


The Above Volume is mirror-concat Volume

Extending the volume by: 4G
Initializing a disk:
# vxdisksetup -i apevmx11_070c
# vxdisksetup -i apevmx12_07b5

Adding the disk to the diskgroup:

# vxdg -g testdg adddisk testdg02_4g=apevmx11_070c
# vxdg -g testdg adddisk testdg02_4gm=apevmx12_07b5


Checking the free space available with the given disk:
#vxassist -g testdg maxgrow testvol layout=mirror-concat alloc=testdg02_4g testdg02_4gm
Volume testvol can be extended by 4156416 to: 8315904 (8121Mb)

The above output says that the volume could be max extended by 4156416s, and after increase of this volume by 4156416s, the final size would be 8121Mb or 8315904s

Resizing the Volume
#/etc/vx/bin/vxresize -g testdg -F vxfs testvol +4156416s alloc=testdg02_4g testdg02_4gm

Checking the Layout of the volume:
#vxprint -htg testdg -v testvol
V  NAME         RVG/VSET/CO  KSTATE   STATE    LENGTH   READPOL   PREFPLEX UTYPE
PL NAME         VOLUME       KSTATE   STATE    LENGTH   LAYOUT    NCOL/WID MODE
SD NAME         PLEX         DISK     DISKOFFS LENGTH   [COL/]OFF DEVICE   MODE
SV NAME         PLEX         VOLNAME  NVOLLAYR LENGTH   [COL/]OFF AM/NM    MODE
SC NAME         PLEX         CACHE    DISKOFFS LENGTH   [COL/]OFF DEVICE   MODE
DC NAME         PARENTVOL    LOGVOL
SP NAME         SNAPVOL      DCO
EX NAME         ASSOC        VC                       PERMS    MODE     STATE

v  testvol      -            ENABLED  ACTIVE   8315904  SELECT    -        fsgen
pl testvol-01   testvol      ENABLED  ACTIVE   8315904  CONCAT    -        RW
sd testdg01_4g-01 testvol-01 testdg01_4g 0     4159488  0         apevmx11_0398 ENA
sd testdg02_4g-01 testvol-01 testdg02_4g 0     4156416  4159488   apevmx11_070c ENA
pl testvol-02   testvol      ENABLED  ACTIVE   8315904  CONCAT    -        RW
sd testdg01_4gm-01 testvol-02 testdg01_4gm 0   4159488  0         apevmx12_0398 ENA
sd testdg02_4gm-01 testvol-02 testdg02_4gm 0   4156416  4159488   apevmx12_07b5 ENA

File System Size after FS Increase
#bdf /test_mnt
Filesystem          kbytes    used   avail %used Mounted on
/dev/vx/dsk/testdg/testvol
                   8315904   17896 8233192    0% /test_mnt

No comments:

Post a Comment