Hello

Since swapping on a software raid is not save during the resync phase of
the swap drives, I thought of running the following script instead of
swapon -a (md3 is my swap drive):

   #!/bin/sh
   #

   while /bin/grep md3 /proc/mdstat | /bin/grep -q "resync="
   do
      echo "md3 resyncing" >> /tmp/raidswap-status
      sleep 1
   done
   /sbin/swapon /dev/md3

My setup is the following:

  /dev/md0   /boot    raid1
  /dev/md1   /        raid5   (3GB)
  /dev/md2   /home    raid5   (30GB)
  /dev/md3   swap     raid1

Is the above script correct? What is the order that the raid code will
reonstruct the different arrays? They are all on the same controller.

Holger

Reply via email to