FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > CentOS > CentOS

 
 
LinkBack Thread Tools
 
Old 12-14-2010, 05:37 PM
"Jason T. Slack-Moehrle"
 
Default RAID help

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@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 12-14-2010, 05:49 PM
 
Default RAID help

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 /boot

Only 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 partitions

Only 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

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 12-14-2010, 05:53 PM
Paul Heinlein
 
Default RAID help

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@madboa.com <> http://www.madboa.com/
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 12-14-2010, 06:06 PM
Ryan Wagoner
 
Default RAID help

On Tue, Dec 14, 2010 at 1:49 PM, <m.roth@5-cent.us> wrote:
> Jason T. Slack-Moehrle wrote:

> Only 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 partitions
>
> Only if you want each directory RAIDed. DO NOT mirror swap. Bad idea.

You want to mirror swap. If a drive fails your swap immediately goes
offline. If an application had memory in swap it is now lost.

>> 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).

I do the same 1-2GB for swap. The servers hardly every touch swap as
they have enough memory.

>>
>> 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.

I only use LVM if I need the features if offers. Otherwise it is just
extra overhead.

Ryan
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 12-14-2010, 06:08 PM
"Jason T. Slack-Moehrle"
 
Default RAID help

Hi Mark,

Thanks for the reply.

>> 2. Create a RAID 1 out of that partition and use a mount point of /boot
>
> Only if you want to mirror the boot partition.

Doesn't one want to mirror that partition?

>>
>> 3. Create other mount points I might want i.e swap, /home, etc
>> 4. Create RAID1 out of these partitions
>
> Only if you want each directory RAIDed. DO NOT mirror swap. Bad idea.
> <snip>

Right, I get that, but what is fuzzy is it you, say have a drive with a few partitions that you don't mirror and a few that you do, doesn't the drive you are mirroring to have unused space equal to the amount of the partitions you are not mirroring?


>> 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).

Thanks.

> 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.

I am not as familiar with LVM as I should be, do you have a link to info/tutorial?

-Jason
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 12-14-2010, 06:11 PM
 
Default RAID help

Ryan Wagoner wrote:
> On Tue, Dec 14, 2010 at 1:49 PM, <m.roth@5-cent.us> wrote:
>> Jason T. Slack-Moehrle wrote:
<snip>
>>> 3. Create other mount points I might want i.e swap, /home, etc
>>> 4. Create RAID1 out of these partitions
>>
>> Only if you want each directory RAIDed. DO NOT mirror swap. Bad idea.
>
> You want to mirror swap. If a drive fails your swap immediately goes
> offline. If an application had memory in swap it is now lost.
<snip>
Mmmm... but if a drive goes down, then swap could quite easily be in an
undefined state, part-way through the mirroring.

mark

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 12-14-2010, 06:15 PM
"Jason T. Slack-Moehrle"
 
Default RAID help

> 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.

Ah I found this: http://www.centos.org/docs/5/html/Cluster_Logical_Volume_Manager/

-Jason
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 12-14-2010, 06:17 PM
Ryan Wagoner
 
Default RAID help

On Tue, Dec 14, 2010 at 2:11 PM, <m.roth@5-cent.us> wrote:
> Ryan Wagoner wrote:
>> On Tue, Dec 14, 2010 at 1:49 PM, *<m.roth@5-cent.us> wrote:
>>> Jason T. Slack-Moehrle wrote:
> <snip>
>>>> 3. Create other mount points I might want i.e swap, /home, etc
>>>> 4. Create RAID1 out of these partitions
>>>
>>> Only if you want each directory RAIDed. DO NOT mirror swap. Bad idea.
>>
>> You want to mirror swap. If a drive fails your swap immediately goes
>> offline. If an application had memory in swap it is now lost.
> <snip>
> Mmmm... but if a drive goes down, then swap could quite easily be in an
> undefined state, part-way through the mirroring.

How is it in an undefined state? The mirror is created with mdadm,
then mkswap is run. At this point when data is written mdadm writes
the data to both drives. Even if a drive failed when the mirror was
initially syncing, both drives would have the same data for any writes
that occurred. Sure the unused space could be out of sync, but that
doesn't matter.

Ryan
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 12-14-2010, 06:23 PM
Ryan Wagoner
 
Default RAID help

On Tue, Dec 14, 2010 at 2:08 PM, Jason T. Slack-Moehrle
<slackmoehrle@me.com> wrote:
> Hi Mark,
>
> Thanks for the reply.
>
>>> 2. Create a RAID 1 out of that partition and use a mount point of /boot
>>
>> Only if you want to mirror the boot partition.
>
> Doesn't one want to mirror that partition?

Yes you want to mirror boot. Otherwise if one drive fails you won't be
able to boot from the other drive. Also make sure you install grub on
both drives.

>
>>>
>>> 3. Create other mount points I might want i.e swap, /home, etc
>>> 4. Create RAID1 out of these partitions
>>
>> Only if you want each directory RAIDed. DO NOT mirror swap. Bad idea.
>> <snip>
>
> Right, I get that, but what is fuzzy is it you, say have a drive with a few partitions that you don't mirror and a few that you do, doesn't the drive you are mirroring to have unused space equal to the amount of the partitions you are not mirroring?

I think you are over complicating this. If you just want / in one
partition or want to use LVM to split / then do the following.

Partition both drives like

sd[ab]1 100M for boot
sd[ab]2 Fill entire space
sd[ab]3 2GB for swap

Create three mdadm RAID 1 mirrors

md0 sd[ab]1 /boot
md1 sd[ab]2 / OR LVM PV
md2 sd[ab]3 swap

If you want your data separate you can use LVM to carve out the space.
Or make one more mdadm mirror for your data.

I do know that RHEL 6 creates boot by default as larger than 100M so
you might want to determine the size to feature proof your setup.

Ryan
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 

Thread Tools




All times are GMT. The time now is 11:25 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org