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

Re: lvm on a single big partition or just a single big partition?



On Wed, Jun 03, 2009 at 10:04:36PM -0500, Zhengquan Zhang wrote:
> On Wed, Jun 03, 2009 at 06:48:03PM -0400, Douglas A. Tutty wrote:
> > On Wed, Jun 03, 2009 at 11:44:00AM -0500, Zhengquan Zhang wrote:
> > With one big partition, you lose the ability to:
> > 
> > 	-	have a separate /var (or /var/log) to keep logs from
> > 		filling up /
> > 	
> > 	-	have different mount options (e.g. noexec, nodev) on
> > 		/home
> > 
> > 	-	have a separate /home
> > 
> > 
> > Without LVM, you lose the ability to :
> > 
> > 	-	resize partitions as needed
> > 
> > 	-	migrate data from one disk to another, e.g. if a drive
> > 		starts misbehaving but you need to keep the system live
> > 		rather than reinstalling/restoring.
> 
> Could you elaborate more on this? As far as migration is concerned, what
> is the advantage of LVM?

Your system is operating.  You start to get either SMART indications
that the drive is dying or errors (e.g. retries, times-out, etc) in
syslog.  You add a drive to the system at least as big as the failing
drive.  You make it a physical volume for LVM, and add it to the VG of
the failing drive.  You then tell LVM to remove the failing drive from
the LV.  LVM will migrate the data, extent by extent, from the old drive
to the new drive, all while the system is still active.  Its all in the
LVM-HOWTO (tldp, in the doc-linux-html package). 

> > Instead of a separate /boot, I often use a separate / (which contains
> > /boot).  In this way, the / partition isn't part of LVM (I make it 500
> > MB and usually only have under 200 MB used) and can be booted into if
> > the need arises, with more tools available than within the initrd.  Most
> > of my boxes won't boot a live CD.
> 
> So I guess for /tmp /var /usr etc you have separate LVs? or else a 500M
> / should be too small?

I put /tmp on tmpfs, with encrypted swap (so that /tmp ends up encrypted
also).  Yes, /usr (4G) , /var (4-6G, depending ), and /home (encrypted)
are on separate LVs.  Sizes depend on what I'm doing.  /usr mostly holds
instaled packages so 4G is fine for my desktop system.  

I also have /var/tmp and /var/local as separate LVs, encrypted.  I keep
my backups in /var/local.  KDE keeps lots of otherwise private stuff in
/var/tmp.


Reply to: