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

Re: For Lenny: LVM, LVM+MD or just MD for mirroring?



On 5 Sep., 21:20, "Brian Schrock" <schrock.br...@gmail.com> wrote:

> We use LVM and software raid via md on every server. We use md to run raid
> 10 arrays and then we use LVM on top of that. We use snapshots to backup our

Hello Brian,

sounds good - what made you stack MD and LVM, and not use LVM's mirror
feature?
Any specific reason?

I have read contradicting reports regarding performance - one said LVM
mirroring was faster since it read from both disks in parallel, one
said the same about MD.
What is your experience?

> mySQL servers and it works great. We do nightly snapshots and rsync/tar that
> stuff to central on line storage server. Though we do have to issue a lock
> tables command to our mySQL servers for the duration of the creation of the
> LVM snapshot, but after the snapshot is created we remove the locks.

That was the idea.
Do you have to snapshot each LV separately or can you do one snapshot
for the whole VG?
Since I only have two disks I'll do a Raid 1 mirror and probably use a
layout like

md0: root (10G)
md1: system VG (rest of disk)
system/swap (probably 4G to start with)
system/tmp  (probably 4G too, tmpfs)
system/var   (10G to start with, will contain MySQL data)
system/home  (rest of disk minus 10G for snapshot data)

This worked quite well so far. But I'm sure once I have the
flexibility, I will think of another more detailed setup for
partitioning.

Do you think it's a good idea to put swap and /tmp in the VG?

> For booting, we just use raid 1 on two partitions, no LVM. Debian seems to
> have no problem with installation, but it does not install grub into both
> drives mbr. You have to manually do that or if the hdd that does have grub
> installed fails your system will be unable to boot. Its been a while since I
> have double checked this, so it may have been fixed.

I have done this with LILO ("raid-extra-boot=") but how do you do it
with Grub?
Like this? : http://faq.jensbenecke.de/wiki/SuseSystem
(scroll down a bit to see the GRUB commands)

> I was just running some bonnie tests yesterday on a test server and here are
> those results...
>    name file_size putc putc_cpu put_block put_block_cpu rewrite rewrite_cpu
> getc getc_cpu get_block get_block_cpu seeks seeks_cpu num_files  dhcp187
> 32368M 69293 99 209808 51 66438 13 49501 67 94315 9 777.3 0 16  dhcp187
> 32368M 68795 97 219512 51 65161 13 49648 67 93097 9 769.1 1 16  dhcp187
> 32368M 68501 98 222966 53 65132 13 49639 67 94043 9 762.7 1 16  dhcp187
> 32368M 69498 98 246923 58 63480 12 49937 67 94189 9 785 0 16  dhcp187 32368M
> 69324 98 230438 55 64656 12 49576 67 94046 9 749 1 16

hm, this does not tell me too much (probably because of bad line
wrapping).
did you compare a single disk with a MD setup?

> Brian Schrock,


Reply to: