[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[linux-lvm] lost /etc/lvm



Hello,

I have two large devices /dev/sdc and /dev/sdd, which both have lvm.
Yesterday the OS was reinstalled and /etc/lvm was overwritten (there
is no backup).  It also looks like anaconda placed a new disk label on
the two devices.  Fortunately, I was able to reconstruct a backup of
the lvm metadata for /dev/sdd, but am not sure how to do this for
/dev/sdc.  I believe I know what the metadata for /dev/sdc is, but I
don't know what any of the uuids are.  My basic question is whether I
can possibly create new uuids without totally hosing the system.

Let me explain what I did for /dev/sdd and what I am considering to /dev/sdc:

1. Created a new file containing the metadata for the volume group
called jetstor1 on /dev/sdd and put it in /etc/lvm/backup.  I was able
to find this information on the disk using:
 strings /dev/sdd

2. Removed the disk label on /dev/sdd using:
 dd if=/dev/zero of=/dev/sdd bs=1k count=1

3.  Used pvcreate to restore the metadata:
 pvcreate -u <snip: the pv uuid I recovered> /dev/sdd

4.  Restored the volume description using:
 vgcfgrestore -f jetstor1 jetstor1

5. Made the volume activate using:
 vgchange -ay

This process worked just fine for /dev/sdd, but 'strings /dev/sdc'
doesn't contain any backup of the metadata for some reason.  I believe
I know what all the information should be except for the uuids.  So my
question is can I just make up new uuids and if so how.  I have
attached what I believe the backup should be with the exception of not
knowing the uuids.

Thanks,

-- 
Jarrod Millman
Computational Infrastructure for Research Labs
10 Giannini Hall, UC Berkeley
phone: 510.643.4014
http://cirl.berkeley.edu/

Attachment: jetstor0
Description: Binary data


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]