Skip to contentSkip to conversation

Broken disk, any chances ?

linux-lvm Thomas Svedberg 2 participants 2 messages Aug 2, 2005

lore
Share & tools
lore
#0 lore raw

So I have a broken disk (with root on LVM) and lost the block(s) containing the LVM partition info. I have moved the entire disk to a backup (dd_rescue) but can not find the LVM partition with any tools I tried (gpart, testdisk). Am I f.cked or can I still get some data of these lost partitions (3 ext2/3 partitions on that LVM VG) ?

Signature · 9 lines
/ Thomas
.......................................................................
 Thomas Svedberg
 Department of Applied Mechanics
 Chalmers University of Technology

 Address: SE-412 96 G�teborg, SWEDEN
 E-mail : [email protected]
.......................................................................
#1 lore raw

You could write a for loop and use dm to try mounting the disk.

i=0; while true; do
i=$(($i + 1))
size=$((<disk_size> - $i))
echo "0 $size linear /dev/<disk> $i" | dmsetup create recover mount -t ext3 /dev/mapper/recover /mnt
if [ $? -eq 0 ] ; then echo "FS found at offset $i"; break; fi
done

Remember to record the offset once found and start from there plus 1 next time... hopefully finding the next FS on the disk. I'm not sure if this setup would get confused by the multiple super blocks that ext writes out or not. Couldn't hurt to try.

brassow

Quoted 20 lines · Thomas Svedberg

So I have a broken disk (with root on LVM) and lost the block(s) containing the LVM partition info. I have moved the entire disk to a backup (dd_rescue) but can not find the LVM partition with any tools I tried (gpart, testdisk). Am I f.cked or can I still get some data of these lost partitions (3 ext2/3 partitions on that LVM VG) ?

Signature · 16 lines
/ Thomas
.......................................................................
 Thomas Svedberg
 Department of Applied Mechanics
 Chalmers University of Technology

 Address: SE-412 96 G�teborg, SWEDEN
 E-mail : [email protected]
.......................................................................


_______________________________________________
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/