1830385 Members
2406 Online
110001 Solutions
New Discussion

removing root mirror

 
SOLVED
Go to solution
Nick D'Angelo
Super Advisor

removing root mirror

I see that this has been posted, but the answer is not apparent.

I have two disks that are in the same volume group but I want to remove the second one.

I have tried to lvreduce /dev/vg00 /dev/dsk/c1t5d0 but no go.

I need to remove this drive, c1t5d0 from the volume group and ensure that it is not mirrored from c1t6d0.

Suggestions?
Always learning
9 REPLIES 9
James R. Ferguson
Acclaimed Contributor
Solution

Re: removing root mirror

Hi Nick:

First, you need to 'lvreduce' the mirror copies you no longer want, as for instance:

# for N in 1 2 3 4 5 6 7 8
> do
> lvreduce -m 0 /dev/vg00/lvol${N} /dev/dsk/cXtYdZ
> done

...where cXtYdZ is the disk you no longer want.

Then:

# vgreduce /dev/vg00 /dev/dsk/cXtYdZ

Regards!

...JRF...
Sanjay_6
Honored Contributor

Re: removing root mirror

Hi Nick,

what you need to do is first reduce the mirror and then reduce the disk from the VG.

to reduce the mirror do "lvreduce -m 0 /dev/vg00/lvol_name /dev/dsk/cxtydz"

Here lvol_name is the name of the volume for which you are reducing the mirror and /dev/dsk/cxtydz is the device from which you are removing the mirror. In your case cxtydz is c1t5d0. Once you have done this, do a "lvlnboot" for the root, swap and the boot volume. then do a "lvlnboot -R" to confirm the BRDA is okay and "lvlnboot -v" to check the disk boot info's are correctly displayed. Then go a "vgreduce" to remove the disk from the root VG.

You should now have what you wanted.

Hope this helps.

Regds
Nick D'Angelo
Super Advisor

Re: removing root mirror

James,

lvreduce -m 0 /dev/vg00/lvol5 /dev/dsk/c1t5d0 produced this error.

In fact, it appeared for all lvols.

lvreduce: "MirrorCopies" parameter "0" is not smaller than existing number "0";
therefore no mirrors are removed.
Always learning
Patrick Wallek
Honored Contributor

Re: removing root mirror

Apparently the stuff in this VG is not mirrored. That is why you got that error.

Do a 'vgdisplay -v /dev/vg00' This will show you whether the LVOLS are mirrored or not.

You can also do a 'pvdisplay -v /dev/dsk/c1t5d0' and see what specific LVOLS are on that disk.

If there are none, you can do a vgreduce to reduce that disk out of vg00
Michael Tully
Honored Contributor

Re: removing root mirror

Hi,

Here's another rendition:

Make sure that the mirrors are the same on
both disks by using the below, this is to
make sure that the mirrors are consistant.
Your must be 'root' to do the lvreduce and the vgreduce commands.

# /usr/sbin/lvdisplay -v /dev/vg00/lv*

Then to remove the mirror

# for LVOL in /dev/vg00/lv*
> do
> echo $LVOL
> /usr/sbin/lvremove -m 0 $LVOL
> done

Then to remove the disk from volume group
# /usr/sbin/vgreduce /dev/vg00 /dev/dsk/c1t5d0

HTH
-Michael
Anyone for a Mutiny ?
James R. Ferguson
Acclaimed Contributor

Re: removing root mirror

Hi Nick:

Given the error you report, you do not have the corresponding logical volume mirrored. If you do:

# lvdisplay -v /dev/vg00/lvol${N}|more

Note the line "Mirror copies". It will show <1> if you have a mirrored copy (1) otherwise zero (0). You should see zero based on your error.

In addition, under the heading "Distribution of logical volume" you will see the number of extents for every physical disk comprising the volume group. *If* you don't see any extents for any logical volume (1-N) on the disk (cXtydZ) that you want to 'vgreduce' then you may safely 'vgreduce' it.

Regards!

...JRF...

If you do:
Michael Tully
Honored Contributor

Re: removing root mirror

In the output of 'vgdisplay -v /dev/vg00' if
the disk has the same number of Free PE's as
the total of PE's that would also indicate
that there is nothing on the disk. If there
is a difference there is something on the disk.

e.g.
--- Physical volumes ---
PV Name /dev/dsk/c1t6d0
PV Status available
Total PE 4340
Free PE 2791
Autoswitch On

PV Name /dev/dsk/c2t6d0
PV Status available
Total PE 4340
Free PE 4340
Autoswitch On

HTH
-Michael
Anyone for a Mutiny ?
Animesh Chakraborty
Honored Contributor

Re: removing root mirror

Hi,
Why you want to remove c1t5d0 ?Is it a bad disk ?If it is the case then use these steps to un-mirror the Logical Volume:

1. lvdisplay -k -v /dev/vg00/lvol6 | more

Note: You are looking for the pvkey value of the missing disk.
This value is located in the 'PV' column.

2. lvreduce -k pvkey_value -m 0 /dev/vg00/lvol6

Note: This command un-mirrors the missing disk.

Regards
Animesh
Did you take a backup?
Nick D'Angelo
Super Advisor

Re: removing root mirror

Thanks to all for your inputs.

Information from several posts were used and helped,
thanks
Always learning