1751798 Members
5761 Online
108781 Solutions
New Discussion юеВ

Remove mirror disk

 
kenlo
Advisor

Remove mirror disk

Anybody can provide the correct procedures to un-mirror two disks without erase thier content. They still had same content.
4 REPLIES 4
James R. Ferguson
Acclaimed Contributor

Re: Remove mirror disk

Hi Ken:

HP-UX mirroring occurs at the logical volume level. Therefore you need to deal with every logical volume on the affected disks.

To remove the mirrored copy, do:

# lvreduce -m 0 /dev/vgNN/lvolX /dev/dsk/cXtYdZ

...this allows you to target the physical disk from which you want to remove the mirror.

If you want to split and preseve the mirrored data as a new logical volume, use 'lvsplit':

# lvsplit -s backup /dev/vgNN/lvolX

...would produce a logical volume called 'lvolXbackup' for vgNN. This can later be remerged (remirrored) with 'lvmerge'.

See the man pages for more informmation.

Regards!

...JRF...
Michael Steele_2
Honored Contributor

Re: Remove mirror disk

Note the automatic backup after lvreduce.

lvreduce -m 0 /dev/vg##/lvol# /dev/dsk/cXtYdZ

-or-

lvreduce -A -m 0 /dev/vg##/lvol# /dev/dsk/cXtYdZ

To verify:

vgcfgrestore -f /etc/lvmconf/vg##.conf -l

vgcfgbackup /dev/vg## (* Should default into /etc/lvmconf/vg##.conf *)
Support Fatherhood - Stop Family Law
KCS_1
Respected Contributor

Re: Remove mirror disk

hi,

#lvdisplay -v /dev/vgXX/lvolX

# lvsplit /dev/vgXX/lvolX

may you can see /dev/vgXX/lvolXb

# mkdir /new

# mount /dev/vgXX/lvolXb /new

you can also mount like this and backup same data with original disk

# lvdisplay -v /dev/vgXX/lvolX

mirror copy is '0'


have a good day!

Easy going at all.
Sridhar Bhaskarla
Honored Contributor

Re: Remove mirror disk

Hi Ken,

What are you trying to do?.

If your goal is to take out the other disk and boot|use another system, then it will be tedious.

Because in order for you to cleanly remove the disk out of the system, first you will need to take it out of the volume group. To take it out of the VG, you will need to use vgreduce. To vgreduce, you will need to lvremove the lvols on it.

There are workarounds like using 'dd' or replacing the mirror disk with another similar disk and following the 'replacing the mirror disk' procedure. But you will need to do some lvm maintenance to use the yanked out disk on the other system.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try