Operating System - HP-UX
1826398 Members
3617 Online
109692 Solutions
New Discussion

Re: physical volume trouble

 
SOLVED
Go to solution
Trias_1
Advisor

physical volume trouble

i've ran several command below :
i have no problem with ioscan -fnC disk
#vgscan
vgscan: Warning: couldn't query physical volume "/dev/dsk/c1t15d0":
The specified path does not correspond to physical volume attached to
this volume group
vgscan: Warning: couldn't query all of the physical volumes.
vgscan: The physical volume "/dev/dsk/c1t15d0" is already recorded in the "/etc/lvmtab" file.
vgscan: The physical volume "/dev/dsk/c3t15d0" is already recorded in the "/etc/lvmtab" file.
Couldn't stat physical volume "/dev/dsk/c2t2d0":
Invalid argument

Following Physical Volumes belong to one Volume Group.
Unable to match these Physical Volumes to a Volume Group.
Use the vgimport command to complete the process.
/dev/dsk/c1t15d0

#pvdisplay -v /dev/dsk/c1t15d0
pvdisplay: Warning: couldn't query physical volume "/dev/dsk/c1t15d0":
The specified path does not correspond to physical volume attached to
this volume group
pvdisplay: Warning: couldn't query all of the physical volumes.
pvdisplay: Couldn't retrieve the names of the physical volumes
belonging to volume group "/dev/vg01".
pvdisplay: Cannot display physical volume "/dev/dsk/c1t15d0".

#vgdisplay -v /dev/vg01
vgdisplay: Volume group not activated.
vgdisplay: Cannot display volume group "/dev/vg01".

#vgchange -a y /dev/vg01
vgchange: Warning: Couldn't attach to the volume group physical volume "/dev/dsk/c1t15d0":
Cross-device link
vgchange: Warning: couldn't query physical volume "/dev/dsk/c1t15d0":
The specified path does not correspond to physical volume attached to
this volume group
vgchange: Warning: couldn't query all of the physical volumes.
vgchange: Couldn't activate volume group "/dev/vg01":
Quorum not present, or some physical volume(s) are missing.

#pvcreate -f /dev/rdsk/c1t15d0
pvcreate: The physical volume "/dev/dsk/c1t15d0" is already recorded in the "/etc/lvmtab" file.

i also attach the file.

any suggestion ?
thanks in advance
22 REPLIES 22
Mridul Shrivastava
Honored Contributor

Re: physical volume trouble

I would suggest you to restore the vg configuration of the disk which are part of vg01 using the following:

vgcfgrestore -n vg01 /dev/dsk/c1t15d0

Do it for all the PVs which are part of vg01 and then try to activate it..

normally this kind of error means someone has execute pvcreate on this disk.

Is it part of shared storag and accessible by any other node ?
Time has a wonderful way of weeding out the trivial
Trias_1
Advisor

Re: physical volume trouble

i've done as u told before

# vgcfgrestore -n vg01 /dev/dsk/c1t15d0
vgcfgrestore: Error opening LVM configuration file : /etc/lvmconf/vg01.conf

will renaming /etc/lvmtab and run vgscan fix the problem.
thanks
Mridul Shrivastava
Honored Contributor

Re: physical volume trouble

That may or may not fix the problem.. however it is not always advisable to do so.. anyway that can be done as a last option... can you look for any old configuration available of vg01 under /etc/lvmconf

post the output of ll /etc/lvmconf

Time has a wonderful way of weeding out the trivial
Trias_1
Advisor

Re: physical volume trouble

as your request

# ll /etc/lvmconf
total 640
---------- 1 root sys 0 Jun 11 15:48 lvm_lock
-rw------- 1 root sys 321536 Jun 11 15:45 vg00.conf

thanks
Mridul Shrivastava
Honored Contributor

Re: physical volume trouble

Aah.. we don't have vg01 configuration backup...

I think you could try running vgscan after renaming the existing lvmtab... It seems that you have already tried that...

Now the only option available is to recreate the vg from scratch.. do you have data backup ?? or old lvdisplay,vgdisplay outputs ??
Time has a wonderful way of weeding out the trivial
Mridul Shrivastava
Honored Contributor

Re: physical volume trouble

If we have old vgdisplay and lvdisplay output then there is a work around by which we can recover data but make sure that we don't execute newfs after create this vg and all the details while creating vg and lv should remain as it were earlier....

This is the reason I asked if we have old outputs.
Time has a wonderful way of weeding out the trivial
Trias_1
Advisor

Re: physical volume trouble

This is the reason I asked if we have old outputs.

>> how i do know that i have old output?
what command should i type?

thanks
Mridul Shrivastava
Honored Contributor

Re: physical volume trouble

There is no command for that.. I thought you might have the old output of these commands.. If we don't have a snapshot of the old ones then there is no way we can recover it.. Then as mentioned earlier the only way is to recreate the vgs and lvs and restore the data.
Time has a wonderful way of weeding out the trivial
Torsten.
Acclaimed Contributor

Re: physical volume trouble

Still the same system like this ???

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1134638

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Trias_1
Advisor

Re: physical volume trouble

mridul :
thanks for the replies, maybe i will try o recreate the vgs and lvs.one thing lhe left, can i run vgimport?

tursten:
yes, the machine still the same. but i have managed to reinstall UNIX on the same boot disk, but i can't get create vg with the other disk.

thanks
Mridul Shrivastava
Honored Contributor

Re: physical volume trouble

vgimport could be run if we had run vgexport in the past... remember you have to create vg dir and group file before executing the vgimport.

If vgexport was not done earlier then it won't be of any help.
Time has a wonderful way of weeding out the trivial
Torsten.
Acclaimed Contributor

Re: physical volume trouble

How about

vgdisplay -v
ioscan -fnCdisk
strings /etc/lvmtab

(not sure about the current status)

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Trias_1
Advisor

Re: physical volume trouble

mridul:
can i do vgimport without previously done vgexport?
what is the difference between vgcfgbackup and vgexport also vgcfgrestore and vgimport?
can i create vg without do pvcreate first?
Torsten.
Acclaimed Contributor
Solution

Re: physical volume trouble

> can i do vgimport without previously done vgexport?

Yes.

> what is the difference between vgcfgbackup and vgexport also vgcfgrestore and vgimport?

vgcfgbackup is storing the VG layout to the disk. vgexport can delete the VG config from your system (not the data from the disk)
vgcfgrestore restores the LVM layout to a disk. vgimport imports VGs to the system. see the man pages!


> can i create vg without do pvcreate first?

Yes, if the disk is already a LVM disk.

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Mridul Shrivastava
Honored Contributor

Re: physical volume trouble

>> can i do vgimport without previously done vgexport?
No.. it's not possible.

>> what is the difference between vgcfgbackup and vgexport also vgcfgrestore and vgimport?

These are altogether different thingss..
vgcfgbackup>> will take the vg configuration backup under /etc/lvmconf, however vg would be available on the system and in active state
vgcfgrestore >> is used when replacing disk or lvm header gets corrupted on a disk for the coresponding vg.
vgexport >> will remove all the entries from the host and vg has to be deactivated before doing this. After vgexport being done this vg can be imported on other host after moving the corresponding PVs.
vgimport >> used to import a vg which is being exported using vgexport..

Time has a wonderful way of weeding out the trivial
Mridul Shrivastava
Honored Contributor

Re: physical volume trouble

I m sorry for the first one....

vgimport can be done as Torsten said.. but you should the the PV disks and major and minor no.'s....
Time has a wonderful way of weeding out the trivial
Trias_1
Advisor

Re: physical volume trouble

like u two said earlier, that vgimport can be done without vgexport first.
then it imports what?since we haven't store any configuration earlier.
does it import current active VG?
thanks
Torsten.
Acclaimed Contributor

Re: physical volume trouble

It depends like always.

Assuming you had a config with 1 disk in vg00 and 1 disk in vg01. Now you re-install the OS (as you did) and you get a "new" vg00.
The data of vg01 is still there.
You can vgimport this disk now to your current config.

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Mridul Shrivastava
Honored Contributor

Re: physical volume trouble

No..It's not like that...

As I mentioned.. considering that vg does not exist on the node and we have all the details of the PVs , major and minor no.'s.. only then it could be imported.. that way it will query the details from VGRA on the lvm header of the disk.

However in our case LVM header are corrupt on the disk so it's not possible to import the vg.
Time has a wonderful way of weeding out the trivial
Trias_1
Advisor

Re: physical volume trouble

so torsten, if i did fresh installation from scratch (no vg ever created before) it will give me new vg00 on first disk, then can still do the vgimport for second disk?
thanks
Torsten.
Acclaimed Contributor

Re: physical volume trouble

I'm a bit confused about the "new" boot disk, the "old" data disk and the destroyed disk from your previous thread.

I remember you destroyed the c1t15d0, right?


Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Trias_1
Advisor

Re: physical volume trouble

hi two genius
sorry i keep bothering you.
especially torsten, who keep track from my other thread.
i think it's time to close the thread.
i finally find some workaorund, i don't know if it's recommended or not. but it worked for me.
what i did was rename /etc/lvmtab, then pvcreate,vgcreate then vgscan...woila
the system works fine.
thanks so much my friends...it helps me a lot