Re: SWAP file on a RAID-10 array possible?

2007-08-28 Thread Bill Davidsen

Tomas France wrote:
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. 



After you go to 3-4 drives, most systems don't swap enough to justify 
the effort of spreading the swap over more drives. Three drives and 
RAID-10 work well, surely you can use the space on the other drives for 
another useful purpose. Or just use it, RAID-10 should handle similar 
partition sizes IIRC.


--
bill davidsen [EMAIL PROTECTED]
 CTO TMR Associates, Inc
 Doing interesting things with small computers since 1979

-
To unsubscribe from this list: send the line unsubscribe linux-raid in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: SWAP file on a RAID-10 array possible?

2007-08-18 Thread Tomas France

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 [EMAIL PROTECTED]

To: Tomas France [EMAIL PROTECTED]
Cc: linux-raid@vger.kernel.org
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 [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


SWAP file on a RAID-10 array possible?

2007-08-15 Thread Tomas France

Hi everyone,

I apologize for asking such a fundamental question on the Linux-RAID list 
but the answers I found elsewhere have been contradicting one another.


So, is it possible to have a swap file on a RAID-10 array?

Thanks!

Tomas 


-
To unsubscribe from this list: send the line unsubscribe linux-raid in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: SWAP file on a RAID-10 array possible?

2007-08-15 Thread David Greaves

Tomas France wrote:

Hi everyone,

I apologize for asking such a fundamental question on the Linux-RAID 
list but the answers I found elsewhere have been contradicting one another.


So, is it possible to have a swap file on a RAID-10 array?

yes.

mkswap /dev/mdX
swapon /dev/mdX

Should you use RAID-10 for swap? That's philosophy :)

David
-
To unsubscribe from this list: send the line unsubscribe linux-raid in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: SWAP file on a RAID-10 array possible?

2007-08-15 Thread Tomas France

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, does anyone know if there is a comprehensive how-to on software 
RAID with mdadm available somewhere? I mean a website where I could get 
answers to questions like How to convert your system from no RAID to 
RAID-1, from RAID-1 to RAID-5/10, how to setup LILO/GRUB to boot from a 
RAID-1 array etc. Don't take me wrong, I have done my homework and found 
a lot of info on the topic but a lot of it is several years old and many 
things have changed since then. And it's quite scattered too..


Tomas


- Original Message - 
From: David Greaves [EMAIL PROTECTED]

To: Tomas France [EMAIL PROTECTED]
Cc: linux-raid@vger.kernel.org
Sent: Wednesday, August 15, 2007 12:10 PM
Subject: Re: SWAP file on a RAID-10 array possible?



Tomas France wrote:

Hi everyone,

I apologize for asking such a fundamental question on the Linux-RAID list 
but the answers I found elsewhere have been contradicting one another.


So, is it possible to have a swap file on a RAID-10 array?

yes.

mkswap /dev/mdX
swapon /dev/mdX

Should you use RAID-10 for swap? That's philosophy :)

David
-
To unsubscribe from this list: send the line unsubscribe linux-raid in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html



-
To unsubscribe from this list: send the line unsubscribe linux-raid in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: SWAP file on a RAID-10 array possible?

2007-08-15 Thread David Greaves

Tomas France wrote:

Thanks for the answer, David!

you're welome

By the way, does anyone know if there is a comprehensive how-to on 
software RAID with mdadm available somewhere? I mean a website where I 
could get answers to questions like How to convert your system from no 
RAID to RAID-1, from RAID-1 to RAID-5/10, how to setup LILO/GRUB to boot 
from a RAID-1 array etc. Don't take me wrong, I have done my homework 
and found a lot of info on the topic but a lot of it is several years 
old and many things have changed since then. And it's quite scattered too..


Yes, I got to thinking that. About a year ago I got a copy of the old raid FAQ 
from the authors and have started to modify it when I have time and it bubbles 
up my list.


Try
http://linux-raid.osdl.org/

It's a community wiki - welcome to the community :) Please feel free to edit,,,
Also feel free to post questions/suggestions here if you're not sure.

David
-
To unsubscribe from this list: send the line unsubscribe linux-raid in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: SWAP file on a RAID-10 array possible?

2007-08-15 Thread Daniel Korstad
I used this site to bring my existing Linux install to a RAID 1.   It worked 
great for me.
 
http://wiki.clug.org.za/wiki/RAID-1_in_a_hurry_with_grub_and_mdadm
 
 
 
- Original Message -
From: [EMAIL PROTECTED] on behalf of Tomas France 
Sent: Wed, 8/15/2007 5:28am
To: linux-raid@vger.kernel.org
Subject: Re: SWAP file on a RAID-10 array possible? 
 
 
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, does anyone know if there is a comprehensive how-to on software 
RAID with mdadm available somewhere? I mean a website where I could get 
answers to questions like How to convert your system from no RAID to 
RAID-1, from RAID-1 to RAID-5/10, how to setup LILO/GRUB to boot from a 
RAID-1 array etc. Don't take me wrong, I have done my homework and found 
a lot of info on the topic but a lot of it is several years old and many 
things have changed since then. And it's quite scattered too..

Tomas


- Original Message - 
From: David Greaves [EMAIL PROTECTED]
To: Tomas France [EMAIL PROTECTED]
Cc: linux-raid@vger.kernel.org
Sent: Wednesday, August 15, 2007 12:10 PM
Subject: Re: SWAP file on a RAID-10 array possible?


 Tomas France wrote:
 Hi everyone,

 I apologize for asking such a fundamental question on the Linux-RAID list 
 but the answers I found elsewhere have been contradicting one another.

 So, is it possible to have a swap file on a RAID-10 array?
 yes.

 mkswap /dev/mdX
 swapon /dev/mdX

 Should you use RAID-10 for swap? That's philosophy :)

 David
 -
 To unsubscribe from this list: send the line unsubscribe linux-raid in
 the body of a message to [EMAIL PROTECTED]
 More majordomo info at  http://vger.kernel.org/majordomo-info.html
 

-
To unsubscribe from this list: send the line unsubscribe linux-raid in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
-
To unsubscribe from this list: send the line unsubscribe linux-raid in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: SWAP file on a RAID-10 array possible?

2007-08-15 Thread Bill Davidsen

Tomas France wrote:

Hi everyone,

I apologize for asking such a fundamental question on the Linux-RAID 
list but the answers I found elsewhere have been contradicting one 
another.


So, is it possible to have a swap file on a RAID-10 array?


Yes, and very fast as well. Do note that if you (a) need to boot from a 
recovery CD and (b) have a low memory machine which really needs swap 
early, most of the ones I've tried don't use such a swap, you have to 
start it by hand. Also, I have not tried suspend to disk and restore 
using RAID-10, it's on my to-do list, but *way* down.


But in general you will find it very fast and reliable.

--
bill davidsen [EMAIL PROTECTED]
 CTO TMR Associates, Inc
 Doing interesting things with small computers since 1979

-
To unsubscribe from this list: send the line unsubscribe linux-raid in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: SWAP file on a RAID-10 array possible?

2007-08-15 Thread Michael Tokarev
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 [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html