Raid configuration question

2011-07-07 Thread Zeb Packard
So, i've setup a file server with softraid rather than the older
raidframe, however on the new system I tried setting my sd*b
partitions to a raid 0 configuration so the swap space runs a
little faster. After getting the swap space setup, though dmesg
prints [ root on sd0a swap on sd0b ..]. After seeing this, i went
ahead and setup a test system with raidframe again and built
my raid on the swap partitions. Fstab points to raid partitions in
both systems and they BOTH claim in dmesg that swap is
being put on sd0b. My question is, am I getting somewhere
with this or is the kernel going to look for sd0b and put swap on
it automatically? Also, is there a way to prove the swap is
on sd3b (softraid) or on raid0b (raidframe)?

Zeb



Re: Raid configuration question

2011-07-07 Thread Ted Unangst
On Thu, Jul 07, 2011, Zeb Packard wrote:
 So, i've setup a file server with softraid rather than the older
 raidframe, however on the new system I tried setting my sd*b
 partitions to a raid 0 configuration so the swap space runs a
 little faster. After getting the swap space setup, though dmesg
 prints [ root on sd0a swap on sd0b ..]. After seeing this, i went
 ahead and setup a test system with raidframe again and built
 my raid on the swap partitions. Fstab points to raid partitions in
 both systems and they BOTH claim in dmesg that swap is
 being put on sd0b. My question is, am I getting somewhere
 with this or is the kernel going to look for sd0b and put swap on
 it automatically? Also, is there a way to prove the swap is
 on sd3b (softraid) or on raid0b (raidframe)?

You should have provided disklabels, but let's read your mind.

Do not stripe b partitions.  'b' is sacred, do not put other things on
it.  You should have striped the d/e/j paritions to create a softraid sd3,
then disklabel that and use sd3b for swap.  I really don't think
striping swap is worthwhile however.  Buy more memory.



Re: Raid configuration question

2011-07-07 Thread Zeb Packard
hmmkay, so both disklabels have an sd0b, softraid is pointed to
sd3b for swap, but dmesg still prints 'swap on sd0b dump on sd0b'
I'm assuming this is because sd0b is striped?

I figure it's worth a shot on my test system, if it's quicker, I'm not
opposed to the little bit of configuration up front.

Thank you,

Zeb



Re: Raid configuration question

2011-07-07 Thread Nick Holland
On 07/07/11 18:02, Zeb Packard wrote:
 hmmkay, so both disklabels have an sd0b, softraid is pointed to
 sd3b for swap, but dmesg still prints 'swap on sd0b dump on sd0b'
 I'm assuming this is because sd0b is striped?

no, it is because sd0b is swap BY DEFINITION.

Do not use the 'a' partition of the first drive for anything but booting.
Do not use the 'b' partition of the first drive for anything but swap.
Do not use the 'c' partition of any drive.

Do not forget there is a strong possibility that some day your first
drive may no longer be your first drive, in which case some other
drive's 'a' and 'b' will be spoken for.  Respect that.

If you have a [ws]d0b, it WILL be swap.
If you promote sd1b to sd0b, whatever was on 'b' will become swap.

IF you want to have swap on RAID, ok...don't create a 'b' partition on
your real disks.  Create a swap partition on your softraid disk, point
to it with fstab.

 I figure it's worth a shot on my test system, if it's quicker, I'm not
 opposed to the little bit of configuration up front.

it's a potential failure point.
In a modern computer running typical applications, think of swap as your
oh shit, that wasn't supposed to happen! recovery zone.  In general,
if you are optimizing your swap, you are Doing It Wrong.  Special cases
exist, I'm sure, but it is very much like cleaning the gun and polishing
the bullets before putting a hole in your foot.  The dirty gun and the
tarnished bullet were going to do just fine.

Nick.