Operating System - HP-UX
1847086 Members
5752 Online
110262 Solutions
New Discussion

remove a ghost disc from a vg

 
SOLVED
Go to solution
Curtis Larson_2
Advisor

remove a ghost disc from a vg

I have a disc that is no longer responding that I'm wanting to remove from it's vg.

the vg has two discs. one is the mirror of the other. good disc is c1t6d0. bad disc is c1t4d0.

I'm following the instruction for removing a ghost disc from the hp-ux software recovery handbook vers. 7.2

I've been able to reduce all of the lvols just fine using the lvreduce -k option.

but when i do a vgreduce -f /dev/vg01 i get:
vgreduce: Couldn't query physical volume /dev/dsk/c1t4d0
the specified path does not corespond to physical vloume attached to the volume group

then the prompt returns. I don't get the rest of the suggested output:
pv with key 0 (for my disc it is 1) sucessfully deleted from vg vg01
...etc

a vgdisplay still shows the ghost disc.

should I proceed with updating lvmtab and the vg01.conf files or is some other action called for before doing so?

my latest lvm cumlative patch is PHCO_24437 and the OS is 11.0
11 REPLIES 11
Jeff Schussele
Honored Contributor

Re: remove a ghost disc from a vg

Hi Curtis,

Yes, just mv or rm /etc/lvmtab & run
vgscan -av
To recreate the lvmtab file.

Rgds,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
James Murtagh
Honored Contributor

Re: remove a ghost disc from a vg

Hi Curtis,

All you should have to do now is rebuild the lvmtab.

# mv /etc/lvmtab /etc/lvmtab.safe
# vgscan -a -p -v (optional step to ensure it would build what you would expect)
# vgscan -a -v

I think this backs up the VG configuration but you can run vgcfgbackup manually if not.

Regards,

James.
Curtis Larson_2
Advisor

Re: remove a ghost disc from a vg

moved lvtab and recreated with vgscan

when i do a vgcfgbackup i get:

lvmtab is out of date with the running kernel
kernel indicates 2 disks and lvmtab has 1.
cannot proceed with backup
S.K. Chan
Honored Contributor

Re: remove a ghost disc from a vg

What I usually do when I get this error is to vgexport and vgimport the problematic vg so that lvmtab gets updated. In single user mode ..
# vgchange -a n /dev/vg01
# vgexport -m /tmp/vg01map /dev/vg01
# mkdir /dev/vg01
# mknod /dev/vg01/group c 64 0x0x0000
==> minor number 0x0000 must be unique.
# vgimport -m /tmp/vg01map /dev/vg01 /dev/dsk/c1t6d0
Befrore you do all the above take note of the minor number because we want to re-use the same minor number during the mknod.

Curtis Larson_2
Advisor

Re: remove a ghost disc from a vg

vgimport returns:

warning: volume group belongs to a different cpu id
can dtermine if volume group is in use another system
continuing
warning: volume groupcontains 2 pv, 1 specified continuing
etc.

vgdisplay still shows a ghost disc.
Curtis Larson_2
Advisor

Re: remove a ghost disc from a vg

being my typing was so bad I'll just attach the vgimport output here
James Murtagh
Honored Contributor

Re: remove a ghost disc from a vg

Hi Curtis,

You may have to put a new disk in the slot of the bad one, vgcfgrestore to it and vgreduce it from the volume group.

Normally if you get a disk failure you would replace the disk, run a vgcfgrestore and vgsync which will sync all the mirrors again. Still, what you are doing is supported and the steps you have taken are correct so this shouldn't be causing you these problems.

Regards,

James.
S.K. Chan
Honored Contributor

Re: remove a ghost disc from a vg

mmm ..
Can you post these ..
# strings /etc/lvmtab
# vgdisplay -v vg01
For each og the lv in vg01..
# lvdisplay -v /dev/vg01/lvolX
At least the first 30 lines from that output.
John Palmer
Honored Contributor
Solution

Re: remove a ghost disc from a vg

Having imported, have you tried vgreduce -f again?

Regards,
John
Curtis Larson_2
Advisor

Re: remove a ghost disc from a vg

this disc was import from another system sometime ago. didn't have this problem doing an vgimport then. So, I don't quite understand getting the different cpu id message
Curtis Larson_2
Advisor

Re: remove a ghost disc from a vg

trying the vgreduce -f after doing the vgimport reports having removed the appropriate pv key.

following though with recreating lvmtab with vgscan and vgcfgbackup has saved the new configuration. and vgdisplay no longer shows a ghost disc