Re: Defect Hard Disk Removal from LVM (492 Views)
Reply
Advisor
Jerome Salyers
Posts: 30
Registered: ‎12-10-2001
Message 1 of 10 (496 Views)
Accepted Solution

Defect Hard Disk Removal from LVM

hi,

we are working on a K370 machine with HPUX11.0... we have a disk that we are trying to create mirroring on... it is already in lvmtab... but now it is dead and we can't reach it...

how can i remove a dead disk from the lvmtab so that i can put in another disk and use it... mirror on this disk is not yet started... but the physical volume is already created and it is already assigned to vg01...

thanks in advance!

jerome
Honored Contributor
Stefan Farrelly
Posts: 3,910
Registered: ‎10-23-1996
Message 2 of 10 (495 Views)

Re: Defect Hard Disk Removal from LVM

Have your tried a vgreduce -f vg01 ?

If not then;
1. backup /etc/lvmtab to another file
2. remove /etc/lvmtab
3. vgscan (which recreates /etc/lvmtab)
4. vgreduce -f vg01 (this should no forceably remove the device from vg01)

Then you can replace the disk, pvcreate it, then add it back in again.
Im from Palmerston North, New Zealand, but somehow ended up in London...
Honored Contributor
Michael Tully
Posts: 7,905
Registered: ‎04-15-1999
Message 3 of 10 (495 Views)

Re: Defect Hard Disk Removal from LVM

You could try and run 'vgreduce /dev/myvolgrp /dev/dsk/cxtydz and remove the disk from the volume group or simply replace the disk and run the 'vgcfgrestore -n /dev/myvolgrp /dev/dsk/cxtydz'.

As per the man page try to have the volume group de-activated.

# man vgcfgrestore

Anyone for a Mutiny ?
Advisor
Jerome Salyers
Posts: 30
Registered: ‎12-10-2001
Message 4 of 10 (495 Views)

Re: Defect Hard Disk Removal from LVM

hi, steve...

won't vgreduce -f vg01 remove the entire volume group... i don't want to touch the original vg01... i would lose all my data, no?

what exactly happens when i do a vgreduce -f on a volume group? does it only touch mirrored vgs?

thanks
jerome
Honored Contributor
Clemens van Everdingen
Posts: 1,035
Registered: ‎09-13-1999
Message 5 of 10 (495 Views)

Re: Defect Hard Disk Removal from LVM

Hi,

You have to do this:

# vgreduce /dev/vg01 /dev/dsk/cXtXdX

Replace the X's with the correct numbers which reflect you defect disk.
This will only touch this disk and remove that disk from the vg01.

C.
The computer is a great invention, there are as many mistakes as ever, but they are nobody's fault !
Advisor
Jerome Salyers
Posts: 30
Registered: ‎12-10-2001
Message 6 of 10 (495 Views)

Re: Defect Hard Disk Removal from LVM

hi, michael...

vgreduce doesn't work because it can't reach the physical volume...

we tried the vgcfgrestore on the /dev/dsk/cxtxd0, which gave us errors, but on /dev/rdsk/cxtxd0 it said it restored the logical volume info on the new hard disk... but i still can't extend or remove the physical volume from the vg...

the error from the vgcfgrestore -n /dev/vg01 /dev/dsk/cxtxdx command was:

Character-special file for PV not supplied on command line, OR PV did not belong to volume group /dev/vg01 when configuration file was created

we checked in lvmconf/vg01.conf and /dev/rdsk/cxtxdx is the entry...

still we can't seem to GET to the physical disk...

jerome
Valued Contributor
Chuck J
Posts: 162
Registered: ‎07-17-2002
Message 7 of 10 (495 Views)

Re: Defect Hard Disk Removal from LVM

Maybe try:

/dev/rdsk/cxtxdx
Honored Contributor
Jean-Louis Phelix
Posts: 724
Registered: ‎10-07-2002
Message 8 of 10 (495 Views)

Re: Defect Hard Disk Removal from LVM

Jerome,

If you have replaced the disk and vgcfgrestore'd the configuration to it, you can still have LVM not aware of this replacement.

You now have to use a 'vgchange -a y' command if LVM has deactivated the bad disk. From the vgchange man page you can read :

If the -a y or -a e option is executed
on a currently active volume group,
vgchange attempts to include any
physical volumes that were previously
listed as missing. This is useful if a
physical volume has come back online.

Regards,

Jean-Louis.
It works for me (© Bill McNAMARA ...)
Advisor
Jerome Salyers
Posts: 30
Registered: ‎12-10-2001
Message 9 of 10 (495 Views)

Re: Defect Hard Disk Removal from LVM

thanks jean louis and michael tulley for your help, and the others for their advice... the vgcfgrestore and then then vgsync did it... thanks!

jerome
Occasional Visitor
ilaiyaraja
Posts: 1
Registered: ‎06-11-2013
Message 10 of 10 (492 Views)

Re: Defect Hard Disk Removal from LVM

thanks stefan

The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.