Rescuing files from an LVM partition

Andy Green andy at warmcat.com
Thu Oct 4 15:21:33 UTC 2007


Somebody in the thread at some point said:

> One of my worries is; if I copy my setup ( /) onto a
> new ext3 partition, will the new one then be an LVM
> setup? 

No, the new one won't be mutated into LVM by copying files from the LVM
partition... they're just files being copied over at that point.  To get
"LVM-ness" on a partition you have to meddle with the partition after
creating a fresh one.  If you create your new partition with fdisk, mark
it as "Linux" and then mkfs.ext3 it, there is no LVM involved with that
partition nor will there ever be (may it rest in peace).

> Will it copy all the confog files (wherever
> they are?) or do I have to delete some? If I leave
> /dev behind, is that enough to get rid of LVM?

No if you reformatted the underlying partition ext3, no LVM actions will
take place any more, during boot or ever.  It goes and looks at the
partition, it'll see it isn't an LVM any more and give up.

You'll need to adjust

/etc/fstab

after you make the change to tell it to mount your new direct ext3
partition instead of the /dev/VolGroup00/LogVol00 -ish LVM one.

Just to be clear, here is the LVM way considering 1 LVM logical volume

/dev/sda  <--- contains whole disk

 /dev/sda1  <--- contains partition 1: LVM phys volume

  /dev/VolGroup00/LogVol00 <--- contains fs inside LVM, eg, ext3


Here is the no LVM way

/dev/sda  <--- contains whole disk

 /dev/sda1  <--- contains partition 1: ext3 filesystem

-Andy




More information about the users mailing list