[Slackdocs] RAID howto

Niki Kovacs info at microlinux.fr
Sun Oct 14 16:27:22 CEST 2012


Le 14/10/2012 13:45, Paul Chavent a écrit :
> That why i struggle with raid since my first post. I'm looking or the
> right way to do.

Oh, and something else. There's sometimes the remnants of previous 
setups to take care of. So when I have to install Slackware on a server 
using RAID, I do the following:

# mdadm -Ss

# mdadm --zero-superblock /dev/sda1
# mdadm --zero-superblock /dev/sda2
# mdadm --zero-superblock /dev/sda3
# mdadm --zero-superblock /dev/sdb1
# mdadm --zero-superblock /dev/sdb2
# mdadm --zero-superblock /dev/sdb3
...

(Repeat for every disk and partition...)

Once this is done, I zero the partition tables:

# dd if=/dev/zero of=/dev/sda bs=512 count=64
# dd if=/dev/zero of=/dev/sdb bs=512 count=64
...

(Again, repeat for every disk)

REBOOT!

And then only:

# cfdisk /dev/sda

Partition every single disk: sda, sdb, sdc using "DA"

And then:

# mdadm --create /dev/md1 --level=1 --raid-devices=4 --metadata=0.90 
/dev/sda1 /dev/sdb1 etc.

Before launching the installer, I take care of defining the swap partition:

# mkswap /dev/md2

Now I do the following:

# watch cat /proc/mdstat

And here I wait for my disks to synchronize completely, which can take 
an hour and a half or more. Only when they are fully synchronized 
([UUUU]) do I launch the installer:

# setup

Once installation is complete: EXIT the installer.

# chroot /mnt

Two things here:

1) Build an initrd (and don't forget RAID="1").

2) Configure LILO to use the RAID array.

Hope that helps.

Niki

-- 
Microlinux - Solutions informatiques 100% Linux et logiciels libres
7, place de l'église - 30730 Montpezat
Web  : http://www.microlinux.fr
Mail : info at microlinux.fr
Tél. : 04 66 63 10 32


More information about the Slackdocs mailing list