How best to split mirror into new diskgroup?

book

Article ID: 100003978

calendar_today

Updated On:

Description

Using vxsnap

 
Prepare the volume
# vxsnap -g datadg prepare vol01 ndcomirs=1 alloc=vrts_appliances0_1
 
Breakoff the second plex into a new volume
# vxsnap -g datadg make source=vol01/newvol=SNAP_vol01/plex=vol01-02 alloc=vrts_appliances0_2
 
Split the diskgroup
# vxdg split datadg newdg SNAP_vol01
 
Check vxprint for both diskgroups: datadg newdg

# vxprint -qhtg datadg
dg datadg       default      default  5000     1644844695.37.va743a-01

dm vrts_appliances0_1 vrts_appliances0_1 auto 65536 104791760 -

v  vol01        -            ENABLED  ACTIVE   2097152  SELECT    -        fsgen
pl vol01-01     vol01        ENABLED  ACTIVE   2097152  CONCAT    -        RW
sd vrts_appliances0_1-01 vol01-01 vrts_appliances0_1 0 2097152 0  vrts_appliances0_1 ENA
dc vol01_dco    vol01        vol01_dcl
v  vol01_dcl    -            ENABLED  ACTIVE   67840    SELECT    -        gen
pl vol01_dcl-01 vol01_dcl    ENABLED  ACTIVE   67840    CONCAT    -        RW
sd vrts_appliances0_1-02 vol01_dcl-01 vrts_appliances0_1 2097152 67840 0 vrts_appliances0_1 ENA
sp SNAP_vol01_snp vol01      vol01_dco

 

# vxprint -qhtg newdg
dg newdg        default      default  1000     1644844696.38.va743a-01

dm vrts_appliances0_2 vrts_appliances0_2 auto 65536 104791760 -

v  SNAP_vol01   -            ENABLED  ACTIVE   2097152  ROUND     -        fsgen
pl vol01-02     SNAP_vol01   ENABLED  ACTIVE   2097152  CONCAT    -        RW
sd vrts_appliances0_2-01 vol01-02 vrts_appliances0_2 0 2097152 0  vrts_appliances0_2 ENA
dc SNAP_vol01_dco SNAP_vol01 SNAP_vol01_dcl
v  SNAP_vol01_dcl -          ENABLED  ACTIVE   67840    SELECT    -        gen
pl SNAP_vol01_dcl-01 SNAP_vol01_dcl ENABLED ACTIVE 67840 CONCAT   -        RW
sd vrts_appliances0_2-02 SNAP_vol01_dcl-01 vrts_appliances0_2 2097152 67840 0 vrts_appliances0_2 ENA
sp vol01_snp    SNAP_vol01   SNAP_vol01_dco

 

Manual method

 
Break off the plex:
# vxplex -g datadg dis vol01-02
 
Split the plex to newdg:
# vxdg split datadg newdg vol01-02
 
Check vxprint 
# vxprint -qhtg datadg
dg datadg       default      default  11000    1644845169.47.va743a-01

dm vrts_appliances0_1 vrts_appliances0_1 auto 65536 104791760 -

v  vol01        -            ENABLED  ACTIVE   2097152  SELECT    -        fsgen
pl vol01-01     vol01        ENABLED  ACTIVE   2097152  CONCAT    -        RW
sd vrts_appliances0_1-01 vol01-01 vrts_appliances0_1 0 2097152 0  vrts_appliances0_1 ENA

 

Make a volume for the plex:
# vxmake -g newdg -U fsgen vol SNAP_vol01 plex=vol01-02
 
Start the volume:
# vxvol -g newdg start SNAP_vol01

 

Check vxprint 
# vxprint -qhtg newdg
dg newdg        default      default  14000    1644845170.48.va743a-01

dm vrts_appliances0_2 vrts_appliances0_2 auto 65536 104791760 -

v  SNAP_vol01   -            ENABLED  ACTIVE   2097152  ROUND     -        fsgen
pl vol01-02     SNAP_vol01   ENABLED  ACTIVE   2097152  CONCAT    -        RW
sd vrts_appliances0_2-01 vol01-02 vrts_appliances0_2 0 2097152 0  vrts_appliances0_2 ENA


At this point the new volume can be mounted, or deported to another system, and mounted on that system.

# mkdir /newdg
# mount -F vxfs /dev/vx/dsk/newdg/SNAP_voll01 /newdg

NOTE: The -F vxfs option applies to Solaris, -t vxfs for Linux and -V vxfs for AIX.

# ls /newdg

array.info      ddlconfig.info  disk.info       dmppolicy.info  jbod.info       lost+found

Resolution

In this technote, we start with an already existing mirrored volume. The requirement is to break off one mirror into a separate volume which is in a separate diskgroup.
 
Starting with volume configuration:
 

# vxprint -qhtg datadg
dg datadg       default      default  5000     1644844695.37.va743a-01

dm vrts_appliances0_1 vrts_appliances0_1 auto 65536 104791760 -
dm vrts_appliances0_2 vrts_appliances0_2 auto 65536 104791760 -

v  vol01        -            ENABLED  ACTIVE   2097152  SELECT    -        fsgen
pl vol01-01     vol01        ENABLED  ACTIVE   2097152  CONCAT    -        RW
sd vrts_appliances0_1-01 vol01-01 vrts_appliances0_1 0 2097152 0  vrts_appliances0_1 ENA
pl vol01-02     vol01        ENABLED  ACTIVE   2097152  CONCAT    -        RW
sd vrts_appliances0_2-01 vol01-02 vrts_appliances0_2 0 2097152 0  vrts_appliances0_2 ENA

 

Issue/Introduction

How to split off a mirror from a volume into a new diskgroup.