[SGVLUG] Linux Partitioning for Server

Claude Felizardo cafelizardo at gmail.com
Mon Apr 6 15:06:48 PDT 2009


Something I've been doing the last few years is to set aside an extra
partition for an alternate OS partition in case you want to try
another or newer distro.  That way if it doesn't work, you can always
fall back to what you had before.

I would also agree with everyone about not put the swap partitions on
the raid.  I partitioned all of my drives identically with the first
two RAID1 partitions for /boot and the OS with a hot spare on
alternating drives.  I thought of making the unused partitions for
swap but didn't want to risk using the wrong partition so I made a
separate 1 GB partition on each drive for swap.  The rest of the drive
is carved out as RAID5 with lvm.  That worked fine until a kernel
update that broke my being able to boot the OS partition on RAID1 so
I'm currently booting on the "spare" partition on that slot.

Here's what I basically have:

/dev/sda1   raid1 /boot
/dev/sda2   raid1 OS
/dev/sda3   raid1 alternate OS
/dev/sda5   swap
/dev/sda6   raid5 LVM

If I were to build it again, I would not put the OS on the same drives
as the RAID5 as it's a pain to rebuild the RAIDs when there's a
problem at boot that prevents the system from booting correctly.  If
anything I'd prefer to go with a NAS box for my data.

claude



On Mon, Apr 6, 2009 at 2:55 PM, Edgar Garrobo <egarrobo at gmail.com> wrote:
>
> I can understand the benefit of putting the SWAP file on a seperate drive or
> array, but it seems like such a waste to give up a 320GB drive or two of
> them in the RAID1/mirrored for OS/root and SWAP.  Between the / and SWAP I
> only need about 30GB max.  That leaves 290GB (or 610GB with 2 drives) of
> space wasted.  The server can only physically support 4 drives because it's
> only got 4 drive bays and using an external array or fibre channel is out of
> the question for this server.
>
> On Mon, Apr 6, 2009 at 2:40 PM, matti <mathew_2000 at yahoo.com> wrote:
>>
>>
>> Hi,
>>
>> Yes, try to avoid using the RAID 5 for the root/OS,
>> ideally, and I know this isn't possible often
>> enough, I would have the root partition as
>> a RAID 1
>>
>> I also like Matt's recommendation of
>> then breaking the RAID 1 and using
>> the off lined mirrored drive as
>> a hot spare/backup.
>>
>> likewise, the SWAP area SHOULD NOT be
>> in the RAID 5... this you will find will
>> end up killing performance once things
>> hit swap. IF you are forced to do it,
>> then make certain you have LOTs of RAM,
>> and carefully monitor the system because
>> once it starts to use the swap space
>> you will be in trouble (performance wise)
>>
>> I would try to do this with the phyiscal
>> drives:
>>
>> [ drive 1 ][drive 2] = RAID 1/mirrored for OS/root
>>
>> [ drive 3 ] = swap
>>
>> [ drive 4 ][ drive 5 ][ drive 6 ] = RAID 5/data
>>
>> this setup should result in the best performance
>> typically...
>>
>> hmmm... I guess people typically don't use an
>> entire drive for swap anymore.. so I would put
>> that part on the RAID 1 drives and max the RAM
>> on the system. (and hopefully it would hardly ever
>> use swap.. )
>>
>> best
>> matti
>>
>>
>> > I usually create a RAID1 for my
>> > boot partition, then take one of
>> > the drives offline.  That way you can bring it back
>> > online to sync after
>> > an OS update and have a ‘hot spare’ laying
>> > around if the server OS
>> > gets compromised or corrupted.
>>
>>
>>
>>
>
>


More information about the SGVLUG mailing list