Sie sind auf Seite 1von 4

VXVM(veritas volume manager training) 6 of 10 VXVM Volume online Re-layout: In this post we are going to see how to convert

t the volume from one layout to another layout without un-mounting the volume.You can use the vxassist re-layout command to reconfigure the layout of a volume without taking it offline.

Supported re-layout for concatenated volumes 1. Converting a concatenation volume to mirror volume.(mirror-concat)
bash-3.00# vxprint -hvt Disk group: UXDG v uxoravol1 ENABLED ACTIVE 102400 SELECT - fsgen pl uxoravol1-01 uxoravol1 ENABLED ACTIVE 102400 CONCAT RW sd UXDISK1-01 uxoravol1-01 UXDISK1 0 102400 0 disk_0 ENA

Adding the mirror,


# vxassist -g UXDG mirror uxoravol1 &

We can use & or -b option in vxassist to move the task in background We can see active mirror tasks using below commands.
# vxtask list TASKID PTID TYPE/STATE PCT PROGRESS 170 - ATCOPY/R 60.00% 0/102400/61440 PLXATT uxoravol1 uxoravol1-02 UXDG auto-throttled bash-3.00# vxtask monitor 175 - ATCOPY/R 92.00% 0/102400/94208 PLXATT uxoravol1 uxoravol1-02 UXDG auto-throttled 175 - ATCOPY/R 96.00% 0/102400/98304 PLXATT uxoravol1 uxoravol1-02 UXDG auto-throttled 175 - ATCOPY/R 100.00% 0/102400/102400 PLXATT uxoravol1 uxoravol1-02 UXDG auto-throttled

Now you can see second plex has been created.


# vxprint -hvt Disk group: UXDG v uxoravol1 ENABLED ACTIVE 102400 SELECT - fsgen pl uxoravol1-01 uxoravol1 ENABLED ACTIVE 102400 CONCAT RW sd UXDISK1-01 uxoravol1-01 UXDISK1 0 102400 0 disk_0 ENA pl uxoravol1-02 uxoravol1 ENABLED ACTIVE 102400 CONCAT RW sd UXDISK2-01 uxoravol1-02 UXDISK2 0 102400 0 disk_1 ENA

2.Converting concatenate volume to concat-mirror Step:1-Adding the mirror


# vxassist -g UXDG mirror concatv1

i.e concatv1 is volume name Step:2 Converting the volume


# vxassist -g UXDG convert concatv1 layout=concat-mirror # vxprint -hvt Disk group: UXDG v concatv1 - ENABLED ACTIVE 102400 SELECT pl concatv1-03 concatv1 ENABLED ACTIVE 102400 CONCAT sv concatv1-S01 concatv1-03 concatv1-L01 1 102400 0 2/2 v pl sd pl sd concatv1-L01 concatv1-P01 UXDISK1-02 concatv1-P02 UXDISK2-02

fsgen RW ENA

- ENABLED ACTIVE 102400 SELECT fsgen concatv1-L01 ENABLED ACTIVE 102400 CONCAT - RW concatv1-P01 UXDISK1 0 102400 0 disk_0 ENA concatv1-L01 ENABLED ACTIVE 102400 CONCAT - RW concatv1-P02 UXDISK2 0 102400 0 disk_1 ENA

3.Converting concatenate volume to mirror-stripe Step:1-First Re-layout the concatenate volume to mirror-stripe once.
#vxassist -g UXDG relayout concatv1 layout=mirror-stripe # vxprint -hvt v concatv1 - ENABLED ACTIVE 102400 SELECT concatv1-01 fsgen pl concatv1-01 concatv1 ENABLED ACTIVE 102400 STRIPE 2/128 RW sv concatv1-Ds01 concatv1-01 concatv1-d01 1 51200 0/0 2/2 ENA sv concatv1-Ds02 concatv1-01 concatv1-d02 1 51200 1/0 2/2 ENA v pl sd pl sd v pl sd pl sd concatv1-d01 - ENABLED ACTIVE 51200 SELECT - fsgen concatv1-dp01 concatv1-d01 ENABLED ACTIVE 51200 CONCAT - RW UXDISK1-02 concatv1-dp01 UXDISK1 0 51200 0 disk_0 ENA concatv1-dp02 concatv1-d01 ENABLED ACTIVE 51200 CONCAT - RW UXDISK3-01 concatv1-dp02 UXDISK3 0 51200 0 disk_4 ENA concatv1-d02 - ENABLED ACTIVE 51200 SELECT fsgen concatv1-dp03 concatv1-d02 ENABLED ACTIVE 51200 CONCAT UXDISK2-01 concatv1-dp03 UXDISK2 0 51200 0 disk_1 concatv1-dp04 concatv1-d02 ENABLED ACTIVE 51200 CONCAT UXDISK4-01 concatv1-dp04 UXDISK4 0 51200 0 disk_5 RW ENA RW ENA

Step:2- Once the convert has been done,then use vxassist convert to convert the volume to mirror-stripe.
# vxassist -g UXDG convert concatv1 layout=mirror-stripe bash-3.00# vxprint -hvt Disk group: UXDG v concatv1 - ENABLED ACTIVE 102400 SELECT - fsgen pl concatv1-02 concatv1 ENABLED ACTIVE 102400 STRIPE 2/128 sd UXDISK1-01 concatv1-02 UXDISK1 0 51200 0/0 disk_0 sd UXDISK2-02 concatv1-02 UXDISK2 0 51200 1/0 disk_1 pl concatv1-03 concatv1 ENABLED ACTIVE 102400 STRIPE 2/128 sd UXDISK3-02 concatv1-03 UXDISK3 0 51200 0/0 disk_4 sd UXDISK4-02 concatv1-03 UXDISK4 0 51200 1/0 disk_5

RW ENA ENA RW ENA ENA

4.Converting concatenate volume to raid5 Here using vxassist re-layout command, we are converting existing concatenate volume to raid5
# vxassist -g UXDG relayout concatv1 layout=raid5

You can check task status ,using the below command.


# vxtask list TASKID PTID TYPE/STATE PCT PROGRESS 182 RELAYOUT/R 49.97% 0/204800/102336 # vxtask monitor TASKID PTID TYPE/STATE PCT PROGRESS 182 - RELAYOUT/R 57.97% 0/204800/118720 182 - RELAYOUT/R 58.97% 0/204800/120768 182 - RELAYOUT/R 59.97% 0/204800/122816

RELAYOUT concatv1 UXDG RELAYOUT concatv1 UXDG RELAYOUT concatv1 UXDG RELAYOUT concatv1 UXDG

You can see volume has been converted to Raid5.


bash-3.00# vxprint -hvt Disk group: UXDG v concatv1 - ENABLED ACTIVE 102400 RAID raid5 pl concatv1-Dp02 concatv1 ENABLED LOG 2880 CONCAT RW sd UXDISK2-02 concatv1-Dp02 UXDISK2 51200 2880 0 disk_1 ENA pl concatv1-01 concatv1 ENABLED ACTIVE 102400 RAID 3/32 RW sd UXDISK1-03 concatv1-01 UXDISK1 0 51200 0/0 disk_0 ENA sd UXDISK2-03 concatv1-01 UXDISK2 0 51200 1/0 disk_1 ENA sd UXDISK3-02 concatv1-01 UXDISK3 0 51200 2/0 disk_4 ENA

5.Converting concatenate volume to stripe: Here using vxassist re-layout command, we are converting existing concatenate volume to stripe.
#vxassist -g UXDG relayout concatv1 layout=stripe bash-3.00# vxprint -hvt Disk group: UXDG v concatv1 - ENABLED ACTIVE 102400 SELECT concatv1-01 fsgen pl concatv1-01 concatv1 ENABLED ACTIVE 102400 STRIPE 2/128 RW sd UXDISK0-02 concatv1-01 UXDISK0 0 51200 0/0 disk_0 ENA sd UXDISK1-01 concatv1-01 UXDISK1 0 51200 1/0 disk_1 ENA

6.Converting concatenate volume to stripe-mirror: Here using vxassist re-layout command, we are converting existing concatenate volume to stripe-mirror.
# vxassist -g UXDG relayout concatv1 layout=stripe-mirror bash-3.00# vxprint -hvt Disk group: UXDG v concatv1 - ENABLED ACTIVE 102400 SELECT concatv1-01 fsgen pl concatv1-01 concatv1 ENABLED ACTIVE 102400 STRIPE 2/128 RW sv concatv1-Ds01 concatv1-01 concatv1-d01 1 51200 0/0 2/2 ENA sv concatv1-Ds02 concatv1-01 concatv1-d02 1 51200 1/0 2/2 ENA v pl sd pl sd v concatv1-d01 - ENABLED ACTIVE 51200 SELECT - fsgen concatv1-dp01 concatv1-d01 ENABLED ACTIVE 51200 CONCAT UXDISK0-02 concatv1-dp01 UXDISK0 0 51200 0 disk_0 ENA concatv1-dp02 concatv1-d01 ENABLED ACTIVE 51200 CONCAT UXDISK2-01 concatv1-dp02 UXDISK2 0 51200 0 disk_4 ENA concatv1-d02 ENABLED ACTIVE 51200 SELECT fsgen RW RW

pl sd pl sd

concatv1-dp03 concatv1-d02 ENABLED ACTIVE 51200 CONCAT UXDISK1-01 concatv1-dp03 UXDISK1 0 51200 0 disk_1 ENA concatv1-dp04 concatv1-d02 ENABLED ACTIVE 51200 CONCAT UXDISK3-01 concatv1-dp04 UXDISK3 0 51200 0 disk_5 ENA

RW RW

Coveting mirrored volume to concatenate volume: To convert the volume from mirror to concatenation,just remove the mirror. In otherwords,delete one of the plex from volume.
bash-3.00# vxprint -hvt Disk group: UXDG v uxoravol1 ENABLED ACTIVE 102400 SELECT - fsgen pl uxoravol1-01 uxoravol1 ENABLED ACTIVE 102400 CONCAT RW sd UXDISK1-01 uxoravol1-01 UXDISK1 0 102400 0 disk_0 ENA pl uxoravol1-02 uxoravol1 ENABLED ACTIVE 102400 CONCAT RW sd UXDISK2-01 uxoravol1-02 UXDISK2 0 102400 0 disk_1 ENA

Method:1 Trying to delete the plex uxoravol1-02 ,


bash-3.00# vxedit -g UXDG -rf rm uxvol2-02 VxVM vxedit ERRORV-5-1-818 Plex uxvol2-02 is associated,cannot remove

Since the plex is attached to the volume, you cant delete it.First disassociate from the volume using the below command.
# vxplex -g UXDG dis uxvol2-02

Deleting the disassociated plex,


# vxedit -g UXDG -rf rm uxvol2-02

Method:2 In other way you can delete the plex using single command,
# vxplex -g UXDG -o rm dis uxvol2-02 # vxprint -hvt Disk group: UXDG v uxoravol1 ENABLED ACTIVE 102400 SELECT - fsgen pl uxoravol1-01 uxoravol1 ENABLED ACTIVE 102400 CONCAT RW sd UXDISK1-01 uxoravol1-01 UXDISK1 0 102400 0 disk_0 ENA bash-3.00# df -h /uxvol2 Filesystem size used avail capacity Mounted on /dev/vx/dsk/UXDG/uxvol2 50M 3.1M 44M 7% /uxvol2

Command Syntax: # vxassist [-b] [-g diskgroup] relayout volume [layout=layout] \ [relayout_options] To monitor the relayout status:
# vxrelayout status volume

In similar way you can covert other existing volume layouts to new volume layout. Refer storage foundation admin guide to find Permitted relayout transformations.