How to mirror a volume using custom created sub-disks and plexes to preserve original sub-disk layout

book

Article ID: 100017974

calendar_today

Updated On:

Resolution

The following provides an outline of how to duplicate a plex layout in the mirror plex and retain the sub-disk arrangement when using larger media.

The original disks are odisk1 and odisk2 each with 4801536sectors, while the new disks (ndisk1 and ndisk2) are larger with 6288768sectors.

Example DG:
dgtestdg      testdg

dmndisk1       EMC_CLARiiON0_0 -    6288768  
dmndisk2       EMC_CLARiiON0_1 -    6288768  
dmodisk1       Disk_7      -        4801536  
dmodisk2       Disk_9      -        4801536  


v  myvol        -            ENABLED  ACTIVE  9603072  SELECT    -        fsgen
plmyvol-01    myvol        ENABLED  ACTIVE  9603072  CONCAT    -        RW
sdodisk1-01    myvol-01     odisk1  0        4801536  0        Disk_7   ENA
sdodisk2-01    myvol-01     odisk2  0        4801536  4801536   Disk_9  ENA

The plex above has two subdisks, odisk1-01 andodisk2-01.

odisk1-01 is allocated on odisk1, has an offset of 0 and a length of 4801536
odisk2-01 is allocated on odisk2, has an offset of 0 and a length of 4801536

If you were to create a mirror of the myvol-01 plex using the new disks, the following layout would result:

pl myvol-02    myvol        ENABLED  ACTIVE  9603072  CONCAT    -        RW
sdndisk1-01    myvol-02     ndisk1  0        6882768  0        EMC_CLARiiON0_0   ENA
sdndisk2-01    myvol-02     ndisk2  0        2720304  6882768   EMC_CLARiiON0_1  ENA

This may not be the desired result in some circumstances.  To preserve the original sub-disk allocation you must build the volume manually using vxmake.

1. Create Matching Subdisks on the New Media:

For this stage in the operation use vxmake to create subdisks manually.

# vxmake -g sd name>,,

Based on the above volume you need to create 2 subdisks, each with the indicated offset and length.

# vxmake -g testdg sd ndisk1-01ndisk1,0,4801536
# vxmake -g testdgsd ndisk2-01 ndisk2,0,4801536

sdndisk1-01    -            ndisk1  0        4801536  -        EMC_CLARiiON0_0 ENA
sdndisk2-01    -            ndisk2  0        4801536  -        EMC_CLARiiON0_1 ENA

2. Create the Mirror Plex:

Use vxmake to create a plex data object in the diskgroup.

# vxmake -g plex sd=,

Following the above example:

# vxmake -g testdg plex myvol-02sd=ndisk1-01,ndisk2-01

plmyvol-02     -            DISABLED-        9603072  CONCAT    -        RW
sdndisk1-01    myvol-02     ndisk1  0        4801536  0        EMC_CLARiiON0_0 ENA
sdndisk2-01    myvol-02     ndisk2  0        4801536  4801536   EMC_CLARiiON0_1ENA

3. Attach the New Plex to Begin Mirroring:

Use vxplex to initiate plex attachment.
# vxplex -g att

This command will also begin the mirror synchronization process.  You can background the process by adding the '-b' option.

For the example plex/volume:
# vxplex -b -g testdg att myvolmyvol-02

You can monitor the progress of the task byrunning:
# vxtask monitor

Once the process has completed 100%:

# vxprint -gtestdg -ht

dgtestdg      default      default  33000    1163786889.28

dmndisk1       EMC_CLARiiON0_0 auto  2048    6288768  -
dmndisk2       EMC_CLARiiON0_1 auto  2048    6288768  -
dmodisk1       Disk_7       auto    2048     4801536  -
dmodisk2       Disk_9       auto    2048    4801536  -

v  myvol        -            ENABLED  ACTIVE  9603072  SELECT    -        fsgen
plmyvol-01    myvol        ENABLED  ACTIVE  9603072  CONCAT    -        RW
sdodisk1-01    myvol-01     odisk1  0        4801536  0        Disk_7   ENA
sdodisk2-01    myvol-01     odisk2  0        4801536  4801536   Disk_9  ENA
pl myvol-02    myvol        ENABLED  ACTIVE  9603072  CONCAT    -        RW
sdndisk1-01    myvol-02     ndisk1  0        4801536  0        EMC_CLARiiON0_0 ENA
sdndisk2-01    myvol-02     ndisk2  0        4801536  4801536   EMC_CLARiiON0_1ENA


 
 

 

Issue/Introduction

How to mirror a volume using custom created sub-disks and plexes to preserve original sub-disk layout