Operating System - HP-UX
1748256 Members
3811 Online
108760 Solutions
New Discussion юеВ

vgchange - couldn't query volume group: Invalid argument.

 
SOLVED
Go to solution
Ian Killer_1
Regular Advisor

vgchange - couldn't query volume group: Invalid argument.

Not your usual "minor number" problem, but instead I get the "invalid argument" when executing a vgchange. There doesn't appear to be anything wrong with the group file. I've tried vgcfgrestore and re-creating the lvmtab without any joy. vgscan creates an empty lvmtab, and produces the following output...

Any help will be greatly appreciated. Thanks.

# vgscan -v
Couldn't query volume group "/dev/vg00/group":
Invalid argument
Couldn't query volume group "/dev/vg01/group":
Invalid argument
Couldn't query volume group "/dev/vg02/group":
Invalid argument
Couldn't query volume group "/dev/vg03/group":
Invalid argument
Couldn't stat physical volume "/dev/dsk/c4t2d0":
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/c0t3d0
/dev/dsk/c0t4d0

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/c0t5d0
/dev/dsk/c0t6d0

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/c2t4d0
/dev/dsk/c2t4d1
/dev/dsk/c2t4d2
/dev/dsk/c2t4d3
/dev/dsk/c3t4d0
/dev/dsk/c3t4d1
/dev/dsk/c3t4d2
/dev/dsk/c3t4d3

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/c2t5d0
/dev/dsk/c2t5d1
/dev/dsk/c3t5d0
/dev/dsk/c3t5d1

The Volume Group /dev/vg00/group was not matched with any Physical Volumes.
The Volume Group /dev/vg01/group was not matched with any Physical Volumes.
The Volume Group /dev/vg02/group was not matched with any Physical Volumes.
The Volume Group /dev/vg03/group was not matched with any Physical Volumes.
Scan of Physical Volumes Complete.



Where ever the gypsies rome.
12 REPLIES 12
Sridhar Bhaskarla
Honored Contributor

Re: vgchange - couldn't query volume group: Invalid argument.

Hi,

Interestingly /dev/vg00/group which is a device file pointing to the VG is being identified as the VG itself. I don't know if it is a bug or something but I would try it manually since the vgscan already listed the physical volumes.

mkdir /dev/vgtest
mknod /dev/vgtest/0x090000
vgimport vgtest /dev/dsk/c2t5d0 /dev/dsk/c2t5d1

and see if it works.

And why are you trying to vgscan and what was the origin of the problem?.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Ian Killer_1
Regular Advisor

Re: vgchange - couldn't query volume group: Invalid argument.

thx sri. Here's the results....

# mkdir /dev/vgtest
# mknod /dev/vgtest/group c 64 0x050000
# vgimport vgtest /dev/dsk/c0t3d0 /dev/dsk/c0t4d0
Couldn't query volume group "/dev/vgtest":
Invalid argument
Where ever the gypsies rome.
Sridhar Bhaskarla
Honored Contributor

Re: vgchange - couldn't query volume group: Invalid argument.

Hi,

Then it looks like to me that it has something to do with maxvgs or the major and minor numbers.

#/usr/lbin/sysadm/system_prep -s /tmp/system
grep maxvgs /tmp/system

#ioscan -f
#insf -e
#vgscan
#vgdisplay -v |grep "VG Name"

Any errors of suspecion in syslog.log or dmesg?.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Ian Killer_1
Regular Advisor

Re: vgchange - couldn't query volume group: Invalid argument.

Ok.
Grepping for maxvg in a fresh system file produced nothing. Which means it defaults to 10.

THe ioscan, insf, vgscan, vgdisplay process produces the same results as above except with additional lines for the vgtest.

syslog is virtually empty.

after 10-15 vgchange/display/scan executions the diagnostic subsystem produces an excessive io message. Suspect this is a symptom not a cause.
Where ever the gypsies rome.
Ian Killer_1
Regular Advisor

Re: vgchange - couldn't query volume group: Invalid argument.

New thought. What's your opinion of this?

This system is an ignite server and has nearly 150gb of data I want to (must) keep. I don't believe this problem is disk related but more likely an lvm subsystem problem. For the forums it doesn't appear that anyone else has ever had this problem so I suspect the lvm subsystem ins't in a normal state. I have good root vg (OS) separation and now that I know that I don't need mapfiles to re-import the vg's I think I'll re-install the OS. It will be faster. :-) Cheers.
Where ever the gypsies rome.
Todd McDaniel_1
Honored Contributor

Re: vgchange - couldn't query volume group: Invalid argument.

Ian,

very strange indeed...

You dont say how you got to this point? Where you rebooting and the box came up this way? Were there any changes you can document?

Sounds like some one removed all your devices from your VGs...

Do you see all the devices in the /dev/dsk/* dirs? Are all your disks local or attached?

I will look around and check back.
Unix, the other white meat.
Sridhar Bhaskarla
Honored Contributor

Re: vgchange - couldn't query volume group: Invalid argument.

Hi,

That sounds like logical.

Did you have a make_tape_recovery tape done on this box?. If so, you can probably use it. If you have a blank disk, then you may want to load the OS on it so that you can still have the old data. If possible try to copy /etc/lvmconf from this system to a remote system. It will have the disk and mapfile information.

As a last resort try '/sbin/vgscan' instead of /usr/sbin/vgscan to see if it helps.

-Sri

You may be disappointed if you fail, but you are doomed if you don't try
Helen French
Honored Contributor

Re: vgchange - couldn't query volume group: Invalid argument.

Just a simple try:

# insf -e

# vgscan -v

Any luck?
Life is a promise, fulfill it!
Chris Watkins_1
Respected Contributor
Solution

Re: vgchange - couldn't query volume group: Invalid argument.

This almost reminds me of what happens when you accidentally restore
an /etc/ioconfig file from another machine, but it's been
long enough since I've seen it happen that I can't be positive.
The problem occurred after the reboot of the machine in question.

At this point, if you remember which disks go where...
# vgimport vg03 /dev/dsk/cxtxdx /dev/dsk/cxtxdx ...

Repeat for vg02 and vg01.
Vg00 may or may not be more tricky.
If nothing else, I believe you can import it from lvm maintenance mode.

Or just ignite the box from your latest image, of course...
particularly if it's recent enough that no serious changes have occurred.
Then import in the other 3 vg's afterwards.
Do let us know what you find!


Not without 2 backups and an Ignite image!