Question: Is there a tool supporting de-fragmentation of LVM2 logical volumes ? (Making their extents into consistent sequences)
Preferably by defining desired order of extents (something like "partition A on beginning of disk, B after A, but X on the end of PV")
Of course there is a need of considering following cases:
- VG consists one PV
- VG consists many PV, but each LV sits on one PV
- VG consists many PV, LVs have their extents across many PV
If partitions can be stripped or not, can be discussed.
Know-how:
It's possible to move ranges of extents with pvmove , e.g. : pvmove --alloc anywhere /dev/sdb1:1000-1999 /dev/sdb1:0-999 .
Reason:
Because moving many ranges manually with pvmove is purely repeatable thing (questionable if brainless or not), I was curious if there exists tool for automatizing/supporting this process. If not... maybe doing one by myself - do you think such tool would be useful for other people?
LVM2 defragmenterorpvmovedo the job. – Grzegorz Wierzowiecki Aug 20 '12 at 22:36