Operating System - HP-UX
1752490 Members
5909 Online
108788 Solutions
New Discussion юеВ

Removing faulty hard disk from a volume group

 
shreejesh
Advisor

Removing faulty hard disk from a volume group

Dear All
I am having a HP 9000 D-220 server with HPUX 10.20. The server is having three volume groups.vg00 and vg02 are having single hard disks and vg01 is having three hard disks ( no mirroring).One of the hard disk in VG01 is giving "problem in querying the physical volume /dev/dsk/c2t4d0" error. I would like to remove this disk and replace with a new one.But this disk is getting sensed in ioscan output and the volume group is getting activated at bootup. please guide me to remove this faulty disk .
6 REPLIES 6
Pete Randall
Outstanding Contributor

Re: Removing faulty hard disk from a volume group

Victor Fridyev
Honored Contributor

Re: Removing faulty hard disk from a volume group

Hi,

Firstly, try:
umount all file system, which are located on the volume group
vgreduce vg01 /dev/dsk/c2t4d0
If the command does not work, you will have to exclude all logical volumes, which belong to the faulted disk, which means that you loose a data.
IMHO, if you have a reliable backup, the best way is to rebuild the volume group, i.e.
ll /dev/vg01/group and remember its minor (hexa)
vgexport vg01
mkdir /dev/vg01
mknod /dev/vg01/group c 64 hexa
vgcreate /dev/vg01 /dev/dsk/XXXX /dev/dsk/YYYY

HTH
mknod /dev/vg01/group
Entities are not to be multiplied beyond necessity - RTFM
A. Clay Stephenson
Acclaimed Contributor

Re: Removing faulty hard disk from a volume group

You don't need to remove the disk from the VG. Shutdown and replace the disk. Next reboot the system. I suggest that you boot it in single-user mode so that only vg00 is activated.

I'll assume the bad disk is c2t2d0; substitue as required.

vgcfgrestore -n /dev/vg01 /dev/rdsk/c2t2d0
vgchange -a y /dev/vg01.

Next do a pvdisplay -v /dev/dsk/c2t2d0 | pg

and note which LVOL's were in use by the failed drive.

I'll assume it was /dev/vg01/lvol4 and /dev/vg01/lvol5. Substitute as required.

newfs -F vxfs /dev/vg01/lvol4
newfs -F vxfs /dev/vg01/lvol5

vgchange -a n /dev/vg01

At this point, I would shutdown and reboot normally. Your next task will be to restore those filesystems from backup.




If it ain't broke, I can fix that.
Fadia Almarei
Super Advisor

Re: Removing faulty hard disk from a volume group

1-remove the disk from the volume group
vgreduce /dev/vgxx /dev/vgxx/lvolx
2-replace the failed disk
3-initialize the disk
pvcreate -f /dev/rdsk/cxtxdx
4-extend the volume group to the new disk
vgextend /dev/vgxx /dev/dsk/cxtxdx
5-then restore the data to the disk
fadia.marei
Mohanasundaram_1
Honored Contributor

Re: Removing faulty hard disk from a volume group

Hi Shreejesh,

Clay is correct. There is simply no reason to remove the failed disk from the VG. Shutdown system and replace the failed disk.

Then perform vgcfgrestore on the new disk. The filesystems have to be recreated as well.

Clay has already given a very good picture of steps you need to take.

With regards,
Mohan.
Attitude, Not aptitude, determines your altitude
Indrajit_1
Valued Contributor

Re: Removing faulty hard disk from a volume group

Hi;

Shutdown the server and replace the bad disk with new disk..

Reboot the machine in single user mode (please boot the machine in single user mode, or u may face kernel panic. As during booting system will read /etc/fstab entry)
isl>hpux is (boot the server in single user mode fro isl prompt)

#diskinfo /dev/rdsk/cxtxdx
#vgcfgresote -n /dev/vg01 /dev/dsk/cxtxdx
#vgchage -y n /dev/vg01
#vgdisplay -v /dev/vg01 |more

if u face any error
#vgchange -a r /dev/vg01
fine for the new disk entry (/dev/dsk/cxtxdx)

Comment the old entry in /etc/fstab file.

shutdown and boot the machine.

Hope this will resolve ur issue..

Cheers
indrajit




Never Ever Give Up