10-10-2011 06:33 AM - edited 10-10-2011 11:12 AM
lately we had a defective HDD on HP9000 L3000 server and that HDD was part of a mirrored VG01 volume group.
we replaced the defective disk by another new disk having same characteristics and issue the commands with steps below:
1- unmirroring (or breaking the mirror)
root# lvdisplay -k -v /dev/vg01/lvolx
root# lvreduce -k -m 0 /dev/vg01/lvolx 0
2- updating lvmtab
root# ioscan -fnC disk
Class I H/W Path Driver S/W State H/W Type Description
disk 0 0/0/1/0.1.0 sdisk CLAIMED DEVICE HP DVD-ROM 305
disk 1 0/0/1/1.0.0 sdisk CLAIMED DEVICE HP 73.4GST373453LC
disk 2 0/0/1/1.2.0 sdisk CLAIMED DEVICE HP 36.4GST336754LC
disk 4 0/0/2/0.0.0 sdisk CLAIMED DEVICE HP 73.4GMAU3073NC
disk 3 0/0/2/0.2.0 sdisk CLAIMED DEVICE HP 36.4GST336754LC
output after issuing vgscan -v :
root# strings /etc/lvmtab
3- PV creation using c1t0d0
root# pvcreate -f /dev/rdsk/c1t0d0
Note that after isuuing the "pvcreate" command, no output is shown!
4- extending VG01 :
root# vgextend /dev/vg01 /dev/dsk/c1t0d0
vgextend: Couldn't open physical volume "/dev/dsk/c1t0d0":
Any help is much appreciated.
Solved! Go to Solution.
10-11-2011 05:15 AM
have you vgreduce the disk from the VG with its pvkey once you removed the mirror ?
What about pvdisplay on the disk, does it show something ?
10-11-2011 07:44 AM
the fact is that im helping a colleague of mine on a distant site, i tried to ssh to the server and i noticed that he already "vgreduced" the disk from VG01 as the VG01 is a mirrored VG constituted from c2t0d0 (which is OK) and c1t0d0 (which is showing problems) and when i issued the following command:
#pvdisplay /dev/dsk/c2t0d0 i had the following output:
PV Name /dev/dsk/c2t0d0
VG Name /dev/vg01
....etc ... and note that i did not get any Alternate link for c1t0d0.
In addidtion, when i did the following:
#diskinfo /dev/rdsk/c1t0d0 it showed that its corresponding size is 0 Kbytes however it is CLAIMED via ioscan -fnC disk.
i tried to mediainit the disk, which ended with a failure so it seems that the new delivered disk is also defective.
In that case what is the procedure to follow after i got delivered another disk?
Thanks in advance
10-11-2011 08:28 AM
If the size is 0 bytes the disk is definitely toast.
Once you have replaced the disk again, just proceed as if you were mirroring the contents of that VG for the first time.
pvcreate the disk
vgextend the disk into the VG.
lvextend the LVs so that they are mirrored to that disk.
10-11-2011 12:00 PM
Unless your patch levels are low, you should be able to save yourself some steps in the future by using pvchange instead of having to break and create the mirrors.
Run # pvchange -?
If you note the option -a Availability you can run pvchange to disable the device from LVM:
# pvchange -a N /dev/dsk/c1t1d0
Replace the disk.
# ioscan -fnC disk (be sure the new disk is seen)
# pvchange -a y /dev/dsk/c1t1d0
# vgcfgrestore -v vg01 /dev/rdsk/c1t1d0
# vgchange -a y vg01
# vgsync vg01
10-12-2011 12:25 AM
thanks for the reply, however, in this situation and as the mirrored VG is already reduced do i proceed by "vgcfgrestore" in that case (after receiving the new disk) or do i proceed by re-mirroring the whole VG from beginning once again?
Thanks in advance
10-12-2011 06:28 AM - edited 10-12-2011 06:30 AM
You would run vgcfgrestore if the VG is configured to include that disk. If you only ran lvreduce and not vgreduce, then you should run vgcfgrestore to rebuild the VGRA data back to the new disk. If you completely removed that disk device from the VG, then simply start over with pvcreate, vgextend, etc.
Not sure? Run strings /etc/lvmtab and vgcfgrestore -l -n vg0x.conf
EDIT: You will find the following link to the document "When Good Disks Go Bad" useful I am sure: