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

Re: to lvm or not to lvm?

Thank you for your reply. Looks like you're suggesting installation, but I have Etch 4.0 installed already. Wondering if it's possible to put existent /boot on ext3 partition and LVM volume group on RAID1. Or possibly it will be easier to reinstall and restore configuration.

Douglas Allan Tutty wrote:
On Fri, May 04, 2007 at 02:02:00PM +0300, Yuriy Padlyak wrote:
I'm going to setup LVs on raid1 on Etch 4.0. Can you point me to some "great tutorial" ,you used to do it. I need RAID only for my /home because of some valuable data, not for the whole disk.

1.	The installation manual, the raid related HOWTOs, LVM howto.

2.	You may want to reconsider: with /home under raid1 but the
	system not, if a drive fails, the system dies.  You need that
	system to read your raid1 /home.  So I don't think you get any
	protection from a raid1 /home.

3.	Drives and drive-space are cheap.  For example, my destop box
	which has everything I need (I don't compile right now but it
	has everything else) has /usr and /var at 50%.  Total drive
	space allocated to the system (swap, /boot, /, /usr, /var, with
	/tmp on tmpfs) is around 9 GB (with 5 GB free).  Putting the
	whole system on raid1 only takes up in this case 9 GB on the
	second drive.

In general, at the partitioner, first partition the drives.  With
everyting raid1 partition both drives identically.  Grub may or may not
work with LVM so put it on its own partition:

	1.	32 MB	physical volume for raid (md0)
	2.	remainder	physical volume for raid  (md1)
	Do this for both drives.

Back to the partitioner, you get a new menu choice: set up raid.

md0:  Use as: [filesystem of choice, I use JFS], mount /boot

md1:  Use as: physical volume for LVM.

Back to partitioner, you get a new menu choice: set up LVM.

Create a new volume group: system, made of md1 only.

Create new logical volumes:
	root {label root} 256 MB
	swap {label swap} {1-2 GB? the persistant question}.
	usr {label usr} 4 GB
	var {label var} 4 GB plus extra space if you use it for backups
					under /var/local/backup.
	home {label home} remainder.

Back to partitoner you now see these LVs.
Treat them as regular partitions and set the Use as: info {again, I use
JFS, and lable according to mount point}, except for swap which is used
for swap.


When you eventually get it installed and booted, add an entry to
tmpfs		/tmp	tmpfs	size=256m (whatever) 0 0

and reboot.

Now, if a drive fails the system will not crash and you will receive an
email from mdadm monitor telling you.  I checked this out:
	unplug a drive.
	get email.
	plug in drive.
	get email again (since drive is still not part of the raid.
	run lynx, read the raid howto and the man pages.
	reformat the drive (could have skipped this).
	add the partitions to the arrays,
	let it sync.
	md is a lower level than LVM so LVM didn't even know anything
	was amiss.

Sweet and simple.

Good luck,


Reply to: