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 > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 08-08-2012, 01:25 PM
Georgi Naplatanov
 
Default multiple swap areas and RAID 1

Hi.

I'm going to configure Debian GNU/Linux with software RAID 1 and I think
to put swap area on RAID 1 (/dev/mdX), but someone told me that if the
computer have multiple swap partition (e.g. /dev/sda2, /dev/sdb2) with
equal priorities, linux kernel will mirror swap area between different
devices. Is that true ? I mean kernel 2.6.32 and 3.2.x.


Best regards
Georgi


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Archive: 502268AD.2050407@oles.biz">http://lists.debian.org/502268AD.2050407@oles.biz
 
Old 08-08-2012, 05:14 PM
Camaleˇn
 
Default multiple swap areas and RAID 1

On Wed, 08 Aug 2012 16:25:01 +0300, Georgi Naplatanov wrote:

> I'm going to configure Debian GNU/Linux with software RAID 1 and I think
> to put swap area on RAID 1 (/dev/mdX), but someone told me that if the
> computer have multiple swap partition (e.g. /dev/sda2, /dev/sdb2) with
> equal priorities, linux kernel will mirror swap area between different
> devices. Is that true ? I mean kernel 2.6.32 and 3.2.x.

I guess you mean these two different approaches:

1. Swapping on RAID
https://raid.wiki.kernel.org/index.php/Why_RAID%3F#Swapping_on_RAID

2. More on Linux RAID: Swap On RAID?
http://blog.taggesell.de/index.php?/archives/53-More-on-Linux-RAID-Swap-On-RAID.html

I'd go for the second: put swap under a raid-1 device; without going too
much deep into the issue, it makes more sense to me.

Greetings,

--
Camaleˇn


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: http://lists.debian.org/jvu6pj$kgo$13@dough.gmane.org
 
Old 08-08-2012, 05:36 PM
Mark Allums
 
Default multiple swap areas and RAID 1

On 8/8/2012 8:25 AM, Georgi Naplatanov wrote:

Hi.

I'm going to configure Debian GNU/Linux with software RAID 1 and I think
to put swap area on RAID 1 (/dev/mdX), but someone told me that if the
computer have multiple swap partition (e.g. /dev/sda2, /dev/sdb2) with
equal priorities, linux kernel will mirror swap area between different
devices. Is that true ? I mean kernel 2.6.32 and 3.2.x.

Best regards
Georgi




I think the kernel will swap on multiple devices, of course, but doesn't
mirror data across them. For redundancy, you need RAID 1 or 10 Swapping
on RAID 0 is not redundant and is unnecessary, swap on other RAID types
has performance issues.


More sophisticated disk pooling schemes and file systems like ZFS can
provide safety, too. You can swap on nearly anything that mounts as a
block device. Whether you should is a matter for study. I put swap on
RAID 1 md0 swap partition. Some Linux distributions' installers will
even put swap on LVM logical volumes. Whether that makes sense, I've
never been able to decide.


MArk


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Archive: 5022A3A5.1090906@allums.com">http://lists.debian.org/5022A3A5.1090906@allums.com
 
Old 08-08-2012, 05:45 PM
Georgi Naplatanov
 
Default multiple swap areas and RAID 1

On 08/08/2012 08:14 PM, ´┐Ż wrote:

On Wed, 08 Aug 2012 16:25:01 +0300, Georgi Naplatanov wrote:


I'm going to configure Debian GNU/Linux with software RAID 1 and I think
to put swap area on RAID 1 (/dev/mdX), but someone told me that if the
computer have multiple swap partition (e.g. /dev/sda2, /dev/sdb2) with
equal priorities, linux kernel will mirror swap area between different
devices. Is that true ? I mean kernel 2.6.32 and 3.2.x.


I guess you mean these two different approaches:

1. Swapping on RAID
https://raid.wiki.kernel.org/index.php/Why_RAID%3F#Swapping_on_RAID

2. More on Linux RAID: Swap On RAID?
http://blog.taggesell.de/index.php?/archives/53-More-on-Linux-RAID-Swap-On-RAID.html

I'd go for the second: put swap under a raid-1 device; without going too
much deep into the issue, it makes more sense to me.

Greetings,



Hi Camale├│n.

I did so - put swap on RAID 1.

I haven't found information about linux kernel possibility of mirroring
swap automatically so this is probably misunderstanding or mistake.


Best regards
Georgi


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Archive: 5022A5A6.4070203@oles.biz">http://lists.debian.org/5022A5A6.4070203@oles.biz
 
Old 08-08-2012, 05:56 PM
Gary Dale
 
Default multiple swap areas and RAID 1

On 08/08/12 01:45 PM, Georgi Naplatanov wrote:

On 08/08/2012 08:14 PM, ´┐Ż wrote:

On Wed, 08 Aug 2012 16:25:01 +0300, Georgi Naplatanov wrote:

I'm going to configure Debian GNU/Linux with software RAID 1 and I
think

to put swap area on RAID 1 (/dev/mdX), but someone told me that if the
computer have multiple swap partition (e.g. /dev/sda2, /dev/sdb2) with
equal priorities, linux kernel will mirror swap area between different
devices. Is that true ? I mean kernel 2.6.32 and 3.2.x.


I guess you mean these two different approaches:

1. Swapping on RAID
https://raid.wiki.kernel.org/index.php/Why_RAID%3F#Swapping_on_RAID

2. More on Linux RAID: Swap On RAID?
http://blog.taggesell.de/index.php?/archives/53-More-on-Linux-RAID-Swap-On-RAID.html



I'd go for the second: put swap under a raid-1 device; without going too
much deep into the issue, it makes more sense to me.

Greetings,



Hi Camale├│n.

I did so - put swap on RAID 1.

I haven't found information about linux kernel possibility of
mirroring swap automatically so this is probably misunderstanding or
mistake.


Best regards
Georgi

The basic issue is that putting swap on RAID slows down the writes but
can speed up reads. However, because of the error checking and
correcting, it's safer. You can also use swap files instead of swap
partitions. The speed difference isn't noticeable anymore and swap files
are more flexible.



--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Archive: 5022A84B.4040300@rogers.com">http://lists.debian.org/5022A84B.4040300@rogers.com
 
Old 08-08-2012, 09:20 PM
Rob Owens
 
Default multiple swap areas and RAID 1

On Wed, Aug 08, 2012 at 04:25:01PM +0300, Georgi Naplatanov wrote:
> Hi.
>
> I'm going to configure Debian GNU/Linux with software RAID 1 and I
> think to put swap area on RAID 1 (/dev/mdX), but someone told me
> that if the computer have multiple swap partition (e.g. /dev/sda2,
> /dev/sdb2) with equal priorities, linux kernel will mirror swap area
> between different devices. Is that true ? I mean kernel 2.6.32 and
> 3.2.x.
>
I suggest you consider whether you need redundancy for your swap
parition. What protection are you getting by putting it on RAID?
Basically, if a hard drive fails while the system is using swap, then
the swapped data is safe. If you didn't use RAID and that scenario
occurred, what would happen? Would a program crash? Is that acceptable
to you?

I've set up drives like this before:

/dev/sda1 - swap
/dev/sdb1 - swap
/dev/sda2 - RAID1 --> /dev/md0
/dev/sdb2 - RAID1 --> /dev/md0

I'm not claiming it's the best way. I save a little bit of hard drive
space (which is very cheap anyway), and I accept the risk of crashing a
program *if* the system is swapping while a hard drive dies (a pretty
low probability). Basically low risk and low payoff unless you're using
very expensive disks or have mission-critical applications running.

-Rob


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20120808212017.GA4595@aurora.owens.net">http://lists.debian.org/20120808212017.GA4595@aurora.owens.net
 

Thread Tools




All times are GMT. The time now is 04:06 PM.

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