Operating System - HP-UX
1838451 Members
4788 Online
110126 Solutions
New Discussion

Converting from non-strict mirror to strict

 
XPEN-Paul
Occasional Contributor

Converting from non-strict mirror to strict

Hi Gurus - grab a tea/coffee (other beverages are also available), and your favourite arm-chair then settle in please for this one ...

I have a customer who, for reasons unknown and pre-dates my involvement, has their data disks lvols in non-strict mirrors, with the mirrored pairs residing on SANs at two adjacent sites.  These SANs are then snapshot replicated over to a DR centre, but crucially the snapshots for each SAN are always slightly apart - leading to slightly out of sync snapshot mirror pairs (if that makes sense!).   (This time difference apparently can't be fixed by the way, because it's snapshotting two different SANS, albeit each contains a disk from a mirror-pair)!

We've run into issues (not all the time), when we then try to present a single SAN snapshot copy of just one SAN set of disks to a DR server - given we know the snapshot pairs are out of sync, we only present one or other set, such that when we import the volume groups and disks (and re-ID the disks) - all of which works okay, when we then come to fsck the non-strict lvols, they will sometimes error - due I believe to only presenting one side of the mirror pairs, and then there are 'missing' extents from the half of the mirror we're trying to use.

I believe a solution to having extents split between the mirrored disks is to change from non-strict to strict - for which the lvchange command cannot be used (it allows strict to non-strict change, but not the other way around), so we need to break the mirror and re-create using strict mode.

(I have also seen a post from back in 2012, here on the forums, where it says using non-strict mirrors is definitely not a good thing, whereby losing either disk may result in both sides of any given mirror then being unusable (which seems to match our experience with the non-strict lvols when we can only mount one set of disks at the DR centre).

My question is (and I'm pretty sure in breaking the mirror via lvreduce it must handle this) ... when doing the lvreduce -m 0, does it properly recover all extents that might only be on the second disk in the pair, back to the remaining 'primary' disk, so you do then have a single, fully intact copy of all extents? I'd then go create a new mirror that's in 'strict' mode.

Many thanks for any feedback/comments or further questions on this one.

Paul