This wouldn't be probably the best solution in my situation. The computer we
are talking about will be quad-core web server with 8GB RAM and initially
2x500GB SATA HDDs setup in a RAID-1 array. When it begins running low on
space or more HDDs performance is needed, I plan to convert the RAID-1 to
RAID-10 by adding 2-4 more hard disks (I've found some info on how to do
this so hopefully it will work).
If I should follow the commonly accepted strategy saying that the swap space
should be 2X+ the amount of RAM, that means 16GB. If I add 4 more HDDs in
RAID-1 pairs later, then I would end up with 3 swap partitions on RAID-1
taking 96GB (6*16GB) of space on the harddrives which would be a
considerable waste of space.
Sure, when adding the more hard disks I could probably create a smaller swap
partition on each of them but that would be yet another complication. Using
a swap file initally on the RAID-1 array and then on the RAID-10 array
sounds like a much simpler solution to me as it will allow me to change the
size of the swap space more flexibly.
Tomas
----- Original Message -----
From: "Michael Tokarev" <mjt@xxxxxxxxxx>
To: "Tomas France" <tomfra@xxxxxxxxxx>
Cc: <linux-raid@xxxxxxxxxxxxxxx>
Sent: Wednesday, August 15, 2007 11:42 PM
Subject: Re: SWAP file on a RAID-10 array possible?
Tomas France wrote:
Thanks for the answer, David!
I kind of think RAID-10 is a very good choice for a swap file. For now I
will need to setup the swap file on a simple RAID-1 array anyway, I just
need to be prepared when it's time to add more disks and transform the
whole thing into RAID-10... which will be big fun anyway, for sure ;)
By the way, you don't really need raid10 for swap. Built-in linux
swap code can utilize multiple swap areas just fine - mkswap + swapon
on multiple devices/files. This is essentially a raid0. For raid10,
one thing needed is the mirroring, with is provided by raid1. So
when you've two drives, use single partition on both to form a raid1
array for swap space. If you've 4 drives, create 2 raid1 arrays and
specify them both as swap space, giving them appropriate priority
(prio=xxx in swap line in fstab). With 6 drives, have 3 raid1 arrays
and so on... This way, the whole thing is much simpler and more
manageable.
/mjt
-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html