[linux-lvm] uuid already in use

Thomas Krichel krichel at openlib.org
Tue Jan 8 17:55:28 UTC 2008


  I have a disk /dev/hdb that appears to be physically
  damaged. It is in a volume group vg1. At some 
  stage it was so bad that I could not see it

raneb:# fdisk /dev/hdb

Unable to open /dev/hdb

  I ran 

raneb:# vgreduce vg1 --removemissing

  but could not restore the volume group to run,
  it kept complaing that /dev/hdb was missing.

  I read 


  and tried to apply the procedure described in the
  section "disk permanently removed". I first had
  to order a new disk. A new 500G disk arrived today.

  After a long shutdown, today the disk appears
  visible again, miraculously. 

raneb:/etc/lvm/archive# fdisk -l /dev/hdb

Disk /dev/hdb: 200.0 GB, 200049647616 bytes
255 heads, 63 sectors/track, 24321 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/hdb1               1       24321   195358401   83  Linux

  So I try to see it in lvm

raneb:/etc/lvm/archive# pvdisplay 
  Warning: Volume Group vg1 is not consistent
  --- Physical volume ---
  PV Name               /dev/hdd1
  VG Name               vg1
  PV Size               186.31 GB / not usable 3.69 MB
  Allocatable           yes 
  PE Size (KByte)       4096
  Total PE              47694
  Free PE               47694
  Allocated PE          0
  PV UUID               vy3MOc-47sl-zUal-nhdO-FFX3-ispO-Rl0h8p
  --- Physical volume ---
  PV Name               /dev/hdc
  VG Name               vg1
  PV Size               465.76 GB / not usable 4.02 MB
  Allocatable           yes 
  PE Size (KByte)       4096
  Total PE              119234
  Free PE               119234
  Allocated PE          0
  PV UUID               NxRIE1-ROxx-pfjJ-QHzh-7B80-F7wt-kRCmSK

  I try to recover the metadata. The correct one is in 
  vg1_00026.vg, because this is the version before the
  "vgreduce vg1 --removemissing". But

raneb:/etc/lvm/archive# pvcreate --uuid v3HXpi-d5QN-OGiW-VFBG-TNIY-qTun-bFhlVd  --restorefile vg1_00026.vg /dev/hdb
  uuid v3HXpi-d5QN-OGiW-VFBG-TNIY-qTun-bFhlVd already in use on "/dev/hdb1"

  I am puzzled. pvdisplay does not see the uuid value but
  pvcreate says it is is use?? What am I missing here?


  Thomas Krichel                    http://openlib.org/home/krichel
                                               skype: thomaskrichel

More information about the linux-lvm mailing list