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

LVM on raid1: looking to future, RFC


My testing box is an amd64, 1 G ram with dual 80 GB Seagate SATA drives,
running Etch.  I'm new to the LVM/raid1 concept.  Following advice I
received here (or was it on amd64; no matter, its not amd64 specific), I
currently have both disks partitioned the same:

	1	small 		raid1 	for /boot
	2	remainder	raid1	for lvm 
			--> separate lv for swap, /, /usr/, /var/, and

Since I also am changing off-site backup media, I'm going with seagate 2.5"
drives in Addonics Jupiter enclosures (USB cable in the bank with one
drive for ubiquitosity, eSATA cable at home for faster backups) which
are robust enought to withstand a 3' drop.  Hopefully eSATA will be
hot-swap just like USB is, some day.

It was suggested to me that a neat and time-saving way of doing a backup
to prevent a reinstall after a disaster is to partition the portable
drive (also an 80 GB) the same as the primary ones, add those partitions
to the raid1 arrays and let them sync, then remove them from the arrays.
This provides a bootable snapshot of the system.  In the event of a
disaster, get new computer, boot the backup disk, format the new drives,
add them to the (degraded) raid1 on the backup disk, let it sync and
all's back as it was.

This seems great for the foreseeable future, but part of running testing
while waiting for it to become stable is looking beyond.  What happens
when my /home needs to expand to other disks.  Then this backup method
would not work.

What I want to do is lay out the disks so that I can always make a
backup of this type for the base system (all of Debian's stuff),
separate from /home, /usr/local, /var/local, and perhaps /var/tmp.

Its been suggested, and I probably will, put /tmp on tmpfs.

What would you think of this layout for my 80 GB drives:

	1	small		raid1 md0 for /boot
	2	amount A	raid1 md1 for lvm vg0 
				--> usual lv except for	/home
	5	amount B	raid1 md2 for lvm vg1
				--> lvs for /home, /usr/local,

When need more room for vg0 or vg1, add more partitions from free-space:
	3	whatever	raid1 md3 for lvm vg0
	6	whatever	raid1 md4 for lvm vg1

I can partition the backup disks:
	1	same as main disks for md0
	2	same as main disks for md1
	4 (when/if needed) for md3
	5	remainder

This allows me to still make a bootable image of the installed debian
system and use the third partition to hold traditional backup tar.bz2
files from /home, /usr/local, /var/local (including /var/local/backup).

When I need more space or need a faster disk set for video editing
(raid10?) I can do so without complicating the backup or
disaster-restore procedures.

What do you think?



Reply to: