[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: to lvm or not to lvm?



On Mon, Apr 30, 2007 at 09:30:02PM +0800, Bob wrote:
> Stefan Monnier wrote:
> >>crash, given this, what would be really cool would be to partition the
> >>system at install time using a slightly mean, but granular, best guess
> >>layout [0] so things should fit in their partitions without too much 
> >>wasted
> >>space, then configure each partition as one mount point on one logical
> >>volume consisting of one physical volume [1] and then partition up the 
> >>rest
> >>of the drive in 1GB chunks that sit in a pool of unused logical 
> >>volumes so
> >>they can be assigned to any mount point when needed,
> >>preferably automatically. 
> >>    
> >
> >Huh?  Why on earth use physical partitions for that?
> >LVM is a perfect fit for such a situation.
> >
> >Put your whole disk as a single LVM physical volume.
> >Carve it into the few partitions you need (with little space left on 
> >each)
> >and leave the rest of the space unused in your volume group.
> >
> >You can then later on grow any partition that needs to with a simple
> >lvextend&resize2fs.  That part can also be done with a 1GB granularity 
> >if
> >you want.
> 
> Ah, didn't know that, I'll have to tinker with LVM again, it's been a 
> while. How easy would it be to automate the process of adding space to a 
> partition when it's nearly full, and how easy is it to reclaim it when 
> you've cleared the logs or whatever?

Why are you after this complexity of automatically growing partitions?
disk space is cheap. recovering from problematic fs resizes is NOT. I
understand the idea of tuning your partition sizes so that you can
have the optimal size and this is very doable with LVM, but if you've
got portions of your directory tree that might grow really big, then
just give them the space and be done with it. It you later determine
that you don't need it all, you can adjust then with LVM with relative
ease. 

And if your logs are getting so big, then you need to look into other
solutions: do you really need all the stuff you are logging; are you
using logrotate; is there some problem that is spewing out errors into
your logs etc etc etc.

that said, you may of course do whatever you like to your system. And
the idea sounds cool on the face of it. I just think you're asking for
trouble and unneeded complexity. 

.02

A

Attachment: signature.asc
Description: Digital signature


Reply to: