Posts Tagged ‘raid’
I am in the process of setting up one of my new servers. Yes my old dual pIII machines are going to retire. They are going to live in a “retirement community”
. Any way This time around I am going to use a mirror to protect my data. I never experienced a hardware failure before but I figure better safe than sorry right? So I am going to outline the steps needed to boot from a RAID0.
modprobe raid1 mknod /dev/md1 b 9 1 mknod /dev/md2 b 9 2 mknod /dev/md3 b 9 3
Now setup your /boot swap and / partitions on your first disk (I will assume sda). After you have created your partitions we need to make the second drive partition table match. (I assume your drives are the same size)
sfdisk -d /dev/sda | sfdisk /dev/sdb
Now we need to create the raids using mdadm
mdadm --create --verbose /dev/md1 --level=1 \ --raid-devices=2 /dev/sda1 /dev/sdb1 mdadm --create --verbose /dev/md2 --level=1 \ --raid-devices=2 /dev/sda2 /dev/sdb2 mdadm --create --verbose /dev/md3 --level=1 \ --raid-devices=2 /dev/sda3 /dev/sdb3
Or if you are lazy like me
for i in `seq 1 3`; do mknod /dev/md$i b 9 $i;\ mdadm --create /dev/md$i --level=1 --raid-devices=2\ /dev/sda$i /dev/sdb$i; done
Backup your raid config
mdadm --detail --scan >> /etc/mdadm.conf
You can monitor the status of your raids via /proc/mdstat
watch -n .1 "cat /proc/mdstat"
Once the raid is done syncing you need to create your file systems on your md devices and proceed with the normal install routine. You need to do a bit of extra work when installing grub to make sure its installed on both devices, as well as allows you extra options in case of raid failure.
grub>device (hd0) /dev/sda grub>root (hd0,0) grub>setup (hd0) grub>device (hd0) /dev/sdb grub>root (hd0,0) grub>setup (hd0)
So what kind of performance should people expect from a disk or raid?
How long should it take to create 100G file?
time dd if=/dev/zero of=mako1 bs=65536 count=163840
A customer of ours is using this to create a 10G file and its taking about 20 minutes to create the file on a 12 drive raid 5 with 3ware. After setting ra again (in case the customer did not) and I got about 18 minutes on the same command.
The customer says we should be able to create that file in about 10-20 seconds. ref (http://t2.unl.edu/ce-changelog/dcache04-performance)
[backdated article from old website]