On Fri, Sep 05, 2008 at 12:59:01PM -0700, Jens wrote: > 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 do the same as brian, md base and lvm on top, my typical setup is DiskA Partition 1 - 500M (sda1) DiskA P2 - 10G DiskA P3 - The rest DiskB Partition 1 - 500M (sdb1) DiskB P2 - 10G DiskB P3 - The rest ..... (for the number of disks) DiskX Partition 1 - 500M (sdx) DiskX P2 - 10G DiskX P3 - The rest I use sda1 & sdb1 in a raid1 for /boot (ext2), an old habit, raid1 is the hardest to f@#k up and it it just hold /boot even harder, I leave enough room to place rescue stuff there - busbybox and tools sda2 & sdb2 in a raid1 for / (ext3), shouldn't need more than 10G, used to use 8G previously, again for its simplicity Depending on if I have any other disks or not I will make a raid5 (or raid6) with the sd?3 paritions, if I only have the 2 disks then sda3 & sdb3 are made into a raid1 and the resultant md is placed as a lvm physical volume, which I then carve out things like /tmp /var/log /home swap. This means I can grow them on the fly as needed. I also looked at lvm mirror, the difference is lvm need a bitmap (which you have the option of keeping in memory - which is transient). The overhead of using lvm raid1 did not seem worth it (echo by my results from googling) Alex > > 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, > > > -- > To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org > with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org > > -- "We ended the rule of one of history's worst tyrants, and in so doing, we not only freed the American people, we made our own people more secure." - George W. Bush 05/03/2003 Crawford, TX
Attachment:
signature.asc
Description: Digital signature