<br><br><div><span class="gmail_quote">On 2/3/06, <b class="gmail_sendername">Ed Wilts</b> <<a href="mailto:ewilts@ewilts.org">ewilts@ewilts.org</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On Fri, Feb 03, 2006 at 07:21:33AM -0600, Steve Swantz wrote:<br>> On 2/2/06, Josh Trutwin <<a href="mailto:josh@trutwins.homeip.net">josh@trutwins.homeip.net</a>> wrote:<br>> ><br>> > Any thoughts on this issue? I had assumed that putting swap in the
<br>> > RAID and having one partition (say /dev/md2) as the swap partition was<br>> > the way to go but some netizens argue that this is a performance<br>> > problem and that if one drive goes bad it'll still boot ok even though
<br>> > one of the swap partitions is dead.<br>> ><br>><br>> I'm more interested in the machine staying up (as opposed to just booting<br>> up) if one of the swap drives dies, so I put swap on a RAID 1 partition. My
<br>> server is lightly loaded, and I may not be able to get to it fix it for<br>> several days at a time, so staying up is most important to me than absolute<br>> maximum swap performance.<br><br>There are two issues to worry about here, and I believe you may be
<br>getting incorrect information here.</blockquote><div><br>I'm not sure if you're referring to me or to Josh. <br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
First, if you swap on a non-mirrored volume and that volume fails,<br>you'll likely crash. </blockquote><div><br>Yes. That's why I have swap on a RAID 1 device.</div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Creating swap files on non-mirrored drives will<br>allow you to boot but not keep you up in the event of a drive failure.</blockquote><div><br>Yes. That's why I have swap on a RAID 1 device. <br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Secondly, it's important to note that swap and normal file system<br>operations aren't the same thing. If you need to swap and the software<br>mirror goes away, you may not recover anyway. What I've been told is<br>that swapping is done at a layer that will not survive a drive failure.
<br>Doing some googling, though, I see that this was an issue in 2002 and it<br>might actually be stable now.</blockquote><div><br>I'm not familiar with that. I did have a test/spare box with / on /dev/md0 and swap on /dev/md1 stay up after a having a problem last month. I got a 'degraded array' warning on md0, and a few days later, a 'degraded array' warning on md1 and the machine stayed up. (The same drive was the problem on both md devices.) I don't know enough to say whether swap on RAID1 is robust or if I got lucky. That machine has very little load and 1GB of memory - it's hard to imagine it using swap much.
<br><br>When I rebooted it, swap (md1) came up mirrored (to my surprise) but / (md0) came up as one drive missing. Just to see if it would work, I did a hot add, it synced, and all was back to normal.<br><br>And yes, I am watching the sales for a new drive..
<br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Personally, I wouldn't worry about any potential performance problems<br>when swapping. Swapping sucks anyway. Buy memory :-). There's no
<br>point in having excellent performance if your system is flat down with a<br>busted swap drive.</blockquote><div><br>Amen.<br><br>Steve <br></div><br></div><br>