Redundant VGID LV sneaked in (5 Views)
Reply
Honored Contributor
Ralph Grothe
Posts: 2,631
Registered: ‎04-09-2000
Message 1 of 7 (5 Views)

Redundant VGID LV sneaked in

Hi,

yesterday I had to add new PVs to a MC/SG cluster package's shared VG.

While issuing the (preview) vgexport in order to create a map file for distribution to failback nodes, somehow (unfortunately unnoticed by me) a bogus VGID LV sneaked in:

# head -3 vgb01_20021212.map
VGID 29256fe4392e2fd8
1 VGID
1 lvol1

Today, when I wanted to extend the filesystems on the LVs I stumbled over the bogus LV and realized what happened.

As I wasn't sure, so far I only cleaned the LVM metadata from the cluster nodes that currently don't run the package,
and I still refrained from issueing an lvremove of VGID on the node that runs the package and has the real LV mounted.

Btw, when inspecting the LVM layout of this VG (and PVs) with the commands vgdisplay, lvdisplay, pvdisplay the bogus VGID LV appears to be treated as an alias (i.e. exactly same data, mounting of it fails but croaks device busy)

Any idea if it's safe to do the lvremove on the package holding node?

Regards
Ralph
Madness, thy name is system administration
Honored Contributor
John Palmer
Posts: 1,842
Registered: ‎07-28-1997
Message 2 of 7 (5 Views)

Re: Redundant VGID LV sneaked in

This sounds like VGID has been created as a duplicate device file.

DON'T run lvremove. Just remove the device files /dev/vg??/VGID and /dev/vg??/rVGID.

Regards,
John
Honored Contributor
Carlos Fernandez Riera
Posts: 1,172
Registered: ‎09-16-1998
Message 3 of 7 (5 Views)

Re: Redundant VGID LV sneaked in

Do a vgexport on the halted node, edit the map file and and remove line 1 VGID.

VGID 29256fe4392e2fd8
1 VGID
1 lvol1

Then vgimport again.
unsupported
Honored Contributor
Ralph Grothe
Posts: 2,631
Registered: ‎04-09-2000
Message 4 of 7 (5 Views)

Re: Redundant VGID LV sneaked in

Carlos,

I had done this already when I cleaned the LVM config for the other nodes.

Madness, thy name is system administration
Honored Contributor
Ralph Grothe
Posts: 2,631
Registered: ‎04-09-2000
Message 5 of 7 (5 Views)

Re: Redundant VGID LV sneaked in

John,

will simple removal of redundant device files suffice?

I think for instance vgdisplay will still list the bogus LV though.
(well, you could call this a mere cosmetic detriment)

The device files are all referenced through individual inodes:

# ll -i /dev/vgb01/*
2479 brw-r----- 1 root sys 64 0x080001 Mar 12 2001 /dev/vgb01
/VGID
2480 crw-r--r-- 1 root sys 64 0x080000 Mar 12 2001 /dev/vgb01
/group
2481 brw-r----- 1 root sys 64 0x080001 Mar 12 2001 /dev/vgb01
/lvol1
2482 crw-r----- 1 root sys 64 0x080001 Mar 12 2001 /dev/vgb01
/rVGID
2483 crw-r----- 1 root sys 64 0x080001 Mar 12 2001 /dev/vgb01
/rlvol1
Madness, thy name is system administration
Honored Contributor
Jean-Louis Phelix
Posts: 724
Registered: ‎10-07-2002
Message 6 of 7 (5 Views)

Re: Redundant VGID LV sneaked in

Hi,

Yes, John is right, a simple removal is enough. Vgdisplay tries to find any information related to entries in /dev/vgXX. For example, if you create dummy entries (lvol and rlvol) with other minor numbers, vgdisplay will display them with a 0 size.

Regards.
It works for me (© Bill McNAMARA ...)
Acclaimed Contributor
James R. Ferguson
Posts: 21,184
Registered: ‎07-06-2000
Message 7 of 7 (5 Views)

Re: Redundant VGID LV sneaked in

Hi Ralph:

I agree with John. Simply remove the "VGID" device files.

I built a volume group with a logical volume. I then inactivated it ('vgchange -a n') and created ('mknod') device files with the same minor number. Thus an 'ls -l /dev/vgXX/*' looks like your presentation.

When I activated the volume group and did a 'vgdisplay -v' you see a current LV count of <1> but an open LV count of <2>. Doing a 'lvdisplay -v' of the "real" LV or the one named "VGID" shows extent mapping to the same physical extents as you would expect.

Regards!

...JRF...
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.