1827807 Members
2903 Online
109969 Solutions
New Discussion

vgdisplay errors

 
Joe Robinson_2
Super Advisor

vgdisplay errors

In the past I had an external fast-wide SCSI drive hooked up for COOP/quick restore purposes. I've since moved on to a different hardware schema, and the volume group that was assigned to that disk removed. However, when I do a vgdisplay, I get the following error:

No such file or directory vgdisplay: Cannot display volume group ?/dev/vg31?.

How can I remove this 'ghost' image of the non-existant volume group?

Thanks in advance again,

Joe Robinson
14 REPLIES 14
Sachin Patel
Honored Contributor

Re: vgdisplay errors

I think vgcfgbackup will work

Sachin
Is photography a hobby or another way to spend $
James R. Ferguson
Acclaimed Contributor

Re: vgdisplay errors

Hi Joe:

# vgexport /dev/vg31

Regards!

...JRF...

Deshpande Prashant
Honored Contributor

Re: vgdisplay errors

Hi
Export it out.
#vgexport /dev/vg31

Thanks
Prashant.

Take it as it comes.
Sanjay_6
Honored Contributor

Re: vgdisplay errors

Hi Joe,

IF the volume group is active on your system, first disable it,

vgchange -a n /dev/vg_name

then to remove it completely from your system

vgexport /dev/vg_name

If there are any references of this vg in /etc/fstab, delete the same.

That should be all. Hope this helps.

thanks
Joe Robinson_2
Super Advisor

Re: vgdisplay errors

Thanks to everyone who has responded...it's appreciated. I'd thought of the vgexport earlier, however, the device files are no longer in /dev, so the system can't recognize the export command.

none of the commands I'm looking at in the SA commands book seem to be able to recognize the commands. Looking further, I'd thought of recreating the vg on another disk, however I don't have any unused disks that I can create the vg on. Suggestions?
Thierry Poels_1
Honored Contributor

Re: vgdisplay errors

Hi,
if everything(!) is removed of that VG, you can rename /etc/lvmtab and execute 'vgscan -a'.

good luck,
Thierry.
All unix flavours are exactly the same . . . . . . . . . . for end users anyway.
Santosh Nair_1
Honored Contributor

Re: vgdisplay errors

Joe,

How did you remove the VG from the system originally? It sounds like you just removed the /dev/VGNAME files(?).

Do you see the VG if you do a strings on /etc/lvmtab?
If so, then recreate the VG:

mkdir /dev/VGNAME
mknod /dev/VGNAME/group c 64 0x0nn0000
vgcreate /dev/VGNAME

then if you want to get rid of the VG,
do a:

vgexport VGNAME

If the VG is not listed in /etc/lvmtab, then try doing a vgscan to try to rebuild the VG. Hope this helps.

-Santosh
Life is what's happening while you're busy making other plans
Joseph C. Denman
Honored Contributor

Re: vgdisplay errors

The reason for the error is the device is still in the lvmtab. Export will not work because the device is gone. You will need to recreate your lvmtab. This is what I would do:

vgdisplay -v > /tmp/vgdis.before
mv /etc/lvmtab /etc/lvmtab.bak
vgscan
vgdisplay -v > /tmp/vgdis.after

vgscan will rebuild you lvmtab. If you have devices with alternate paths, you will probably have to readd the alternate paths. Check the differences in the before and after files.

...jcd...
If I had only read the instructions first??
Joseph C. Denman
Honored Contributor

Re: vgdisplay errors

Oh....

If you wish to look at your lvmtab,

strings /etc/lvmtab

...jcd...
If I had only read the instructions first??
Patrick Wallek
Honored Contributor

Re: vgdisplay errors

How about just recreating the /dev/vg31 directory and its group file?

# mkdir /dev/vg31
# mknod /dev/vg31/group c 64 x??0000 --->where ?? is a unique minor # for this VG.

Then do:

# vgexport /dev/vg31

That should work for you.
Hopefully!
Joe Robinson_2
Super Advisor

Re: vgdisplay errors

Thanks again for all who have responded.

I'd thought to simply do mknod, however the physical disk I was using is no longer on the system, therefore I anticipate I'd get 'no such device or address'.

right now we're in the midst of rolling over from one budget year to the next, so I'm not inclined to do anything that would endanger production on the system, but would anticipate that I'll rename the lvmtab and perform a vgscan to see if that will clear the problem. My question is still this, however: if there is no indication of the vg in either the fstab or lvmtab, where is vgdisplay looking to identify this vg on my system?
Sanjay_6
Honored Contributor

Re: vgdisplay errors

Hi Joe,

Have you tried "strings /etc/lvmtab" to see if there is any reference to the missing vg in that file.

Just a thought.

thanks
Jeff Gyurko
Frequent Advisor

Re: vgdisplay errors

If you've done just a "vgdisplay -v" and your seeing these errors, you've got this VG defined in your lvmtab. The outlined steps to re-create your lvmtab should fix this. Remember to rename your current lvmtab. If you do not, vgscan will just use this to give you your information, it will not re-create it.

You can also do "vgscan -v -p" to do a preview of the create to see if this will remove the entries for the "problem" VG. Once comfortable that it's removed, do it for real (without -p) after you've renamed the current lvmtab.

J

Isaac_4
Frequent Advisor

Re: vgdisplay errors


- The first thing that you should know is the quantity of logical volumes you have in VG to care

the above-mentioned to be able to execute with success the vgimport

- I pass two it is to make the following steps

mkdir /dev/VGNAME

mknod /dev/VGNAME/group c 64 0x0nn0000

vgimport -m /tmp/vgfile -v /dev/vgname /dev/dsk/cxtxdx

The file vgfile can generate it manually and it should contain the following thing according to the quantity of lvols that you had in the VG.
#cat /tmp/vginfo
lvol1
lvol2
lvol3 etc...




vgchange -a and vg01

The file /etc/lvmtab is not necessary to generate it again because when the vgimport this file is executed it is upgraded.

After this to carry out a fsck for each lvol and to verify the consistency of the filesystem
The time is gold