Operating System - HP-UX
1824983 Members
3740 Online
109678 Solutions
New Discussion юеВ

Replacing fail mirror disk in 1 VG (3 disk - Only 2 mirror disk).

 
Steven_181
Advisor

Replacing fail mirror disk in 1 VG (3 disk - Only 2 mirror disk).

Hi All,

I have a scenario as below.

VG = VG00 (with 3 disks)
Disk1 = c0t1d0 (lovl1, lovl2, lovl3)
Disk2 = c0t2d0 (lvol4, lvol5)
Disk3 = c0t3d0 (lvol4 mirror, lvol5 mirror)

Basically, Disk2 & Disk3 is mirrored.

If Disk3 (second disk) failed, if I issue the following command, will it remove all lvol from c0t2d0 and c0t3d0, or only one of them?

#lvreduce -k -m 0 /dev/vg00/lvol4
#lvreduce -k -m 0 /dev/vg00/lvol5

Do I also need to remove the rest of the lvol1, lvol2 and lvol3 since it is not mirror?

Do I need to issue the follwing command after I replace the disk?

#lvextend -m 1 /dev/vg00/lvol4 /dev/dsk/c0t3d0
#lvextend -m 1 /dev/vg00/lvol5 /dev/dsk/c0t3d0

or the following command can do the task:

#vgsync /dev/vg00

Thanks for any feedback.

Steven
.... Beginner....
5 REPLIES 5
Rajeev  Shukla
Honored Contributor

Re: Replacing fail mirror disk in 1 VG (3 disk - Only 2 mirror disk).

Hi Steven,

If DISK3 fails and is hot swappable then just replace the disk and do a vgcfgrestore on the replaced disk and then vgsync this will resync the lvols froms DISK3 to DISK2.

If the disks are not hotswappable then shutdown the system and replace the disks and perform the above steps.

If the DISK3 has not completely failed then you can reduce the lv from DISK3 with lvreduce -m 0 /dev/vg00/lvol4 /dev/dsk/c0t3d0
lvreduce -m 0 /dev/vg00/lvol5 /dev/dsk/c0t3d0
vgreduce /dev/vg00 /dev/dsk/c0t3d0
add the new disk and pvcreate that disk
and vgextend /dev/vg00 /dev/new disk
and then lvextend -m 1 /dev/vg00/lvol4 /dev/dsk/new disk

you dont need to do a vgsync coz lvextend will sync the mirrors.
Have a look at man pages of all the commands for more details

Rajeev
Pete Randall
Outstanding Contributor

Re: Replacing fail mirror disk in 1 VG (3 disk - Only 2 mirror disk).

Here is an excellent document to have on hand for these situations:

http://docs.hp.com/en/5991-1236/When_Good_Disks_Go_Bad.pdf


Pete

Pete
Nguyen Anh Tien
Honored Contributor

Re: Replacing fail mirror disk in 1 VG (3 disk - Only 2 mirror disk).

>>#lvreduce -k -m 0 /dev/vg00/lvol4
>>#vreduce -k -m 0 /dev/vg00/lvol5
pls add pv for me, like this

#vreduce -k -m 0 /dev/vg00/lvol5 /dev/dsk/c0t3d0
#vreduce -k -m 0 /dev/vg00/lvol4 /dev/dsk/c0t3d0
>>Do I also need to remove the rest of the lvol1, lvol2 and lvol3 since it is not mirror?

PLS give me the result of following command
#vgdispplay -v vg00
From this output I can dictate which disk that lvol1, lvol2 locates on

>>>Do I need to issue the follwing command after I replace the disk?
YES IF U want mirror for 02 lv (lvol04, lvol05)

#lvextend -m 1 /dev/vg00/lvol4 /dev/dsk/c0t3d0
#lvextend -m 1 /dev/vg00/lvol5 /dev/dsk/c0t3d0



#vgsync /dev/vg00

>> this command only sync data in vg00, but lvol4 an lvol5 is not mirror now.
NOTE:
1,lvextend -m 1 will sync data among disks
2, Internal disks are not hot plug disk so I would like you backup data and down server After unplug disks
HTH
HP is simple
Steven_181
Advisor

Re: Replacing fail mirror disk in 1 VG (3 disk - Only 2 mirror disk).

Nguyen Anh Tien

lovl1, lovl2 and lovl3 in located in the same VG00 as lovl4 and lovl5


Steven_181
Advisor

Re: Replacing fail mirror disk in 1 VG (3 disk - Only 2 mirror disk).

Nguyen Anh Tien

lovl1, lovl2 and lovl3 is located in disk c0t1d0 in the same VG00 as lovl4 and lovl5