[linux-lvm] LV Fragmentation determination

Jon Bendtsen jon+lvm at silicide.dk
Wed Nov 6 03:20:01 UTC 2002


Donald Thompson wrote:
> 
> First off, can LV's become fragmented across a PV/VG? If yes then...

yes they can. But that depends on how you made it. The default is to
use the next free PE, but you can specify the PE's.

 
> 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?

i dont know, but cant you use lvdisplay, pvdisplay, or the other
display commands to see the PE numbers ?

 
> 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 think you can

 
> 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.

Properly much, but is that bad ? I mean, sure you have to move the head
every PE size, but how big are your PE size ? The default is 4MB.




JonB




More information about the linux-lvm mailing list