Hi All, I have a new system with 2 Seagate 1TB SATA Enterprise level drives in it. I want to RAID1 (mirror) these drives. This machine will be a web-server in my apartment hosting an HTML video fan site I am creating. Apache, MySQL, PHP etc. This site will easily be 300+ gigs with all the versions of each video, the MySQL won't be huge, but will grow as data for each video is added (i.e location on the server, keyframe name, etc) I am a bit confused by: http://www.centos.org/docs/5/html/Deployment_Guide-en-US/s1-raid-config.html So if I simplify, I must: 1. Create a software raid partition on each drive 2. Create a RAID 1 out of that partition and use a mount point of /boot 3. Create other mount points I might want i.e swap, /home, etc 4. Create RAID1 out of these partitions 5. rinse and repeat this for each mount point I want A few questions: 1. This system support 16gb of RAM. I have 9gb in it, but I will max it out over the next few months as I find great deals on RAM, what should my SWAP space be? I recall a long while ago that SWAP should match physical RAM. 2. Any reason I can't just create a single mount point taking up the entire drive and RAID1 the entire thing? Can anyone recommend some ideal mount points and sizes? 3. What should I account for if my /var/www/html will be very large? Best, -Jason
Hey, Jason, Jason T. Slack-Moehrle wrote:> > I have a new system with 2 Seagate 1TB SATA Enterprise level drives in it. > > I want to RAID1 (mirror) these drives.<snip>> So if I simplify, I must: > 1. Create a software raid partition on each drive > 2. Create a RAID 1 out of that partition and use a mount point of /bootOnly if you want to mirror the boot partition.> > 3. Create other mount points I might want i.e swap, /home, etc > 4. Create RAID1 out of these partitionsOnly if you want each directory RAIDed. DO NOT mirror swap. Bad idea. <snip>> A few questions: > > 1. This system support 16gb of RAM. I have 9gb in it, but I will max it > out over the next few months as I find great deals on RAM, what should my > SWAP space be? I recall a long while ago that SWAP should match physical > RAM.Nope. Received Wisdom said 2-2.5 times RAM. However, in these days of in insanely huge amounts of RAM, it's not really important. At work, I just make swap 2G for everything (and trust me, we've got servers that make your memory look piddly).> > 2. Any reason I can't just create a single mount point taking up the > entire drive and RAID1 the entire thing? Can anyone recommend some ideal > mount points and sizes?Nope, no reason.> > 3. What should I account for if my /var/www/html will be very large?My manager here doesn't like LVM; but if it were me, I'd make that /var/www an LVM virtual partition. That way, you can always add another drive and thow more space into it. mark
On Tue, 14 Dec 2010, Jason T. Slack-Moehrle wrote:> Hi All, > > I have a new system with 2 Seagate 1TB SATA Enterprise level drives > in it. > > I want to RAID1 (mirror) these drives. <snip/> > > So if I simplify, I must: > 1. Create a software raid partition on each drive > 2. Create a RAID 1 out of that partition and use a mount point of /boot > > 3. Create other mount points I might want i.e swap, /home, etc > 4. Create RAID1 out of these partitions > > 5. rinse and repeat this for each mount point I want > > A few questions: > > 1. This system support 16gb of RAM. I have 9gb in it, but I will max > it out over the next few months as I find great deals on RAM, > what should my SWAP space be? I recall a long while ago that SWAP > should match physical RAM. > > 2. Any reason I can't just create a single mount point taking up the > entire drive and RAID1 the entire thing? Can anyone recommend > some ideal mount points and sizes? > > 3. What should I account for if my /var/www/html will be very large?If you have time to experiment a bit, I'd highly suggest encapsulating your RAID design in a kickstart file. You'll need to do some up-front work to get it ready, but once it's done you can re-do your arrangement easily (and repeat as necessary). Here's a sample (that requires two identical drives): # disk work bootloader --location=mbr clearpart --all --initlabel part raid.01 --size=300 --ondisk=hda --asprimary part raid.02 --size=300 --ondisk=hdb --asprimary part raid.11 --size=1024 --ondisk=hda --asprimary part raid.12 --size=1024 --ondisk=hdb --asprimary part raid.21 --size=20000 --ondisk=hda --asprimary part raid.22 --size=20000 --ondisk=hdb --asprimary part raid.31 --size=1 --ondisk=hda --asprimary --grow part raid.32 --size=1 --ondisk=hdb --asprimary --grow # mirrored mountpoints raid /boot --fstype ext3 --level=RAID1 --device=md0 raid.01 raid.02 raid swap --fstype swap --level=RAID1 --device=md1 raid.11 raid.12 raid / --fstype ext3 --level=RAID1 --device=md2 raid.21 raid.22 raid /srv --fstype ext3 --level=RAID1 --device=md3 raid.31 raid.32 There are many, many ways to alter this setup (e.g., using LVM, using a different set of mount points, not relying on primary partitions). The reason that /srv gets the lion's share of the disk is that I try to differentiate between files * created/maintained by running processes (e.g., MySQL) * installed by RPM (e.g., /var/www/error) both of which belong in /var, and * data created elsewhere and "fed" to a process (e.g., your video files or HTML pages) which goes into /srv. -- Paul Heinlein <> heinlein at madboa.com <> http://www.madboa.com/
On 14.12.2010 19:37, Jason T. Slack-Moehrle wrote:> Hi All, > > I have a new system with 2 Seagate 1TB SATA Enterprise level drives in it. > > I want to RAID1 (mirror) these drives....> 1. This system support 16gb of RAM. I have 9gb in it, but I will max it out over the next few months as I find great deals on RAM, what should my SWAP space be? I recall a long while ago that SWAP should match physical RAM.lvm, see below.> > 2. Any reason I can't just create a single mount point taking up the entire drive and RAID1 the entire thing? Can anyone recommend some ideal mount points and sizes? > > 3. What should I account for if my /var/www/html will be very large?If you dont know in advance how your storage is allocated the best way, use lvm. The space you dont need today is in the pool and be it /var/www/html or swap or whatever assign it as needed in the future. Note that its maybe better to not put /boot into lvm. I would suggest /dev/md0 -> /boot /dev/md1 -> lvm with all other partitions including swap -- Best Regards, Markus Falb -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 267 bytes Desc: OpenPGP digital signature URL: <http://lists.centos.org/pipermail/centos/attachments/20101214/b12d54f1/attachment-0002.sig>
Hi,> If you dont know in advance how your storage is allocated the best way, > use lvm. The space you dont need today is in the pool and be it > /var/www/html or swap or whatever assign it as needed in the future. > > Note that its maybe better to not put /boot into lvm. > > I would suggest > > /dev/md0 -> /boot > /dev/md1 -> lvm with all other partitions including swapOK, I have done this, I need to create mount points and I am not sure how to initially size. How does everyone size /? Since I know my /var/www/html will be large, say 300GB, I can create a mount point for at least that, but with LVM you are saying I can change the size later to increase it? What other mount points should one have (besides swap)? No users will be storing sata on this box. -Jason
1) RAID 1 is good for reading while writing is a overhead for the disk and may hit the performance 2) Dont create RAID for swap and / root partition (Not Advisable) 3) Swap Size size should be 2X the size of the Physical memory 4) Always partition which uses high read/write to the disk eg /var/log /var/www/html and /home etc 5) Use LVM for partitions and swap where your Video files resides and make it minimum as of now and Learn the growth of the partition and increase as per requirement 6) My experience had always shown if your apps had memory leak , expect Swapping to happen for sure, where reboot of the apps or the system is needed Thanks Philix On Wed, Dec 15, 2010 at 12:07 AM, Jason T. Slack-Moehrle < slackmoehrle at me.com> wrote:> Hi All, > > I have a new system with 2 Seagate 1TB SATA Enterprise level drives in it. > > I want to RAID1 (mirror) these drives. > > This machine will be a web-server in my apartment hosting an HTML video fan > site I am creating. Apache, MySQL, PHP etc. This site will easily be 300+ > gigs with all the versions of each video, the MySQL won't be huge, but will > grow as data for each video is added (i.e location on the server, keyframe > name, etc) > > I am a bit confused by: > http://www.centos.org/docs/5/html/Deployment_Guide-en-US/s1-raid-config.html > > So if I simplify, I must: > 1. Create a software raid partition on each drive > 2. Create a RAID 1 out of that partition and use a mount point of /boot > > 3. Create other mount points I might want i.e swap, /home, etc > 4. Create RAID1 out of these partitions > > 5. rinse and repeat this for each mount point I want > > A few questions: > > 1. This system support 16gb of RAM. I have 9gb in it, but I will max it out > over the next few months as I find great deals on RAM, what should my SWAP > space be? I recall a long while ago that SWAP should match physical RAM. > > 2. Any reason I can't just create a single mount point taking up the entire > drive and RAID1 the entire thing? Can anyone recommend some ideal mount > points and sizes? > > 3. What should I account for if my /var/www/html will be very large? > > Best, > -Jason > _______________________________________________ > CentOS mailing list > CentOS at centos.org > http://lists.centos.org/mailman/listinfo/centos >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.centos.org/pipermail/centos/attachments/20101216/aa1bbec7/attachment-0002.html>
On Thu, 16 Dec 2010, Philix T A wrote:> 1) RAID 1 is good for reading while writing is a overhead for the disk and > may hit the performanceWrite overhead is minimal, since you're just writing out the same data twice to two equal performance drives (typically). I'd really not worry about the performance hit.> 2) Dont create RAID for swap and / root partition (Not Advisable)No, that's wrong. Why on earth would you not want the root file system on RAID? And please explain the downsides of having swap on RAID1, given that the upside should be fairly obvious.> 3) Swap Size size should be 2X the size of the Physical memoryHistorical advice. I've got a machine with 96Gbytes of RAM, are you really telling me I want 192Gbytes of swap? That's just plain bad advice.> 6) My experience had always shown if your apps had memory leak , expect > Swapping to happen for sure, where reboot of the apps or the system is > neededThen fix your memory leaks. jh
On Thu, Dec 16, 2010 at 2:15 AM, Philix T A <philixlinux at gmail.com> wrote:> 2) Dont create RAID for swap and / root?partition?(Not Advisable)Any rationale for this bad advice?> 3) Swap Size size should be 2X the size of the Physical memoryFor a desktop, maybe.> 6) My experience had always shown if your apps had memory leak , expect > Swapping to happen for sure, ?where reboot of the apps or the system is > neededI hope that you only have such apps on your dev boxes!
On 12/16/2010 2:15 AM, Philix T A wrote:> 1) RAID 1 is good for reading while writing is a overhead for the disk > and may hit the performanceUnless you are doing something (such as video editing) that relies on ultra-fast hard drive access, you will probably never notice the difference. With hardware RAID, the performance hit will be even less.> 2) Dont create RAID for swap and / root partition (Not Advisable)Why not? This defeats the purpose of the RAID. You need to mirror all filesystems to prevent data loss in the event of a hard drive crash. You need to mirror swap so that the system can continue running if one hard drive goes.> 3) Swap Size size should be 2X the size of the Physical memoryNot anymore. These days, I would not allocate more than 16GB for swap. You shouldn't really need any swap. Memory is cheap enough now that if your system is using swap, you should add more memory. Swap usage is a serious performance hit. Some people advocate running without any swap at all. -- Bowie
Philix T A [philixlinux at gmail.com] wrote 2) Dont create RAID for swap and / root partition (Not Advisable) I would avoid putting / or /swap on RAID0 partitions, but RAID1 should not only not be a problem, it should be encouraged as a method of recuperating from a spindle failure. 3) Swap Size size should be 2X the size of the Physical memory That was the other millennium, when it was certain that our programs used more Core/RAM than you had in your box. This is now, when you need swap only when you can't schedule your process load to not over-demand RAM, and you can't put more RAM in your box. In that kind of case, a larger box is more cost-effective than swap. I make certain swap is never used. Man 1 vmstat, look at the 'si' and 'so' fields, they should stay zero. 4) Always partition which uses high read/write to the disk eg /var/log /var/www/html and /home etc I'm not certain I understood what you said. My advice on partitioning is to group read-only (e.g. most of / & /usr) on partitions mounted -o ro, and writable portions (e.g. most of var) on a separate partition so the amount of fsck recovery is minimized. The OP asked about making a single partition for everything, this is (approximately) what a Red Hat default install will do. Making a RAID1 of everything is not a bad idea, it's called a backup ;) 6) My experience had always shown if your apps had memory leak , expect Swapping to happen for sure, where reboot of the apps or the system is needed Buggy software (memory leaks included) should simply be avoided. Where they can't be avoided, a crontab entry to kill & restart every hour (or so). I'm not sure what the OP is asking. It is my advice to post ONLY in plain text, not rich-text or html, to a mailing list. If it is impossible to post plain-text, some won't see your post and some who have a response won't send one since top-posting is "the best way" to reply to html posts, and top-posting is an abomination to many. ******************************************************************* This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This footnote also confirms that this email message has been swept for the presence of computer viruses. www.Hubbell.com - Hubbell Incorporated**