Welcome to http://www.marssoft.de/
 
Wednesday, 13th November 2019 16:30:08 (GMT+1) 

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

guides:raidtools-setup [2014/04/02 22:39] (current)
Line 1: Line 1:
 +
 +====Outdated:​ Using raidtools2 to set up the Raid====
 +
 +For my first run, I used the raidtools to set up the raid, other people prefer to use mdadm directly. If you prefer the newer and little shorter guide to mdadm, jump **[[guides:​debianraid#​(B)_Using_mdadm:​_setting_up_the_Raid|to the mdadm section (B) below]]**.
 +
 +For the raidtools, you need to edit '/​etc/​raidtab'​ to reflect your wanted configuration:​
 +
 +<​code>​
 +# md0: raid 1: /boot
 +raiddev /dev/md0
 + raid-level 1
 + nr-raid-disks 2
 + nr-spare-disks 0
 + persistent-superblock 1
 + device /​dev/​sda1
 + raid-disk 0
 + device /​dev/​sdb1
 + raid-disk 1
 +
 +# md1: raid 1: /
 +raiddev /dev/md1
 + raid-level 1
 + nr-raid-disks 2
 + nr-spare-disks 0
 + persistent-superblock 1
 + device /​dev/​sda2
 + raid-disk 0
 + device /​dev/​sdb2
 + raid-disk 1
 +
 +# md2: raid 1: /usr
 +raiddev /dev/md2
 + raid-level 1
 + nr-raid-disks 2
 + nr-spare-disks 0
 + persistent-superblock 1
 + device /​dev/​sda5
 + raid-disk 0
 + device /​dev/​sdb5
 + raid-disk 1
 +
 +# md3: raid 1: /var
 +raiddev /dev/md3
 + raid-level 1
 + nr-raid-disks 2
 + nr-spare-disks 0
 + persistent-superblock 1
 + device /​dev/​sda6
 + raid-disk 0
 + device /​dev/​sdb6
 + raid-disk 1
 +
 +# md4: raid 1: /home
 +raiddev /dev/md4
 + raid-level 1
 + nr-raid-disks 2
 + nr-spare-disks 0
 + persistent-superblock 1
 + device /​dev/​sda7
 + raid-disk 0
 + device /​dev/​sdb7
 + raid-disk 1
 +
 +# md5: raid 0: /scratch
 +raiddev /dev/md5
 + raid-level 0
 + nr-raid-disks 2
 + chunk-size 4
 + persistent-superblock 1
 + device /​dev/​sda8
 + raid-disk 0
 + device /​dev/​sdb8
 + raid-disk 1
 +
 +# md6: raid 0: /tmp
 +raiddev /dev/md6
 + raid-level 0
 + nr-raid-disks 2
 + chunk-size 4
 + persistent-superblock 1
 + device /​dev/​sda9
 + raid-disk 0
 + device /​dev/​sdb9
 + raid-disk 1
 +</​code>​
 +
 +This handy shell (bash) script will create the raid for you, including the needed devices and the filesystem. Set FS to the filesystem of your choice (FS=ext3, FS=reiserfs,​ FS=xfs), and watch out for needed options.
 +
 +<​code>​
 +FS="​reiserfs -q"
 +for I in 0 1 2 3 4 5 6
 +do
 + if [ ! -e /dev/md$I ]; then mknod /dev/md$I b 9 $I; fi
 + mkraid --really-force /dev/md$I
 +
 + T=`cat /​proc/​mdstat | grep resync`
 + while [ "​$T"​ != ""​ ]
 + do
 + echo "​$T"​
 + sleep 10
 + T=`cat /​proc/​mdstat | grep resync`
 + done
 + mkfs.$FS /dev/md$I
 +done
 +</​code>​
  
guides/raidtools-setup.txt · Last modified: 2014/04/02 22:39 (external edit)