1833059 Members
2838 Online
110049 Solutions
New Discussion

Re: vgscan error

 
SOLVED
Go to solution
dictum9
Super Advisor

vgscan error

I get this error with vgscan. It does not generate the /etc/lvmtab file.


# vgscan -a
vgscan: The physical volume "/dev/dsk/c2t0d0s2" is already recorded in the "/etc/lvmtab" file.
vgscan: The physical volume "/dev/dsk/c2t1d0s2" is already recorded in the "/etc/lvmtab" file.
Couldn't stat physical volume "/dev/dsk/c0t0d0":
Invalid argument
Physical Volume "/dev/dsk/c3t2d0" contains no LVM information

vgscan: has no correspoding valid raw device file under /dev/rdsk.
Verification of unique LVM disk id on each disk in the volume group
/dev/vg00 failed.



# ioscan -funC disk
Class I H/W Path Driver S/W State H/W Type Description
============================================================================
disk 0 0/0/2/0.0.0.0 sdisk CLAIMED DEVICE TEAC DV-28E-B
/dev/dsk/c0t0d0 /dev/rdsk/c0t0d0
disk 1 0/1/1/0.0.0 sdisk CLAIMED DEVICE HP 73.4GST373454LC
/dev/dsk/c2t0d0 /dev/dsk/c2t0d0s3 /dev/rdsk/c2t0d0s2
/dev/dsk/c2t0d0s1 /dev/rdsk/c2t0d0 /dev/rdsk/c2t0d0s3
/dev/dsk/c2t0d0s2 /dev/rdsk/c2t0d0s1
disk 2 0/1/1/0.1.0 sdisk CLAIMED DEVICE HP 73.4GST373454LC
/dev/dsk/c2t1d0 /dev/dsk/c2t1d0s3 /dev/rdsk/c2t1d0s2
/dev/dsk/c2t1d0s1 /dev/rdsk/c2t1d0 /dev/rdsk/c2t1d0s3
/dev/dsk/c2t1d0s2 /dev/rdsk/c2t1d0s1
disk 3 0/1/1/1.2.0 sdisk CLAIMED DEVICE HP 73.4GST373454LC
/dev/dsk/c3t2d0 /dev/rdsk/c3t2d0



# vgdisplay -v vg00

. . .


--- Physical volumes ---
PV Name /dev/dsk/c2t1d0s2
PV Status available
Total PE 4318
Free PE 1719
Autoswitch On

PV Name /dev/dsk/c2t0d0s2
PV Status available
Total PE 4318
Free PE 4268
Autoswitch On


40 REPLIES 40
Rick Garland
Honored Contributor

Re: vgscan error

Make a copy of the lvmtab file presently in place. Move it out of the way. Do the vgscan as before. Should create a new lvmtab file.

dictum9
Super Advisor

Re: vgscan error

It does not. I already tried that and it does not create the file. Actually it creates a file 12 bytes in size containing apparently nothing readable when I run "strings" on it.

This is an Itanium machine. I never did anything with /dev/dsk/c2t0d0, instead I worked with /dev/dsk/c2t0d0s2. It's looking for /dev/dsk/c2t0d0 and cannnot find it.
Rick Garland
Honored Contributor

Re: vgscan error

If you run the vgscan with the -v switch (verbose) and additional messages?
dictum9
Super Advisor

Re: vgscan error

# vgscan -a -v
vgscan: The physical volume "/dev/dsk/c2t0d0s2" is already recorded in the "/etc/lvmtab" file.
vgscan: The physical volume "/dev/dsk/c2t1d0s2" is already recorded in the "/etc/lvmtab" file.
Couldn't stat physical volume "/dev/dsk/c0t0d0":
Invalid argument
Physical Volume "/dev/dsk/c3t2d0" contains no LVM information

vgscan: has no correspoding valid raw device file under /dev/rdsk.
Verification of unique LVM disk id on each disk in the volume group
/dev/vg00 failed.

Scan of Physical Volumes Complete.


# ll /dev/rdsk/*
crw-r----- 1 bin sys 188 0x000000 May 16 18:43 /dev/rdsk/c0t0d0
crw-r----- 1 bin sys 188 0x020000 May 22 09:51 /dev/rdsk/c2t0d0
crw-r----- 1 bin sys 188 0x020001 May 22 09:58 /dev/rdsk/c2t0d0s1
crw-r----- 1 bin sys 188 0x020002 May 22 10:10 /dev/rdsk/c2t0d0s2
crw-r----- 1 bin sys 188 0x020003 May 22 09:45 /dev/rdsk/c2t0d0s3
crw-r----- 1 bin sys 188 0x021000 May 16 18:43 /dev/rdsk/c2t1d0
crw-r----- 1 bin sys 188 0x021001 May 16 18:43 /dev/rdsk/c2t1d0s1
crw-r----- 1 bin sys 188 0x021002 May 31 16:04 /dev/rdsk/c2t1d0s2
crw-r----- 1 bin sys 188 0x021003 May 16 18:43 /dev/rdsk/c2t1d0s3
crw-r----- 1 bin sys 188 0x032000 May 16 18:43 /dev/rdsk/c3t2d0
Torsten.
Acclaimed Contributor

Re: vgscan error

"It's looking for /dev/dsk/c2t0d0"

Where?

Disks are not mirrored. Why you do a vgscan?
/dev/rdsk/c0t0d0 has no LVM information - it's true, because it's a DVD. Where is the problem, sorry - can't see at this moment.


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!   
dictum9
Super Advisor

Re: vgscan error

1) /dev/dsk/c0t0d0 is a DVD, it is not a problem.

2) /dev/dsk/c3t2d0 is not even initialized into any volume groups, it's not a problem.

3) The problem is /dev/dsk/c2t0d0.
When I try to mirror to it, I get it:

# lvextend -m 1 /dev/vg00/lvol2 /dev/dsk/c2t0d0s2
lvextend: Warning: couldn't query physical volume "/dev/dsk/c2t0d0":
The specified path does not correspond to physical volume attached to
this volume group
lvextend: Warning: couldn't query all of the physical volumes.


Which makes me think there is a problem with /etc/lvmtab. When I try to recreate /etc/lvmtab, vgscan fails to do so.
Rick Garland
Honored Contributor

Re: vgscan error

With the format of the disk device you are referring to, is this a Veritas disk?

Are you using LVM commands againest a disk under Veritas control?

Michael Steele_2
Honored Contributor

Re: vgscan error

You can recreate the /etc/lvmtab file with vgexport and vgimport. vgexport will remove the volume group from /etc/lvmtab.

verify the vg map

vgcfgrestore -f /dev/lvmconf/vgXX.map -l

vgexport -v -p -s -m /etc/lvmconf/vgXX.map /dev/vgXX

(-p preview)

vgchange -a n /dev/vgXX
vgexport -v -s -m ....

Now rebuild the vg directory.

mkdir /dev/vgXX
mknod /dev/vgXX/group c 64 0x0?000

And re-import the exported map.

vgimport -v -m /etc/lvmconf/vgXX.map /dev/vgXX /dev/dsk/cXtXdX <.> <.>
<.> all the associated extended disks that are needed.

vgchange -a y /dev/vgXX
Support Fatherhood - Stop Family Law
James R. Ferguson
Acclaimed Contributor

Re: vgscan error

Hi:

Did you prepare the disk for mirroring, correctly? The steps for Itanium are a bit different from PA-RISC. See Appendix-A in:

http://docs.hp.com/en/5991-1236/When_Good_Disks_Go_Bad.pdf

Regards!

...JRF...
dictum9
Super Advisor

Re: vgscan error

Rick Garland,


> With the format of the disk device you are referring to, is this a
> Veritas disk?

> Are you using LVM commands againest a disk under Veritas control?

I am not using any Veritas disks.
This is an Itanium box and instructions in it said to create the
/dev/dsk/c2t1d0s2 partition.


Michael Steele,

I don't feel comfortable exporting the vg00 volume group. I don't think
that's the problem. I don't have any other VGs.



James R. Ferguson,


The problem is not mirroring. When I run vgdisplay, I get:

vgdisplay: Warning: couldn't query physical volume "/dev/dsk/c2t0d0":

That's obviously the source of the problem. I did follow the instructions
on page 26 "Mirroring the Root Volume on Integrity Servers", but again,
I am having issues before I even get to the mirroring part.
Do you think that's the problem, that I didn't initialize it correctly?
I can try to redo the procedure. How do I confirm that it's all right?

James R. Ferguson
Acclaimed Contributor

Re: vgscan error

Hi:

Wait. Can you do (without error):

# dd if=/dev/rdsk/c2t0d0 of=/dev/null bs=64k count=10000

Also, does the disk show CLAMIMED if you do a full 'ioscan' without the '-k' switch?

# ioscan -fnC disk

Lastly, are you mirroring and do you see any "stale" extents if you do:

# lvdisplay -v /dev/vg00/lvolX

...for every X that is mirrored?

What made you attempt a 'vgscan' in the first place?

Regards!

...JRF...
Darrel Louis
Honored Contributor

Re: vgscan error

Hi,

Is this a cluster environment?
If yes you should also remove the foloowing file /dev/slvmvg, because the file has the same minor number as vg00.

If this is a cluster, steps to follow:
# mv /etc/lvmtab
# rm /dev/slvmvg
# vgscan -a -v
# vgchange -a y
# lvlnboot -R
# mknod /dev/slvmvg c 64 0x000000

GoodLuck

Darrel
Michael Steele_2
Honored Contributor

Re: vgscan error

Given :

"...I don't feel comfortable exporting the vg00 volume group. I don't have any other VGs..."

I think you should find a recent ignite recovery tape and once you've resinstalled the O/S move your data out of vg00 and into their own vgs.

Good Luck
Support Fatherhood - Stop Family Law
Ninad_1
Honored Contributor

Re: vgscan error

Can you try mirroing without specifying the disk name
lvextend -m 1 /dev/vg00/lvol2
to see if it is performing the mirroring taking the other disk on its own.

Regards,
Ninad
dictum9
Super Advisor

Re: vgscan error

Sanjay,

I cannot get to the link


James Ferguson,


I can do dd without error

# dd if=/dev/rdsk/c2t0d0 of=/dev/null bs=64k count=10000
10000+0 records in
10000+0 records out


The disk does show up claimed if I do ioscan -f

I do not see any stale extents

I attempted to do vgscan because I get an error message when I do vgdisplay.
Why am
I not being able to recreate /etc/lvmtab?


Darrel,

It's not a cluster

Ninad_1
Honored Contributor

Re: vgscan error

OK. I would suggest you to try this.

1. Remove all mirrors of volumes which are having mirror on disk c2t0d0 using lvreduce -m 0 [ for all mirrored volumes ]
2. remove disk c2t0d0 from VG using vgreduce
3. readd disk into VG and create the mirrors

Regards,
Ninad
dictum9
Super Advisor

Re: vgscan error


I removed the second disk so I am only left with primary disk. Why is it giving me this error message when I do vgdisplay?


vgdisplay: Warning: couldn't query physical volume "/dev/dsk/c2t0d0":
The specified path does not correspond to physical volume attached to
this volume group
vgdisplay: Warning: couldn't query all of the physical volumes.
dictum9
Super Advisor

Re: vgscan error

BTW page 32 of "when good disks go bad" talks about exactly this error message, "couldn't query physical volume"

Their solution is to restore a good config

recreate the VG and its LVs

export and reimport the VG

The question is, does all of this apply if the VG is vg00?!

Michael Steele_2
Honored Contributor

Re: vgscan error

I'm really glad that you asked that question because I'm concerned about boot information missing in some of the above responses. For example, unmirroring vg00, if bootable, is done at single user mode and an exception to other work done with LVM on other vgs. You also have to override the quorum when you do this or you'll corrupt the BDRA.

A) Boot into single user mode

B) # ISL> hpux -is -lq /stand/vmunix

As for the references to vgexporting and vgimporting please refer to timestamp: May 31, 2006 20:59:12 GMT where I listed the procedure. Note: If your /etc/lvmtab is corrupt and vg00 also contains your data then please safeguard your data before proceding and also locate an old ignite tape!

Verify that vg00 is the boot disk with the lvlnboot command:

# lvlnboot -v

Please paste this information into your response mon ami and backup your data and find that old ignite tape.
Support Fatherhood - Stop Family Law
James R. Ferguson
Acclaimed Contributor

Re: vgscan error

Hi (again):

OK, no apparent disk errors (perhaps) from 'dd' and 'ioscan' shows the disks as CLAIMED.

Darrel's question is very germane. If the disk was *ever* a part of a cluster, this may be the problem. Make *sure* that you don't have a file '/dev/slvmvg'. If you do, remove it; rename your current '/etc/lvmtab' and rerun 'vgscan'.

Also, please post the *full* output from 'vgdisplay -v /dev/vg00'.

You might also try a full, exhaustive 'dd' of the disk(s) you have:

# dd if=/dev/rdsk/c2t1d0 of=/dev/null bs=1024k

Regards!

...JRF...
dictum9
Super Advisor

Re: vgscan error

The disk was never a part of the cluster.
It's a freshly built machine.
I am almost at the point of rebuilding it.



# lvlnboot -v
lvlnboot: Couldn't query physical volume "/dev/dsk/c2t0d0":
The specified path does not correspond to physical volume attached to
this volume group
dictum9
Super Advisor

Re: vgscan error

# ll lvmtab
-rw------- 1 root sys 3122 Jun 1 12:39 lvmtab
# rm lvmtab
# vgscan -a -v
Creating "/etc/lvmtab".
Couldn't stat physical volume "/dev/dsk/c0t0d0":
Invalid argument
Physical Volume "/dev/dsk/c3t2d0" contains no LVM information

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/c2t0d0s2



vgscan: has no correspoding valid raw device file under /dev/rdsk.
Verification of unique LVM disk id on each disk in the volume group
/dev/vg00 failed.

Scan of Physical Volumes Complete.
# ll lvmtab
-rw------- 1 root sys 12 Jun 1 13:30 lvmtab




dictum9
Super Advisor

Re: vgscan error

# vgdisplay -v vg00

--- Volume groups ---
VG Name /dev/vg00
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 10
Open LV 10
Max PV 16
Cur PV 2
Act PV 1
Max PE per PV 4328
VGDA 2
PE Size (Mbytes) 16
Total PE 4318
Alloc PE 2599
Free PE 1719
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0

--- Logical volumes ---
LV Name /dev/vg00/lvol1
LV Status available/syncd
LV Size (Mbytes) 800
Current LE 50
Allocated PE 50
Used PV 1

LV Name /dev/vg00/lvol2
LV Status available/syncd
LV Size (Mbytes) 6144
Current LE 384
Allocated PE 384
Used PV 1

LV Name /dev/vg00/lvol3
LV Status available/syncd
LV Size (Mbytes) 1024
Current LE 64
Allocated PE 64
Used PV 1

LV Name /dev/vg00/lvol4
LV Status available/syncd
LV Size (Mbytes) 1024
Current LE 64
Allocated PE 64
Used PV 1

LV Name /dev/vg00/lvol5
LV Status available/syncd
LV Size (Mbytes) 1024
Current LE 64
Allocated PE 64
Used PV 1

LV Name /dev/vg00/lvol6
LV Status available/syncd
LV Size (Mbytes) 4096
Current LE 256
Allocated PE 256
Used PV 1

LV Name /dev/vg00/lvol7
LV Status available/syncd
LV Size (Mbytes) 2048
Current LE 128
Allocated PE 128
Used PV 1

LV Name /dev/vg00/lvol8
LV Status available/syncd
LV Size (Mbytes) 6480
Current LE 405
Allocated PE 405
Used PV 1

LV Name /dev/vg00/lvol9
LV Status available/syncd
LV Size (Mbytes) 4608
Current LE 288
Allocated PE 288
Used PV 1

LV Name /dev/vg00/lvol10
LV Status available/syncd
LV Size (Mbytes) 14336
Current LE 896
Allocated PE 896
Used PV 1

--- Physical volumes ---
PV Name /dev/dsk/c2t1d0s2
PV Status available
Total PE 4318
Free PE 1719
Autoswitch On