[linux-lvm] dd of a used part of a logical volume?

Alexy Khrabrov list+lvm at setup.org
Fri May 28 06:45:53 UTC 2004

I cross-post a part of my ReiserFS list message, as it
concernes copying of a used part of a filesystem running
on top of LVM.

I'd like to recover some files from a huge reiserfs file system.  It is
created above an LVM volume, which in its turn sits on a RAID.  The LVM
volume is the only one in a group which consists of the sole RAID device.
I just deleted two files in a directory I know by name, the directory is
still there.  No writing was done after the rm, except all files copied
elsewhere and diff -r'ed checked, hope that does not alter the originals.

Now I'd like to play with the dd copying of the whole reiserfs (I'm
avoiding the word partition since it covers the whole logical volume
which spans the whole RAID device).  I simply do not have space to copy
the whole RAID, but the size of the used space on this reiserfs volume was
under about 9 GB.  I wonder how can I copy just about that -- I assume it
fills the logical volume contiguously, so I can dd the first 9 GB and then
try the loopback mount/rebuild.  Now that I'm running it, it scrolls lines

pass0: reading block 20626210 failed

like crazy, perhaps up to the whole 150 GB original size declared

Then is quits, saying something about invalid argument to lseek,
not surprisingly as I cut dd short.

Are there LVM methods to shrink it/copy just the used blocks in
conjunction with reiserfs, such as resize_reiserfs?

Alexy Khrabrov :: www.setup.org :: Age Quod Agis

More information about the linux-lvm mailing list