[linux-lvm] LVM success story + suggestion
Eric M. Hopper
hopper at omnifarious.mn.org
Mon Oct 16 13:09:24 UTC 2000
I wipe out my / partition and re-installed my entire OS over
this weekend without losing any user data. This would not have been
even remotely feasible without the fine grained partitioning that LVM
I also converted filesystems over to reiserfs. I think that
doing this has caused my LVM partitions to become rather fragmented. It
would be nice to have a vgdefragment tool that would move around logical
extents in an attempt to make them all contiguous again. I doubt that
fragmentation on a 4Mb block basis has that huge of an effect, but I
still think it would be nice. :-)
The defragment tool is probably something you'd want to do on a
live system, so it should be done in a transactional sort of way with
data structures being updated on stable storage in such a way that if
things crash in the middle the LVM structures are recoverable. I think
this could be done though.
In fact, here's a sketch of how it could be done...
Allocate new PEs to move a bunch of LEs to, but don't update the
data structures to say they're allocated. Copy the LEs to the new PEs,
flush the blocks to disk. Update the data structures to say the LEs are
now at the new location. Flush those blocks to disk. Repeat as
This requires that the update of an individual disk block be an
atomic operation and that there be no interblock dependencies in the LVM
data structures being updated.
This could also make pvmove operations safe.
Have fun (if at all possible),
The best we can hope for concerning the people at large is that they
be properly armed. -- Alexander Hamilton
-- Eric Hopper (hopper at omnifarious.mn.org http://www.omnifarious.org/~hopper) --
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 232 bytes
Desc: not available
More information about the linux-lvm