Operating System - HP-UX
1825783 Members
2046 Online
109687 Solutions
New Discussion

mirror/split secondary swap

 
SOLVED
Go to solution
Steve Faidley
Valued Contributor

mirror/split secondary swap

While LVM mirroring shouldn't care what it is mirroring/splitting, we are questioning
if we can mirror and split secondary swap.
We are moving from one EMC to another and have a secondary swap on the old one.
They are both connected and we are going to mirror from one to the other then split to the
new one. Has anyone done this with swap partitions?

OLD EMC DISK: c1t1d1
NEW EMC DISK: c2t2d2
/dev/vg02/lvol1 = secondary swap

lvextend ???m 1 /dev/vg02/lvol1 /dev/dsk/c2t2d2
edit /etc/lvmpvg add;

VG /dev/vg02
PVG PVGsplit
/dev/dsk/c1t1d1

lvsplit ???g PVGsplit /dev/vg02/lvol1

I am thinking nothing needs to be done with lvlnboot as it is secondary swap.

Anyone with swap mirror/split/reduce experience please respond.
If it ain't broke, let me have a look at it.
5 REPLIES 5
James R. Ferguson
Acclaimed Contributor

Re: mirror/split secondary swap

Hi Steve:

I have not, per se, tried what you suggest. However, it would be simpler, I think, to 'lvextend' a *second* mirror copy and once synchronized, 'lvreduce' the *first* mirror copy you no longer want, leaving *one* mirror.

Regards!

...JRF...
Roger Baptiste
Honored Contributor

Re: mirror/split secondary swap


I agree with the TopGun ;-)
Never tried splitting a mirror
swap before, so the instinct
is to play it safe and use
the lvreduce method, as suggested by James.

-Raj
Take it easy.
Sanjay_6
Honored Contributor

Re: mirror/split secondary swap

Hi Steve,

You can reduce the mirror by doing an "lvreduce -m 0 /dev/vg_name/lv_name /dev/dsk/device_name" and then do and "lvextend -m 1 /dev/vg_name/lv_name /dev/dsk/device_name" to add the mirror to the new path.

Hope this helps.

Regds
Steve Faidley
Valued Contributor

Re: mirror/split secondary swap

Sorry, I had lvsplit on the mind as that is what we are doing with the other filesystems to preserve them in caase we need to backout (no idea why we would want to backout).
The real point is can you lvextend mirror and lvreduce mirror on a swap lvol on an active system?
Thanks for the replies.
If it ain't broke, let me have a look at it.
James R. Ferguson
Acclaimed Contributor
Solution

Re: mirror/split secondary swap

Hi (again) Steve:

There is no reason why you can't 'lvreduce' a secondary swap's mirror and then 'lvextend' it elsewhere. You are not eliminating swap (which *would* require a reboot) so whether or not you have multiple copies should be immaterial.

To 'lvsplit' a logical volume containing swap makes no sense to me. The idea of splitting a mirrored logical volume is to isolate a *static* copy for backup purposes. Swap is certainly not a static entity.

Regards!

...JRF...