[linux-lvm] PV#s are not unique

Peter Palfrader peter at palfrader.org
Thu Dec 13 23:18:02 UTC 2001


Hello,

On Wed, 12 Dec 2001, Heinz J . Mauelshagen wrote:

> > I think of trying to restore the metadata on all PVs using vgcfgrestore
> > since I have a few copies of vg_stuff.conf in /etc/lvmconf.  Would this
> > be a stupid idea?
> 
> No, not at all. This is actually the recommended wayx to restore a messy VG ;-)
> You need to run "pvcreate -ff" on all of the (former) PVs and vgcfgrestore on
> each of them afterwards.

Done that. Didn't help.

for PV in PVs.... pvscreate -ff
for PV in PVs.... vgcfgrestore

marvin:~/recover/backup# pvscan 
pvscan -- reading all physical volumes (this may take a while...)
pvscan -- ACTIVE   PV "/dev/scsi/host0/bus0/target3/lun0/part2" of VG "vg_system" [8.25 GB / 512.00 MB free]
pvscan -- inactive PV "/dev/ide/host2/bus1/target0/lun0/part1"  of VG "vg_stuff"  [76.31 GB / 0 free]
pvscan -- inactive PV "/dev/ide/host2/bus1/target1/lun0/part1"  of VG "vg_stuff"  [76.28 GB / 0 free]
pvscan -- inactive PV "/dev/ide/host2/bus0/target0/lun0/part1"  of VG "vg_stuff"  [76.28 GB / 0 free]
pvscan -- inactive PV "/dev/ide/host2/bus0/target1/lun0/part1"  of VG "vg_stuff"  [38.31 GB / 38.31 GB free]
pvscan -- inactive PV "/dev/ide/host0/bus1/target0/lun0/part1"  of VG "vg_stuff"  [57.22 GB / 56.50 GB free]
pvscan -- inactive PV "/dev/ide/host0/bus1/target1/lun0/part1"  of VG "vg_stuff"  [57.22 GB / 57.22 GB free]
pvscan -- inactive PV "/dev/ide/host0/bus0/target1/lun0/part1"  of VG "vg_stuff"  [38.34 GB / 352.00 MB free]
pvscan -- total: 8 [428.54 GB] / in use: 8 [428.54 GB] / in no VG: 0 [0]

marvin:~/recover/backup# vgscan 
vgscan -- reading all physical volumes (this may take a while...)
vgscan -- found active volume group "vg_system"
vgscan -- "/etc/lvmtab" and "/etc/lvmtab.d" successfully created
vgscan -- WARNING: This program does not do a VGDA backup of your volume
group

marvin:~/recover/backup# pvscan 
pvscan -- reading all physical volumes (this may take a while...)
pvscan -- ACTIVE   PV "/dev/scsi/host0/bus0/target3/lun0/part2" of VG "vg_system" [8.25 GB / 512.00 MB free]
pvscan -- inactive PV "/dev/ide/host2/bus1/target0/lun0/part1"   is associated to an unknown VG (run vgscan)
pvscan -- inactive PV "/dev/ide/host2/bus1/target1/lun0/part1"   is associated to an unknown VG (run vgscan)
pvscan -- inactive PV "/dev/ide/host2/bus0/target0/lun0/part1"   is associated to an unknown VG (run vgscan)
pvscan -- inactive PV "/dev/ide/host2/bus0/target1/lun0/part1"   is associated to an unknown VG (run vgscan)
pvscan -- inactive PV "/dev/ide/host0/bus1/target0/lun0/part1"   is associated to an unknown VG (run vgscan)
pvscan -- inactive PV "/dev/ide/host0/bus1/target1/lun0/part1"   is associated to an unknown VG (run vgscan)
pvscan -- inactive PV "/dev/ide/host0/bus0/target1/lun0/part1"   is associated to an unknown VG (run vgscan)
pvscan -- total: 8 [428.54 GB] / in use: 8 [428.54 GB] / in no VG: 0 [0]


[upgraded tools and kernel to 1.0.1 (formally 1.0.1rc4)]


Some other idea?

> Could you save your VG's metadata before by running
> 
> for PV in YOurPVs
>    do dd if=/dev/$PV of=VGDA.${VGName}.$PV bs=1k count=512
> done
> 
> and storing the copies on tape or something so that we are able to backup
> for potential further investigation?

I put them up at http://www.palfrader.org/~weasel/palfrader-lvm.tar.gz
if you want to fetch it.

					yours,
					peter

-- 
 PGP signed and encrypted  |  .''`.  ** Debian GNU/Linux **
    messages preferred.    | : :' :      The  universal
                           | `. `'      Operating System
 http://www.palfrader.org/ |   `-    http://www.debian.org/




More information about the linux-lvm mailing list