[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]
Re: [LIH] Debian, root RAID install
Making RAID-1 (mirror) devices is quite straightforward. Here's the
procedure you apply:
1. Make identical size partitions on 2 hard disks, say sda5 and sdb5.
If the partitions aren't the same size, the RAID partition will be the
size of the smaller one, leaving some space unused (wasted) on the
larger partition. Make the partition types FD (linux RAID
2. Reboot after fdisk :)
3. Install a new kernel (2.4.x) which has the RAID-0.90 code. I
prefer to put RAID-1 in the kernel; however you can make it a module
if you like (and use a ramdisk boot image if you're doing this for
your root partition). Boot with the new kernel.
4. Install the raidtools for 0.90. Old raidtools will NOT work with
the new RAID code in the kernel. On Debian, the package is called
raidtools2, forgotten what it's called on RH ;-)
5. Create /etc/raidtab. I usually:
man raidtab | col -b > /etc/raidtab ; vi /etc/raidtab
and then edit out everything, just leaving the the sample RAID
configuration. Edit the device partition names for your
configuration. Enable persistent superblock.
You could also create raidtab from scratch, it's not tough -- just
6. mkraid --really-force /dev/md0 (assuming you called your RAID
device md0 in /etc/raidtab). Your logical RAID device is now ready
7. RAID will now start syncing the 2 disks in the background, and the
system may appear sluggish until the syncing is finished. You can see
the status of the device and the sync progress with:
Sync typically takes 5-30 minutes depending on the size of the
RAID device and the speed of the disks. If you ever switch off your
computer without a proper shutdown, the disks will be sync'ed again.
8. mke2fs /dev/md0 (or mkreiserfs or mkfatfs or whatever). You can
do this while the sync is going on, though it might be a bit slow. If
you're the patient type, go have a cup of tea/call your
girlfriend/meditate and run the command after the sync is over.
Warning: using Reiserfs on RAID needs special kernel patches.
9. mount /dev/md0 /raid-directory (choose your directories/device
10. Put an entry for the RAID device in /etc/fstab. It'll be just
like any other fstab entry, except the device will be /dev/md? instead
of /dev/sd?? or /dev/hd?? .
11. [OPTIONAL] Send me a vegetarian pizza. I prefer Domino's veggie
deluxe deep dish with twisty bread -- you can skip the cheesy dip if
you're feeling broke-ish ;-)
CC'ing this to LIH and LD to enhance pizza inflow :-)
>>>>> "Archan" == archan <devrootp@xxxxxxxxxxx> writes:
Archan> Hi Raju, any special tricks u applied? or it is straight
Archan> archan devrootp@xxxxxxxxxxx
Archan> Raju Mathur wrote:
>> Hi Archan,
>> I found out to my discomfort the hard way :)
>> Anyway, the choice was between Debian and RH, I went with
>> Debian anyway. Installed RAID after the system came up.
>> -- Raju
>>>>>>> "archan" == archan <devrootp@xxxxxxxxxxx> writes:
archan> Raju Mathur wrote:
>> >> Will Debian 2.2 allow me to install on a root RAID
>> partition? >> E.g. RH gives me the facility to define a
>> software RAID >> partition at install time and install my / on
>> that. Anything >> equivalent for Debian (2.2)?
archan> By default NO!!!!
>> >> If the answer's Yes, there're these 8 machines I have to >>
>> install Linux on tomorrow, and guess which distribution will >>
>> get installed? :-)
archan> Best is Mandrake7.2 .... :) By default it will ....
archan> archan devrootp@xxxxxxxxxxx
Raju Mathur raju@xxxxxxxxxxxxx http://kandalaya.org/