Operating System - HP-UX
1847732 Members
3630 Online
104013 Solutions
New Discussion

Re: breaking the mirror on a root drive

 
SOLVED
Go to solution

breaking the mirror on a root drive

I need to break the mirror of the root drive. I tried 'lvreduce -m 0 /dev/vg00/lvol1' and got back:
lvreduce: "MirrorCopies" parameter "0" is not smaller than existing number "0";
therefore no mirrors are removed.
8 REPLIES 8
Santosh Nair_1
Honored Contributor

Re: breaking the mirror on a root drive

Are you sure that the filesystem is mirrored? If you do a lvdisplay on the LV, you should get Mirror Copies =1 if the filesystem is mirrored.

-Santosh
Life is what's happening while you're busy making other plans
James R. Ferguson
Acclaimed Contributor
Solution

Re: breaking the mirror on a root drive

Hi Glenn:

First, verify that 'lvol1' has mirrored extents:

# lvdisplay -v /dev/vg00/lvol1

You should see (at the end) entries like:

LE PV1 PE1 Status 1 PV2 PE2 Status 2
0000 /dev/dsk/c0t6d0 0000 current /dev/dsk/c2t0d2 0000 current
0001 /dev/dsk/c0t6d0 0001 current /dev/dsk/c2t0d2 0001 current

Then, for example, to reduce the mirror on /cdev/dsk/c2t0d2, do:

# lvreduce -m 0 /dev/vg00/lvol1 /dev/dsk/c2t0d2

Regards!

...JRF...
A. Clay Stephenson
Acclaimed Contributor

Re: breaking the mirror on a root drive

Hi Glenn:

I would do a slight variation on the earlier respones:

lvdisplay /dev/vg00/lvol* and look for the number of Mirror Copies for each logical volume. It does appear that lvol1 has already been reduced or was not mirrored in the first place.

Clay
If it ain't broke, I can fix that.

Re: breaking the mirror on a root drive

When I enter:
lvdisplay -v /dev/vg00/lvol1
I get:
--- Logical volumes ---
LV Name /dev/vg00/lvol1
VG Name /dev/vg00
LV Permission read/write
LV Status available/syncd
Mirror copies 0
Consistency Recovery MWC
Schedule parallel
LV Size (Mbytes) 48
Current LE 12
Allocated PE 12
Stripes 0
Stripe Size (Kbytes) 0
Bad block off
Allocation strict/contiguous

--- Distribution of logical volume ---
PV Name LE on PV PE on PV
/dev/dsk/c0t5d0 12 12

--- Logical extents ---
LE PV1 PE1 Status 1
0000 /dev/dsk/c0t5d0 0000 current
0002 /dev/dsk/c0t5d0 0002 current
0003 /dev/dsk/c0t5d0 0003 current
0004 /dev/dsk/c0t5d0 0004 current
0005 /dev/dsk/c0t5d0 0005 current
0006 /dev/dsk/c0t5d0 0006 current
0007 /dev/dsk/c0t5d0 0007 current
0008 /dev/dsk/c0t5d0 0008 current
0009 /dev/dsk/c0t5d0 0009 current
0010 /dev/dsk/c0t5d0 0010 current
0011 /dev/dsk/c0t5d0 0011 current


But if I do a vgdisplay -v vg00, at the bottom I see:
--- Physical volumes ---
PV Name /dev/dsk/c0t5d0
PV Status available
Total PE 1023
Free PE 100

PV Name /dev/dsk/c0t8d0
PV Status available
Total PE 2170
Free PE 2170

Which tells me that c0t5d0 is mirrored to c0t8d0 right? What should I do to break this mirror?
linuxfan
Honored Contributor

Re: breaking the mirror on a root drive

Hi Glenn,


You are wrong, it only means that there are two disks in your VG but there is are no mirror copies (Mirror copies 0). Also the

PV Name /dev/dsk/c0t8d0
PV Status available
Total PE 2170
Free PE 2170

indicates the disk is not being utilized. so if you are just trying to reduce the disk from the VG, do

vgreduce /dev/vg00 /dev/dsk/c0t8d0


-Regards
Ramesh
They think they know but don't. At least I know I don't know - Socrates
James R. Ferguson
Acclaimed Contributor

Re: breaking the mirror on a root drive

Hi Glenn:

Remember, you mirror *logical volumes*, *NOT* disks. Your lvol1 is *not* mirrored.

Regards!

...JRF...
Carlos Fernandez Riera
Honored Contributor

Re: breaking the mirror on a root drive

Glenn:

I guess your old vg was 4 disks ( c0t5d0, c0t8d0, c1t5d0, c1t8d0).

Can you atach a full vgdisplay -v /dev/vg00 2>&1 # we like to see errors too
and strings /etc/lvmtab?

It will be shorter. Thanks







unsupported
Nisar Ahmad
Regular Advisor

Re: breaking the mirror on a root drive

Hi There

I am not sure how can I change fstab after split (break mirror) case.

Please suppose we have no vxfs.

At the moment it is like:


nsgrsu20 = # more /etc/fstab
/dev/vg00/lvol3 / hfs defaults 0 1
/dev/vg00/lvol1 /stand hfs defaults 0 2
/dev/vg00/lvol2 swap ignore sw 0 0
/dev/vg00/lvol4 /home hfs defaults 0 2
/dev/vg00/lvol5 /opt hfs defaults 0 2
/dev/vg00/lvol6 /tmp hfs defaults 0 2
/dev/vg00/lvol7 /usr hfs defaults 0 2
/dev/vg00/lvol8 /var hfs defaults 0 2
#/dev/vg02/lvol2 /boral/TEST hfs rw,suid 0 2
/dev/vg02/lvol3 /boral/DEV hfs rw,suid 0 2
/dev/vg02/lvol4 /boral/PROD hfs rw,suid 0 2
/dev/vg02/lvol1 /local hfs rw,suid 0 2
/dev/vg00/lvol9 /spooler hfs rw,suid 0 2
#/dev/dsk/c4t2d0 /cdrom cdfs ro

Thanks

Nisar