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

Re: questions about lvm2



On Wed, Jan 21, 2009 at 8:13 PM, Ron Johnson <ron.l.johnson@cox.net> wrote:
>
> If I have lots of existing data in JBODs, would I create a PV and VG on the
> new drive, mv all the data from the existing drives to the new VG, then add
> my existing drives (while also enlarging the fs) to the one-drive VG, thus
> making an uber-device?


That is how I started and how I've been, more or less, running with
LVM for years, though I think I'm about to change.

First, I've actually had different FS with different settings for
different purposes.  Mostly different bytes-per-inode for file system
that have lots of big or lots of small files.  Some have ext2 vs ext3
differences.  Some are backups of retired windows machines that are
just readonly.  And i'd do the occasional snapshot to do backups from.

As each FS would fill up, I would extend that particular FS.  Some
would reach a steady state.  One interesting side affect of this is
the fact that I would fragmentation at the filesystem level, as
opposed to the file level.  Every once in a while, I'd move LVs around
to defrag (usually as part of adding a newer larger harddrive, and
retiring the smaller one).

One pain point I have is this:  In order to run resize2fs(8), you have
to fsck the FS first.  As they grow larger and larger, this takes
longer and longer.  I have a 2TB FS now that I really don't want to
grow any more because of that.

Ext4 may solve the fscking issue, but in the one article I've read so
far, resizing wasn't mentioned in it.  (I'm also considering ext4 for
other reasons.)

One thing I do tend to do with every disk is this:

I put a small swap partition on each disk, then the rest is an LVM
partition.  Depending on the machine, it could be 128M to 256M; I try
to stay consistent across disks.  I then set up each swap partition
with the same priority.  That way I get more spindles in action for
swap.  I have really no idea if it makes a difference or not, but it's
something I do.  It may very well actually cause more contention
because if I'm doing something that is causing me to page, then I'm
probably processing data on all of those disks anyway.

Anyway, that's my experience with LVM.  I like it, I've used it for,
mmmm... I'm not sure how long I've used it... has it been around for
10 years?  I can't remember when I switched to it, but I'm pretty sure
it was before I moved to the South Bay Area.  It took for years of
lobbying to get folks to start using it at work for one service I'm
responsible for; down time for backups dropped from one hour to one
minute, since they can now do LVM based snapshots and bring the
service right back up.

mrc


Reply to: