software raid- Swap lost [Solved]

christopher.lemire at gmail.com christopher.lemire at gmail.com
Fri May 15 19:29:10 UTC 2009


Software raid documentation is at tldp.org (the linux documentation project). Swap should not be put in raid if you are using raid 0 because the linux kernel can do striping on its own by giving each swap partition the same priority in /etc/fstab. You can read more on that at the website I gave. However if you are using any type of redundant raid level, then you should put swap in raid because if a drive fails, your system will not crash when it trys to receive data from the swap. I've tested this on my own computer both by unplugging a drive in raid 1 and using mdadm to simulate a drive failure. In both cases, when I added the drive back, I needed to rebuild the array with mdadm to add it back to the raid. Currently I have a different setup. My 2 320gb sata2 segates are in raid 0 and my 3rd 1.5 tb sata2 segate is not in raid. Its being used for storage and automated backups with rsync run nightly to backup my /home incase a drive in the raid 0 was to fail, so that gives me the best performance with backups. Also if you have enough ram that your swap doesn't get used much or at all then you get better performance. 
Sent via BlackBerry from T-Mobile

-----Original Message-----
From: Franz Waldmüller waldbauernbub at gmx.at

Date: Fri, 15 May 2009 20:44:42 
To: <ubuntu-users at lists.ubuntu.com>
Subject: Re: software raid- Swap lost [Solved]


Thank you Markus for your advice my Swap is working again.
This was a very quick help.
If somebody has some nice RAID/mdadm documentation at hand I would
appreciate a link.
--> I would like to gain more knowledge and make sure that I will
receive an email by mdadm if a device is not operating as it ought to.

Franz

For the archives:
-------
This was the problem:
I noticed that on my 8.04 ubuntu system no swap was enabled. All
partitions of this system a mirrored as separate raid1 md-devices.

I checked cat /proc/mdstat
md2 : inactive sda3[0](S) sdb3[1](S)
        6441856 blocks
md2 is the md-device of the swap partition.

thanks to Markus the following commands proved successful
#mdadm --detail /dev/md2
mdadm: md device /dev/md2 does not appear to be active.

#sudo mdadm --assemble --scan
mdadm: /dev/md2 has been started with 1 drive (out of 2).

then 1 device was active again the second not

#mdadm /dev/md2 --re-add /dev/sdb3

and everything is fine again.

Thanks again



-- 
ubuntu-users mailing list
ubuntu-users at lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users


More information about the ubuntu-users mailing list