1748278 Members
4180 Online
108761 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??