Operating System - HP-UX
1841582 Members
3725 Online
110182 Solutions
New Discussion

Re: How to remove mirroring without affecting data on the other disk ?

 
Deepu Chakravarty
Regular Advisor

How to remove mirroring without affecting data on the other disk ?

I want to remove mirroring of a disk. But while removing mirroring , the data on the other disk should remain as it is.
11 REPLIES 11
Martijn Bos_1
Occasional Advisor

Re: How to remove mirroring without affecting data on the other disk ?

Hi,

As far as I know no data will be changed when you remove a mirror copy. (only some LVM data will ofcourse change to reflect the removal of the disk).

(Probably I don't understand your question :-)

Best regards
Martijn.
Just don't call a file -rf
Karthik S S
Honored Contributor

Re: How to remove mirroring without affecting data on the other disk ?

If you are referring to LVM mirroring .. yes it is possible to split the mirror without affecting the data,

ex:
lvreduce -m 0 /dev/vg01/lvol1

-Karthik S S
For a list of all the ways technology has failed to improve the quality of life, please press three. - Alice Kahn
PVR
Valued Contributor

Re: How to remove mirroring without affecting data on the other disk ?

You can remove the LVM mirroring w/o a data loss

#lvreduce -m 0 /dev/vg00/lvol2. You have to reduce all lvols's from the mirrored disk.
Don't give up. Try till success...
Michael Tully
Honored Contributor

Re: How to remove mirroring without affecting data on the other disk ?

If your removing the mirror on the root disk or any disk and all are of the same naimg convention:

for i in /dev/vg00/lv*
do
echo $i
lvreduce -m 0 $i
done

or individually
lvreduce -m 0 /dev/vgxx/lvxxx

You can then remove the disk from the volume should you choose.
# vgreduce /dev/vgxx /dev/dsk/cxtydz

No harm will come to the first disk.
Anyone for a Mutiny ?
Ravi_8
Honored Contributor

Re: How to remove mirroring without affecting data on the other disk ?

Hi.

when you remove the mirroring data will not be affected.

#lvreduce -m 0 /dev/vgxx/lvolxx

will break the mirroring
never give up
Jeroen Peereboom
Honored Contributor

Re: How to remove mirroring without affecting data on the other disk ?

Why not use lvsplit? For each logical volume.
Afterwards you can easily mount the ex-mirrors.

JP.
Lorenzo Facello
Valued Contributor

Re: How to remove mirroring without affecting data on the other disk ?

When you remove a mirror you work only with the mirrored disk.
ex.
/dev/dsk/c0t6d0 --> boot disk
/dev/dsk/c1t2d0 --> mirror disk

to remove:
(you have to specify which lvol on which disk used for mirror)

lvreduce -m 0 /dev/vg00/lvolx /dev/dsk/c1t2d0

Regds.
L.
Pete Randall
Outstanding Contributor

Re: How to remove mirroring without affecting data on the other disk ?

There was a similar question last week where everyone was saying "use lvremove". I'll quote the man page here and let you be the judge: "WARNINGS
This command destroys all data in the specified logical volumes."

This may actually be different for mirrors, I don't know, I've never tried it, but I would certainly proceed with caution if I was going to try the lvreduce approach.

To me, it seems far safer to use lvsplit!


Pete

Pete
Pete Randall
Outstanding Contributor

Re: How to remove mirroring without affecting data on the other disk ?

Sorry, wrong man page!!!

From lvreduce:

"The physical extents that comprise the deleted mirror copy or copies are deallocated."

I'm not sure what happens to "deallocated extents", but I would do some testing first before I relied on lvreduce.

Lvsplit still seems safer to me!


Pete

Pete
Jeroen Peereboom
Honored Contributor

Re: How to remove mirroring without affecting data on the other disk ?

Pete,

after a reduce, how can you access the data even if it is still there?
That's why I suggest lvsplit.

JP.
Pete Randall
Outstanding Contributor

Re: How to remove mirroring without affecting data on the other disk ?

JP,

Exactly!


Pete

Pete