Hi Mike,

At 09:52 25.03.00, Mike Bilow wrote:
>I am building a dual-IDE system with two identical 30 GB drives.  Each
>drive is formatted identically, a 0.3 GB swap partition at the beginning
>of the drive and the rest of the 30 GB as one of the participants in a
>RAID-1 array.  In other words:
>
>         /dev/hda1 -- 29.7 GB type 0xFD
>         /dev/hda2 --  0.3 GB type 0x82
>
>         /dev/hdc1 -- 29.7 GB type 0xFD
>         /dev/hdc2 --  0.3 GB type 0x82

I'd throw in another small (~20MB) partition right at the start of the 
device for /boot, also type FD. Otherwise you must be VERY carefull what 
Motherbord BIOS and LILO versions you use in order to get a bootable system 
(issues with kernel image possibly located beyond cylinder 1033 of your 
drive from a BIOS point of view).


>1. Swap conventionally, declaring /dev/hda2 and /dev/hdc2 each as a swap
>area and assigning them equal priority.

Of cours this works, but the system will crash if any of the two drives 
dies (and swap is in use).

>2. Combine /dev/hda2 and /dev/hdc2 into a RAID-1 array, say /dev/md1, to
>be used just for swapping.

Also works, but you'll have to modify your startup scripts to delay swapon 
until resynchronisation of the swap partition is finished. That's the 
configuration I'm using. using swap on a raid partition during rebuild WILL 
trash your memory => crash/data corruption.

>3. Create a swap file on /dev/md0 (which has been combined from /dev/hda1
>and /dev/hdc1).

Never tried this, sorry.

>The risk of option 2 is that, if swapping onto a partition while it is
>being remirrored is unstable, then a drive failure would not only crash
>the system, but could cause corruption of good data.  This would be
>especially dangerous in the case of a drive which fails intermittently but
>which usually works on reboot.

Since the problem is clearly defined and can be worked around I like this 
best. automatic resync can only occur on system startup, and only after 
unclean shutdown. a drive removed from an array because of a drive failure 
is NOT readded / resynchronized automatically.

The two cases to take care of:
1) system startup -> swapon with a script that waits for resync to finish
2) manual raidhotadd when replacing drives -> first turn off swap.

Bye, Martin

"you have moved your mouse, please reboot to make this change take effect"
--------------------------------------------------
  Martin Bene               vox: +43-316-813824
  simon media               fax: +43-316-813824-6
  Andreas-Hofer-Platz 9     e-mail: [EMAIL PROTECTED]
  8010 Graz, Austria
--------------------------------------------------
finger [EMAIL PROTECTED] for PGP public key

Reply via email to