31259fd8ee560382681900af1b560ee0c644f84e
LVM Salvage Tools
Tools to scan and recover files from damaged LVM volumes.
Scan:
./scan.sh '/lvm-vol/path1'
./scan.sh '/lvm-vol/path2'
./scan.sh '/lvm-vol/path3'
Recover:
./recover.sh '/lvm-vol/path1'
The source tree is mirrored beneath /mnt/recovery:
/lvm-vol/path1 -> /mnt/recovery/lvm-vol/path1
/lvm-vol/path2 -> /mnt/recovery/lvm-vol/path2
/lvm-vol/path3 -> /mnt/recovery/lvm-vol/path3
The scan creates uniquely named manifest/summary files under /mnt/recovery.
Classifications:
SAFE
LOST
ETB_LOST
ETB_SURVIVES
UNKNOWN
OTHER
Only SAFE files are recovered.
Safety:
- damaged LV must remain kernel read-only;
/mnt/recoverymust be a separate mounted filesystem;- filesystem root
"/"is refused; ".."is refused;- each file is dumped by inode;
- dumped byte size must match inode size;
- existing same-size recovered files are skipped;
- at least 2 GiB free is preserved on
/mnt/recovery.
Known dead ext4 block range: 3418636288 - 4395389951
Languages
Python
97.3%
Shell
2.7%