Operating System - HP-UX
1834457 Members
2418 Online
110067 Solutions
New Discussion

Re: lvreduce and lvcreate -m 1 over 2 disks

 
SOLVED
Go to solution
Konrad Hegner
Frequent Advisor

lvreduce and lvcreate -m 1 over 2 disks

I replaced a crashed disk und I have to recreat the mirroring.
How I can reduce an lv there go over 2 disks. Do I have to chose both HDD in the command?
It this correct if I use the following command:
lvreduce -m 0 /dev/vg00/lvol9 /dev/dsk/c0t8d0 /dev/dsk/c0t9d0

And for built the mirroring I have to use the 'same' command: lvextend -m 1 /dev/vg00/lvol9 /dev/dsk/c0t8d0 /dev/dsk/c0t9d0
8 REPLIES 8
Vincent Farrugia
Honored Contributor

Re: lvreduce and lvcreate -m 1 over 2 disks

Hello,

In both cases, specifying the dead disk or new disk alone would be enough.

HTH,
Vince
Tape Drives RULE!!!
James R. Ferguson
Acclaimed Contributor

Re: lvreduce and lvcreate -m 1 over 2 disks

Hi:

You don't have to turn off mirroring and then rearm it. For a full procedural discussion see Technical Knowledge Base document #KBAN00000347.

Regards!

...JRF...
Rita C Workman
Honored Contributor

Re: lvreduce and lvcreate -m 1 over 2 disks

If you had disks that were mirrored off a primary disk...and one (or even both) of your mirrors failed and had to be replaced.
The only thing you may need to do is to probably run a vgcfgrestore to get the header info back to the disks (may need to run a vgchange -a y .. to reactivate the vg) and then you should just need to resync the mirrors, using either lvsync or vgsync.


If I have understood what you said....

Just a quick thought,
Rita

Jeff Schussele
Honored Contributor

Re: lvreduce and lvcreate -m 1 over 2 disks

Hi Konrad,

As others have correctly stated you do not need to break the mirror to replace the drive.
But what you need to do is insure the replacement disk is of the same size & in the SAME position using the same SCSI ID as the one that it's replacing.
Then you can use the vgsync to get the data mirrored once more.

Rgds,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Konrad Hegner
Frequent Advisor

Re: lvreduce and lvcreate -m 1 over 2 disks

Thank you for all your answers.

Vicent: If I have to reduce the mirroring, then I have to work with both disks, because 1 lvol goes over both disks and if you reduce it, it will delete the mirroring in both disks. I did it, but only with one HDD in the command and the HPUX delete the 2nd part of the mirroring on the wrong disk ;-(

JRF: You are right, but I want to do this, because we had last week problems with sync (the replaced disk was also bad - directly from HP).

Rita: Sorry my english. Wy I didn't work with lvsync?: Please read the reason in the colume above (JRF)

Jeff: It was in a 'Jamaika'. And I replaced the same disk, at the same place with the same SCSI-ID, size and more.

----------------------------
The question is not only for know the right way, it is for understand also the mirroring (I'm a rookie in this things).

It is know possible to create oder remove a mirroring over 2 disks with the command above?

Thanks

Victor_5
Trusted Contributor

Re: lvreduce and lvcreate -m 1 over 2 disks

If your bad disk is /dev/dsk/c0t9d0, just do:

lvreduce -m 0 /dev/vg00/lvol9

after replace the bad disk, run:
lvextend -m 1 /dev/vg00/lvol9

But before you run lvextend, you have to run vgcfgrestore and vgchange first.
Victor_5
Trusted Contributor

Re: lvreduce and lvcreate -m 1 over 2 disks

Sorry, the correct one for lvreduce is:

lvreduce -m 0 /dev/vg00/lvol9 /dev/dsk/c0t9d0
James R. Ferguson
Acclaimed Contributor
Solution

Re: lvreduce and lvcreate -m 1 over 2 disks

Hi Konrad:

In answer to your last question, yes, it is possible to specify the 'pv_path'(s) of all physical volume in both the 'lvextend' and 'lvreduce' commands to specifically target selected physical volumes on which the logical volume extents are to be placed or removed.

See the man pages for more information.

Regards!

...JRF...