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



On Thu, Jun 04, 2009 at 09:39:42AM -0400, Douglas A. Tutty wrote:
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).

This is fantastic, I have read the howto but obviously did not notice
this part.


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.

Great setup, Thanks, Doug, so do you how much space(PE) do you leave
unassigned for later use?



--
To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx
with a subject of "unsubscribe". Trouble? Contact listmaster@xxxxxxxxxxxxxxxx

--
Zhengquan


--
To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx
with a subject of "unsubscribe". Trouble? Contact listmaster@xxxxxxxxxxxxxxxx



Relevant Pages

  • Re: lvm on a single big partition or just a single big partition?
    ... you lose the ability to: ... Without LVM, ... Instead of a separate /boot, I often use a separate / (which contains ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
    (Debian-User)
  • Re: shrink lvm to get spare space
    ... the recommendation I've heard the most.) ... However, this space is still "claimed" by LVM, and it will fail or, at ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ... Trouble? ...
    (Debian-User)
  • Re: lvm and multiboot
    ... reduce the size of the lvm volume group and get some free space ... partitions to begin with: ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ... Trouble? ...
    (Debian-User)
  • Re: LVM, Resize failed (most mlikely user error)
    ... my /var went full and I started to do the following with the lvm commands: ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ... Trouble? ... system tools to reduce the file system then use ...
    (Debian-User)
  • Re: Good fdisk Practices
    ... AFAIK. ... Or is this outated info? ... I don't usually make the root filesystem an LVM ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
    (Debian-User)