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

Re: Desktop user: Etch or the next testing?



On Wed, Apr 04, 2007 at 08:55:55PM +0800, Wei Chen wrote:
> 1) How does LVM handle power/disk faults?

Think layers.  A logical volume is made up of one or more physical
volumes.  The filesystem sees the logical volume as just another block
device.   If the power fails its no different with LVM as with plain
disks; it depends on your file system.  Ditto drive failures; if one
drive (PV) fails then plan on losing the whole LV.

Power failures are why I use JFS.  There have been plenty of thread on
that topic recently.

> 
> 2) Is there any Debian specific LVM Howtos where I can learn debianized LVM?
> 

Not that I've seen, but the commands are the same as the standard HOWTO.

> 3) How does LVM handle software upgrades in Debian?
> 

Like Debian always does: It Just Works (TM)

> 4) Say I have 2 physical disks. Now I can put important data on disk 1
> and put the backups of those important data on disk 2. In this way I
> have two copies of important data on different physical devices (Only
> some (not many) of my data are /important/.) Can I do similar using LVM?

Here's how I do it.  I have two 80 GB drives.  Each is partitioned
identically with three partitions:

	1.	64 MB	Used for raid1, makes md0, JFS, /boot
		since grub can't read LVMs

	2.	16 GB	Used for raid1, makes md1.  This one block 
		device is the physical volume for volume group 'system'.
		Since I put the current backup in /var/local (see below), size this
		to hold the debian system plus the size of your backup
		set, unless you're using streaming tape or other
		direct-to-off-the-box backup setup.
	
	3.	remainder (64 GB), each used for PVs for volume group
		'local'.

VG 'system' is broken up into LVs:
	
	root	300 MB, JFS, mounted on /
	usr	4 GB, JFS, /usr
	var	6 GB, JFS, /var
	swap	1 GB.  Yes swap is on LV on raid1.

/tmp is on tmpfs

This way, one drive failure doesn't cause the system to crash since even
swap is protected by raid1.

VG 'local' right now only has one LV:
	home	12 GB, JFS, /home.
		This is just straight LVM, I can add a drive (PV) to VG
		local and extend /home anytime.

When I get into video editing, I'll likely create a stripped LV and
mount it somewhere, make it sticky like /tmp so user's can use it.

/home isn't protected by raid, so one drive failing will cause data
loss (or at least trash the fs).  So I run backups and store them
initialy on /var/local/backup, which is protected by raid1.  I also
rsync it over to my 486.
			
Before I started working too much on my etch box, I played with the
drives.  I disconnected one to see how it gets handled and learn how to
put it back.  Its just like in the HOWTO.  Note, I didn't hot-unplug the
drive since the linux kernel doesn't support hotswap on SATA (or IDE).
mdadm emails you to tell you a drive failed.

> 
> 5) Is there an easy and supported way to convert my current disks (and
> data on the disks) to LVM?
 
AFAIK, its like wanting to change your current drives to a new
filesystem: its a bit of a shell game.  You can probably do it, but
personally, doing things like that is the only time I ever do a
reinstall and take the opportunity to to do it.  Given the ease of
Etch's installer, its probably the easiest way.

Enjoy.

Doug.



Reply to: