Determining which mirror plex contains the most recent data and then resynchronizing

Article: 100028659
Last Published: 2013-03-19
Ratings: 0 0
Product(s): InfoScale & Storage Foundation

Problem

If an outage effects all plexes of a mirror, it may be necessary to manually review each plex to determine which contains the most recent updates before resynchronizing. This ensures that the most up-to-date data is preserved.

Solution

This article is a part of a set on troubleshooting failed, or failing, disks. Click here to start at the beginning: https://www.veritas.com/docs/000080622



Table of Contents

1. Dismount and stop the volume
2. Use vxplex to dissociate all but one plex
3. Restart and mount the volume
4. Review the contents of the volume
5. Resynchronize the plexes, using the preferred copy of the data




1. Dismount and stop the volume
(Back to top)

Gracefully offline any processes that are using the volume and dismount it. After the volume is dismounted, use vxvol to stop it.

 


Note: If this is a Veritas Cluster (VCS) environment, offline the cluster resources down to, and including, the Mount resource.


 

Figure 1 - Using vxvol to stop the volume


Syntax:

vxvol -g <disk_group> stop <volume>


Example, with typical output:

# vxvol -g proddg stop prodvol


Vxprint now shows that the volume is disabled.

# vxprint -g proddg -vp
TY NAME         ASSOC        KSTATE   LENGTH   PLOFFS   STATE    TUTIL0  PUTIL0
pl prodvol-01   prodvol      DISABLED 102400   -        CLEAN    -       -
pl prodvol-02   prodvol      DISABLED 102400   -        CLEAN    -       -
pl prodvol-03   prodvol      DISABLED 102400   -        CLEAN    -       -
v  prodvol      fsgen        DISABLED 102400   -        CLEAN    -       -

 





2. Use vxplex to dissociate all but one plex
(Back to top)

Vxplex can be used to either attach or dissociate ("break off") a mirror plex.

  • If multiple plexes are already attached, use vxplex to dissociate all but one of them (Figure 2).
  • If the desired plex is not currently attached to the volume, use vxplex to attach it (Figure 3).


Figure 2 - Using vxplex to dissociate a mirror plex (break the mirror)


Syntax:

vxplex -g <disk_group> dis <plex>


Examples, with typical output:

In this example, vxprint initially shows that a volume named "prodvol" has three plexes associated with it. After using vxplex to dissociate two plexes, vxprint shows only one plex associated with the volume.

# vxprint -g proddg -vp
TY NAME         ASSOC        KSTATE   LENGTH   PLOFFS   STATE    TUTIL0  PUTIL0
pl prodvol-01   prodvol      DISABLED 102400   -        CLEAN    -       -
pl prodvol-02   prodvol      DISABLED 102400   -        STALE    -       -
pl prodvol-03   prodvol      DISABLED 102400   -        STALE    -       -
v  prodvol      fsgen        DISABLED 102400   -        CLEAN    -       -

# vxplex -g proddg dis prodvol-02
# vxplex -g proddg dis prodvol-03


# vxprint -g proddg -vp
TY NAME         ASSOC        KSTATE   LENGTH   PLOFFS   STATE    TUTIL0  PUTIL0
pl prodvol-01   prodvol      DISABLED 102400   -        CLEAN    -       -
pl prodvol-02   -            DISABLED 102400   -        -        -       -
pl prodvol-03   -            DISABLED 102400   -        -        -       -
v  prodvol      fsgen        DISABLED 102400   -        CLEAN    -       -

 

 


Figure 3 - Using vxplex to attach a mirror plex


Syntax:

vxplex -g <disk_group> att <vol> <plex>


Note: Do not attach more than one plex to the volume while the volume is enabled. Doing so will trigger a resynchronization.



Examples, with typical output:

In this example, vxprint initially shows that no plexes are associated with the volume named "prodvol." Vxplex is then used to attach a single plex with the volume.

# vxprint -g proddg -vp
TY NAME         ASSOC        KSTATE   LENGTH   PLOFFS   STATE    TUTIL0  PUTIL0
pl prodvol-01   -            DISABLED 102400   -        -        -       -
pl prodvol-02   -            DISABLED 102400   -        -        -       -
pl prodvol-03   -            DISABLED 102400   -        -        -       -
v  prodvol      fsgen        DISABLED 102400   -        CLEAN    -       -

# vxplex -g proddg att prodvol prodvol-01

# vxprint -g proddg -vp
TY NAME         ASSOC        KSTATE   LENGTH   PLOFFS   STATE    TUTIL0  PUTIL0
pl prodvol-01   prodvol      DISABLED 102400   -        EMPTY    -       -
pl prodvol-02   -            DISABLED 102400   -        -        -       -
pl prodvol-03   -            DISABLED 102400   -        -        -       -
v  prodvol      fsgen        DISABLED 102400   -        EMPTY    -       -

 





3. Restart and mount the volume
(Back to top)

Use vxvol to start the volume and then mount it. By default, the device path to the block device for the volume is /dev/vx/dsk/<disk_group>/<volume>.

 


Note: If this is a Veritas Cluster (VCS) environment, bring the Mount resource online to mount the volume.




Figure 4 - Using vxvol to start the volume


Syntax:

vxvol -g <disk_group> -fa start <volume>


Example, with typical output:

# vxvol -g proddg -fa start prodvol

Vxprint now shows that the volume is enabled.

# vxprint -g proddg -vp
TY NAME         ASSOC        KSTATE   LENGTH   PLOFFS   STATE    TUTIL0  PUTIL0
pl prodvol-01   prodvol      ENABLED  102400   -        ACTIVE   -       -
pl prodvol-02   -            DISABLED 102400   -        -        -       -
pl prodvol-03   -            DISABLED 102400   -        -        -       -
v  prodvol      fsgen        ENABLED  102400   -        ACTIVE   -       -

 





4. Review the contents of the volume

(Back to top)

Review the contents of the volume. In particular, note the most recent updates. This information can be compared with other plexes to determine which one contains the most recent data.


Once you have identified the most up-to-date plex, use vxvol and vxplex to associate only this plex to the volume (if it is not already). This can be done by using the same syntax that is described in Steps 1 through 3.




5. Resynchronize the plexes, using the preferred copy of the data
(Back to top)

After the desired plex is reattached, and the volume is online and mounted, use vxplex to attach the other plexes (Figure 3). This will trigger a resynchronization. The data that is contained within the plex that was attached first will be used to overwrite the other plexes that are attached subsequently.

 

 

 

 


Was this content helpful?