How to manually create a subdisk and replace an existing subdisk in a volume

book

Article ID: 100000523

calendar_today

Updated On:

Resolution

If a volume has a subdisk that needs to be replaced for one reason or another, a new subdisk can be created to take the place of the existing subdisk. This procedure can be done without taking the volume offline.

1. The first step is to use vxdgfree to determine free disk space in the diskgroup

#  vxdg free (The vxdg free output will indicate the starting offset for the available disks)

GROUP        DISK        DEVICE      TAG          OFFSET    LENGTH    FLAGS
newdg        disk02      c1t5d0s2    c1t5d0          0              8920560    -
newdg        disk03      c1t6d0s2    c1t6d0          3662400    5258160    -
newdg        disk04      c1t8d0s2    c1t8d0          0              8920560  

2. Next, the vxprint information of the volume will be useful in determining which subdisk to replace and also provide details of the subdisk attributes in order to build the new subdisk.

# vxprint-ht

dgnewdg        default      default  108000  985305078.1174.kramer

dmdisk01       c1t4d0s2     sliced  2179     8920560  -
dmdisk02       c1t5d0s2     sliced  2179     8920560  -
dmdisk03       c1t6d0s2     sliced  2179     8920560  -
dmdisk04       c1t8d0s2     sliced  2179    8920560  -

v  testvol          -                ENABLED  ACTIVE  12582912  fsgen            -          SELECT
pltestvol-01    testvol        ENABLED  ACTIVE   12582960  CONCAT      -          RW
sddisk01-01    testvol-01   disk01      0              8920560    0                c1t4d0  ENA
sddisk03-01    testvol-01   disk03      0              3662400    8920560      c1t6d0   ENA       (to be replaced)


Note: In the following example, disk02 from the vxdg free output will be used to construct our new subdisk

3.The third step is to create the new subdisk.This step requires information from the vxdgfree output taken earlier to create the subdisk, such as a starting offset. This step also requires the size of the existing subdisk to be replaced from the vxprint -ht output.

The following example will replace the disk03-01 subdisk from the volume testvol in diskgroup newdg.

#vxmake -g sd disk=offset=len=
or
#vxmake -g newdg sd disk02-01-new disk=disk02 offset=0len=3662400

Note: The offset information is taken from the vxdg free and the length is taken from vxprint .

4. Run vxprint to confirm that the new subdisk has been created.

# vxprint-ht

dgnewdg        default      default  108000  985305078.1174.kramer

dmdisk01       c1t4d0s2     sliced  2179     8920560  -
dmdisk02       c1t5d0s2     sliced  2179     8920560  -
dmdisk03       c1t6d0s2     sliced  2179     8920560  -
dmdisk04       c1t8d0s2     sliced  2179    8920560  -

sddisk02-01-new  -            disk02            0            3662400    -              c1t5d0  ENA        

v    testvol        -                ENABLED      ACTIVE  12582912   fsgen        -          SELECT
pl  testvol-01    testvol        ENABLED      ACTIVE  12582960  CONCAT    -            RW
sd  disk01-01    testvol-01  disk01            0            8920560    0              c1t4d0  ENA
sd  disk03-01    testvol-01  disk03            0            3662400    8920560    c1t6d0    ENA

5.Once it is verified that the new subdisk is created, replace the subdisk as follows:

# vxsd -g -o rm -p -v mv
or
# vxsd -gnewdg -o rm -p testvol-01 -v testvol mv disk03-01 disk02-01-new

The command above removes the old subdisk only after successful completion of the move operation.

6. Run a final vxprint to show the new subdisk which has taken the place of the old one.

#vxprint -ht

dgnewdg        default      default  108000  985305078.1174.kramer

dmdisk01       c1t4d0s2     sliced  2179     8920560  -
dmdisk02       c1t5d0s2     sliced  2179     8920560  -
dmdisk03       c1t6d0s2     sliced  2179     8920560  -
dmdisk04       c1t8d0s2     sliced  2179    8920560  -

v  testvol              -                ENABLED      ACTIVE      12582912    fsgen          -        SELECT
pltestvol-01        testvol        ENABLED      ACTIVE      12582960    CONCAT    -        RW
sddisk01-01        testvol-01  disk01            0                8920560      0              c1t4d0   ENA
sd disk02-01-newtestvol-01   disk02            0                3662400      8920560    c1t5d0   ENA       <--new subdisk.

7.Run vxdg free once again to confirm that there is a new offset size for disk02 after creating the new subdisk.

# vxdgfree

GROUP        DISK        DEVICE      TAG          OFFSET    LENGTH    FLAGS
newdg        disk02      c1t5d0s2    c1t5d0          3662400    5258160     -
newdg        disk03      c1t6d0s2    c1t6d0          0              8920560    -
newdg        disk04      c1t8d0s2    c1t8d0          0              8920560     -

Note the remaining space from disk02and the extra space now available on disk03 as the old subdisk is now available again as free space.
 
 

 

Issue/Introduction

How to manually create a subdisk and replace an existing subdisk in a volume