On Tue, 30 May 2000, Jason Lin wrote:

> If you put / and /boot on raid then probably your swap
> is also on raid.
>

No, unless you configured it this way. But be careful with swap on
raid. It is currently not save to swap on raid while an array is being
reconstructed eg. after a crash. I am using the following script
instead of "swapon -a" that ensures swap is started after the resync is
done:

#!/bin/sh
#

RAIDDEVS=`grep swap /etc/fstab | grep /dev/md|cut -d" " -f1|cut -d/ -f3`

rm -f /var/run/raidswap-status
for raiddev in $RAIDDEVS
do
   while grep $raiddev /proc/mdstat | grep -q "resync="
   do
      echo "`date`: $raiddev resyncing" >> /var/run/raidswap-status
      sleep 20
   done
done

/sbin/swapon -a

exit 0


>  Does having swap on raid have any significant impact on performance?  
> 
You can configure linux swap to act as a raid 0 by giving each swap
partition the same priority. However this lowers the redundancy, because
if one disk dies and some process got its swap data on it your system
might die. Putting a SW raid 1 over this will give you more redundancy
but might perform slower since writes to a raid 1 are slower then to
a raid 0.

Holger

Reply via email to