[linux-lvm] LV Fragmentation determination

Donald Thompson dlt at lunanet.biz
Wed Nov 6 02:24:01 UTC 2002


First off, can LV's become fragmented across a PV/VG? If yes then...

I'm looking for an easy way to determine how fragmented an LV might been
inside the VG. Is there any command I can run that'll give me nice
estimate on this?

Assuming theres no such command, can I determine this by looking at the
PE's displayed from an 'lvdisplay -v' command? I'm guessing it'd be pretty
easy to write a script that analyzes the PE numbers and looks for skips in
the sequence to give myself an idea of the amount of fragmention for the
LV. Or am I competely wrong thinking you can use PE's to make such a
determination?

I do shrinks and enlarges for different LV's sometimes on an almost daily
basis, and my VG's are getting to be very old. So I'm curious to see how
fragmentated my LVs have become.

TIA for any clues.

-Don





More information about the linux-lvm mailing list