Date: Mon, 28 Jul 2003 09:29:48 +0100 From: Matthew Seaman <m.seaman@infracaninophile.co.uk> To: Duane Stark <duane@drasticproductions.com> Cc: freebsd-questions@freebsd.org Subject: Re: New Webserver with multiple drives Message-ID: <20030728082948.GB7667@happy-idiot-talk.infracaninophile.co.uk> In-Reply-To: <200307272320.h6RNKS0r012014@ms-smtp-03.texas.rr.com> References: <200307272320.h6RNKS0r012014@ms-smtp-03.texas.rr.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--JP+T4n/bALQSJXh8 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Jul 27, 2003 at 06:20:27PM -0500, Duane Stark wrote: > To preface this, I'm not OS retarded - just BSD retarded ;) I haven't ha= d to mess with my current BSD server since I bought it, and now I have purc= hased a new p4 3.0(something), 2 gig ram, 2 IDE 200gig HD's to replace it.. >=20 > Here is my question: >=20 > How do I setup these multiple drives? What does the "industry" recommend= when it comes to setting them up? Should I set BSD up to think its one da= tasource (so 400gig) and then run from that? Or do I setup 1 drive to hold = my web/mail/mysql, and the other to do something elsE? >=20 > I'm totally lost, so any help would be greatly appericated.. PLEASE don't= assume I know what your talking about, because it's a given that I dont! h= eh :) The only possible answer is "it depends". With disks there are 3 characteristics that you can modify the balance between depending on your needs. Those are resilience, available space and access speed. There's also a fourth consideration, which may affect your choice but that has little effect during the day-to-day operation of the system, which is the amount of time and effort you're prepared to put into doing sys-adminly things. Now, you've only got two disks, so that immediately rules out any choices involving RAID5. You make no mention of any sort of hardware raid controller, so I'll assume that isn't a possibility either. That leaves essentially 3 choices: i) No RAID at all. This scores highly on the ease of admin, as it's the default way things are set up by sysinstall. Just partition the disks, put filesystems on them and set up /etc/fstab so the partitions get mounted in appropriate locations. I'll take this as the baseline to compare the other setups to. ii) RAID 0 or disk striping. This creates one synthetic 400Gb partition from your two actual drives, by writing alternate blocks of data to each drive. The block size is configurable: at one extreme you could make the block size the same as the raw disk size, in which case you'ld end up appending one disk to the end of the other. However, the greatest advantage occurs when the block size is round about the same size as the system can read from the drive in one gulp. This spreads the load of any IO evenly of the two drives and should maximize performance. The bad news is that if either of the disks becomes faulty, then all of the disk space on your system will be unavailable. As you add disks to the stripe, this problem becomes more and more acute, so this setup is generally not used very much unless in combination with RAID 5 or RAID 1 to give higher resilience. iii) RAID 1 or mirroring. Each drive contains a complete copy of all of the data, maintained in parallel. The advantages are improved resilience -- the system should just keep chugging along merrily even if one of the drives self destructs -- and improved IO performance on reads -- writes have to go to both drives, which takes only slightly longer than writing to a single drive, but reads can go to either drive which gives you much better performance. (The biggest factor is the milliseconds it takes to position the head and wait for the drive to turn round until the correct block is under the head. Talking between the CPU, RAM and the disk electronics takes of the order of microseconds.) The bad news is that you've got to sacrifice half of your potentially available disk capacity. However, assuming that the resulting space is adequate for your needs, a mirrored root disk setup is pretty standard for server machines. Either of ii) and iii) will probably entail your learning about vinum(8) as the best available mechanism for doing software RAID on FreeBSD. The alternatives are not that hot: ccd(4) is pretty ancient and doesn't offer any means of recovering a mirrored partition than backup and re-install should one drive fail. I've heard that NetBSD's raidframe stuff is being ported to FreeBSD, but I don't think it's ready for primetime use yet. See http://www.freebsd.org/doc/en_US.ISO8859-1/articles/vinum/index.html for a thorough introduction to vinum bootstrapping, http://www.vinumvm.org/ for general information and http://org.netbase.org/vinum-mirrored.html for a quick HOWTO set up a bootable vinum root drive. Cheers, Matthew=09 --=20 Dr Matthew J Seaman MA, D.Phil. 26 The Paddocks Savill Way PGP: http://www.infracaninophile.co.uk/pgpkey Marlow Tel: +44 1628 476614 Bucks., SL7 1TH UK --JP+T4n/bALQSJXh8 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (FreeBSD) iD8DBQE/JN78dtESqEQa7a0RAoWQAKCNHVQVsWrf2WCYCqPuufsNvVAGWwCeI0rJ FxWR/Vh/C6mZLEhYVXuocZs= =OoD/ -----END PGP SIGNATURE----- --JP+T4n/bALQSJXh8--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030728082948.GB7667>