12-13-2002 04:29 AM
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
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?
12-13-2002 06:45 AM
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
2480 crw-r--r-- 1 root sys 64 0x080000 Mar 12 2001 /dev/vgb01
2481 brw-r----- 1 root sys 64 0x080001 Mar 12 2001 /dev/vgb01
2482 crw-r----- 1 root sys 64 0x080001 Mar 12 2001 /dev/vgb01
2483 crw-r----- 1 root sys 64 0x080001 Mar 12 2001 /dev/vgb01
12-13-2002 08:10 AM
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.
12-13-2002 08:19 AM
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.