VGs gone!
My volumes have disappeared. can anyone help recover?
setup:
I have two drives partitioned identically so that they can be mirrored. each drive has a boot, swap, and a very large lvm partition. We had a problem with the root partition on the first drive, so we decided to restore from the mirror using dd. After doing this, the VGs are not in existence anymore. running 'vgscan' shows it creates /etc/lvmtab and /etc/lvmtab.d correctly, but they are empty.
Is there a way to recreate this information?
Quoting David Minor <[email protected]>:
<SNIP>
Quoted 6 lines
We had a problem with the
root partition on the first drive, so we decided to restore from the mirror using dd. After doing this, the VGs are not in existence anymore. running 'vgscan' shows it creates/etc/lvmtaband/etc/lvmtab.dcorrectly, but they are empty.
How were the drives mirrored? Did you use some sort of raid or was it all done by using dd to copy the whole drive?
What does pvscan show?
Rupert
Quoted 11 lines · --- Rupert Hair
Quoted 2 lines
We had a problem with the
root partition on the first drive, so we decidedto
Quoted 1 line
restore from the mirror using dd. After doing
this,
Quoted 3 lines
the VGs are not in existence anymore. running
'vgscan' shows it creates/etc/lvmtaband/etc/lvmtab.dcorrectly, but they are empty.How were the drives mirrored? Did you use some sort of raid or was it all done
by using dd to copy the whole drive?
sorry, left that part out: using rsync to mirror the drives.
Quoted 2 lines
What does pvscan show?
pvscan complains about "pv_read(): read" reading
physical volumes.
with -d on pvscan, I think everything looks good
until:pv_read -- going to read /dev/md9pv_read -- LEAVING with ret: -282
Thanks,
dm
You should not have recreated the lvmtab without backing up the total config, and restoring it after dding the partitions back.
Quoted 18 lines · David Minor
My volumes have disappeared. can anyone help recover?
setup:
I have two drives partitioned identically so that they can be mirrored. each drive has a boot, swap, and a very large lvm partition. We had a problem with the root partition on the first drive, so we decided to restore from the mirror using dd. After doing this, the VGs are not in existence anymore. running 'vgscan' shows it creates/etc/lvmtaband/etc/lvmtab.dcorrectly, but they are empty.Is there a way to recreate this information?
_______________________________________________
linux-lvm mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
Signature · 2 lines
Austin Gonyou <[email protected]> Coremetrics, Inc.
Quoted 5 lines · --- Austin Gonyou
You should not have recreated the lvmtab without backing up the total
config, and restoring it after dding the partitions back.
The problem seems to have been that the mirrored standard root partition didn't have a /proc mount point. Once I created the /proc directory and manually mounted it I was able to run vgscan without any problems. Basically, I did:
# mkdir /proc # mount -t proc proc /proc # vgscan # vgdisplay # mount -a
and everything worked.
I hear you saying that there's a better way for me to backup my system. Right now I'm just rsync-ing from each of the partitions on the primary drive to the secondary drive. Is there something I should do at "mirror" time to facilitate the lvm setup coming up better next time?