How to Move and Unrelocate subdisks using vxassist

book

Article ID: 100016346

calendar_today

Updated On:

Resolution

It is possible to move or unrelocate subdisk/s from one disk to a different disk as long as the destination disk has sufficient space to accommodate the move. One possible option to accomplish this is by using the vxassist command.

Below you will find an example of how to move & unrelocate subdisks usingvxassist.

1.  Here I have a diskgroup called "testdg" with threedisks.

# vxdisk list
DEVICE      TYPE      DISK        GROUP        STATUS
c0t0d0s2    sliced    rootdisk     rootdg      online
c1t4d0s2    sliced    oradisk01    testdg      online
c1t5d0s2    sliced    oradisk02    testdg      online
c1t6d0s2    sliced    swapdev01    testdg      online


2.  I have three (3) mirrored volumes & one (1)simple volume under "testdg" diskgroup. All volumes are mounted with data onit.

# vxprint -htg testdg
~
dg testdg      default      default  102000  1083791032.1626.PRODEO

dm oradisk01    c1t4d0s2    sliced   3401     35314461 -
dmoradisk02    c1t5d0s2     sliced  3145     35312760 -
dmswapdev01    c1t6d0s2     sliced  3145     35312760-

v  admin        -            ENABLED  ACTIVE  204800   SELECT    -        fsgen
pladmin-01    admin        ENABLED  ACTIVE   205821  CONCAT    -        RW
sd oradisk02-01admin-01     oradisk02 0       205821  0         c1t5d0   ENA
pladmin-02    admin        ENABLED  ACTIVE   205821  CONCAT    -        RW
sd swapdev01-01admin-02     swapdev01 0       205821  0         c1t6d0  ENA

v  foglight    -            ENABLED  ACTIVE  204800   SELECT    -        fsgen
plfoglight-01  foglight     ENABLED  ACTIVE  205821   CONCAT    -        RW
sdoradisk02-02 foglight-01  oradisk02 205821  205821  0         c1t5d0   ENA
plfoglight-02  foglight     ENABLED  ACTIVE  205821   CONCAT    -        RW
sdswapdev01-02 foglight-02  swapdev01 205821  205821  0         c1t6d0  ENA

v  ora8        -            ENABLED  ACTIVE  204800   SELECT    -        fsgen
plora8-01      ora8        ENABLED  ACTIVE   205821  CONCAT    -        RW
sd oradisk02-03ora8-01      oradisk02 411642  205821  0         c1t5d0   ENA
plora8-02      ora8        ENABLED  ACTIVE   205821  CONCAT    -        RW
sd swapdev01-03ora8-02      swapdev01 411642  205821  0         c1t6d0  ENA

v  testvol1    -            ENABLED  ACTIVE  204800   SELECT    -        fsgen
pltestvol1-01  testvol1     ENABLED  ACTIVE  205821   CONCAT    -        RW
sdswapdev01-01 testvol1-01  swapdev01 0       205821  0         c1t6d0   ENA


# df-k
Filesystem            kbytes    used  avail capacity  Mountedon
/dev/vx/dsk/testdg/ora8
                     102400    1513  94648    2%    /ora8
/dev/vx/dsk/testdg/admin
                     102400  102390      10  100%    /admin1
/dev/vx/dsk/testdg/foglight
                     102400  28669  69142    30%    /foglight
/dev/vx/dsk/testdg/testvol1
                     102400    1167  94913     2%    /v1

# ls -ltr /ora8 | tail-5
-r-xr-xr-x   1 root     other      20204May  5 14:12 fsck
-rw-r--r--   1 root    other       8045 May  5 14:12format.dat
-r-xr-xr-x   1 root     other     191508May  5 14:12 format
-r-xr-xr-x   1 root    other      14788 May  5 14:12 fmthard
-r-xr-xr-x   1root     other       9964 May  5 14:12ff

# ls -ltr /admin1 | tail -5
-rwxr-xr-x   1root     other      31940 May  5 14:11libmenu.so.1
-rwxr-xr-x   1 root    other      31940 May  5 14:11libmenu.so
-rw-r--r--   1 root    other      57484 May  5 14:11 libmenu.a
-rwxr-xr-x  1 root     other      11448 May  5 14:11libmd5.so.1
-rwxr-xr-x   1 root    other      11448 May  5 14:11 libmd5.so

# ls -ltr/foglight | tail -5
-r-xr-xr-x   1 root    other       5447 May  5 14:13 vgrind
-r-xr-xr-x   1root     other     227828 May  5 14:13vedit
-r-xr-xr-x   1 root     other       4668May  5 14:13 vax
-r-xr-xr-x   1 root    other      71164 May  5 14:13 vacation
---s--x--x  1 root     other      70912 May  5 14:13uux

# ls -ltr /v1
total 52
drwxr-xr-x   2root     root          96 May  5 16:12lost+found
-rw-r--r--   1 root     other      2423 May  5 16:13 2vol.con
-rw-r--r--   1 root    other      23121 May  5 16:13 2-313


3. I wantedto move the subdisks from disk "swapdev01" (c1t6d0) to disk "oradisk01"(c1t4d0)

For example, to move the (relocated) subdisks on diskswapdev01 belonging to volume admin (back) to diskoradisk01, the command is:

# vxassist -g testdg move admin!swapdev01 oradisk01

Note: The !swapdev01 specifies the current location of the subdisks, and oradisk01 specifies where the subdisks should be relocated.

Relocating subdisk for volume "foglight"
#vxassist -g testdg move foglight !swapdev01 oradisk01

Relocatingsubdisk for volume "ora8"
# vxassist -g testdg move ora8 !swapdev01oradisk01

Relocating subdisk from non-redundant volume"testvol1"
# vxassist -g testdg move testvol1 !swapdev01oradisk01

Verify all the subdisks moves.
# vxprint -htgtestdg
~
dg testdg      default      default  102000  1083791032.1626.PRODEO

dmoradisk01    c1t4d0s2     sliced  3401     35314461 -
dmoradisk02    c1t5d0s2     sliced   3145    35312760 -
dm swapdev01    c1t6d0s2     sliced  3145     35312760-

v  admin        -            ENABLED  ACTIVE  204800   SELECT    -        fsgen
pladmin-01    admin        ENABLED  ACTIVE   205821  CONCAT    -        RW
sd oradisk02-01admin-01     oradisk02 0       205821  0         c1t5d0   ENA
pl admin-02    admin        ENABLED  ACTIVE   205821  CONCAT    -        RW
sd oradisk01-01admin-02     oradisk01 1700    205821  0         c1t4d0  ENA

v  foglight    -            ENABLED  ACTIVE  204800   SELECT    -        fsgen
plfoglight-01  foglight     ENABLED  ACTIVE  205821   CONCAT    -        RW
sdoradisk02-02 foglight-01  oradisk02 205821  205821  0         c1t5d0   ENA
plfoglight-02  foglight     ENABLED  ACTIVE  205821   CONCAT    -        RW
sdoradisk01-02 foglight-02  oradisk01 207521  205821  0         c1t4d0  ENA

v  ora8        -            ENABLED  ACTIVE  204800   SELECT    -        fsgen
plora8-01      ora8        ENABLED  ACTIVE   205821  CONCAT    -        RW
sd oradisk02-03ora8-01      oradisk02 411642  205821  0         c1t5d0   ENA
plora8-02      ora8        ENABLED  ACTIVE   205821  CONCAT    -        RW
sd oradisk01-03ora8-02      oradisk01 413342  205821  0         c1t4d0  ENA

v  testvol1    -            ENABLED  ACTIVE  204800   SELECT    -        fsgen
pltestvol1-01  testvol1     ENABLED  ACTIVE  205821   CONCAT    -        RW
sdoradisk01-04 testvol1-01  oradisk01 619163  205821  0         c1t4d0   ENA


4. Check &validate if data is still ok.
# df-k
Filesystem            kbytes    used  avail capacity  Mountedon
/dev/vx/dsk/testdg/ora8
                     102400    1513  94648    2%    /ora8
/dev/vx/dsk/testdg/admin
                     102400  102390      10  100%    /admin1
/dev/vx/dsk/testdg/foglight
                     102400  28669  69142    30%    /foglight
/dev/vx/dsk/testdg/testvol1
                     102400    1167  94913     2%    /v1

# ls -ltr /ora8 | tail-5
-r-xr-xr-x   1 root     other      20204May  5 14:12 fsck
-rw-r--r--   1 root    other       8045 May  5 14:12format.dat
-r-xr-xr-x   1 root     other     191508May  5 14:12 format
-r-xr-xr-x   1 root    other      14788 May  5 14:12 fmthard
-r-xr-xr-x   1root     other       9964 May  5 14:12ff

# ls -ltr /admin1 | tail -5
-rwxr-xr-x   1root     other      31940 May  5 14:11libmenu.so.1
-rwxr-xr-x   1 root    other      31940 May  5 14:11libmenu.so
-rw-r--r--   1 root    other      57484 May  5 14:11 libmenu.a
-rwxr-xr-x  1 root     other      11448 May  5 14:11libmd5.so.1
-rwxr-xr-x   1 root    other      11448 May  5 14:11 libmd5.so

# ls -ltr/foglight/ | tail -5
-r-xr-xr-x   1 root    other       5447 May  5 14:13 vgrind
-r-xr-xr-x   1root     other     227828 May  5 14:13vedit
-r-xr-xr-x   1 root     other       4668May  5 14:13 vax
-r-xr-xr-x   1 root    other      71164 May  5 14:13 vacation
---s--x--x  1 root     other      70912 May  5 14:13uux

# ls -ltr /v1
total 52
drwxr-xr-x   2root     root          96 May  5 16:12lost+found
-rw-r--r--   1 root     other      2423 May  5 16:13 2vol.con
-rw-r--r--   1 root    other      23121 May  5 16:13 2-313


Additional Note:

If the volume is enabled, subdisks within detached or disabled plexes, and detached log
or RAID-5 subdisks, are moved without recovery of data.

If the volume is not enabled, subdisks within STALE or OFFLINE plexes, and stale log or
RAID-5 subdisks, are moved without recovery. If there are other subdisks within a
non-enabled volume that require moving, the relocation fails.

For enabled subdisks in enabled plexes within an enabled volume, data is moved to the
new location, without loss of either availability or redundancy of the volume.
 
 
 

 

Issue/Introduction

How to Move and Unrelocate subdisks using vxassist