mdadm: what a cool utility.

mdadm is really a cool utility. I decided to move my 6 drive RAID 5 array from my normal workstation to a fileserver stuck somewhere in the attic. prompted in no small part by excess heat and noise in my little office. The fileserver is an old dual Xeon pIII running Debian Sarge that should suffice.

Anyway I umounted the array, stopped it and turned it off. Plugged it into the new server. Booted it. I then just ran:

mdadm --assemble /dev/md1 /dev/sd[cdefgh]and off it goes!! Since the array was never degraded, it doesn’t even need to be resynced.

I then mounted it as usual and Bob is most deffo your uncle!

This is the first time I have installed Debian for 3 years. I am pretty impressed by the new Debian Installer. More or less 1 hour from burning the CD to booting the machine. Nice!

Software vs Hardware Raid in Linux

Software vs Hardware Raid in Linux

An interesting real case experiment of various raid levels, and file system options.

Using RAID 5 with chunk of 128k, and Ext3 with a stride of 16 and block of 4k seems to be the best!
..and something that suprises me is that raid 50 was slower and less cost effective in terms of available storage than Raid 5.

I spent last night reformatting my raid array into RAID 10, then kernel RAID 10 level (rather than a RAID 0 array of RAID 1 arrays), then RAID 50, before going back to RAID 5. There was no real difference in output, and since RAID 5 maximises the storage space, it was an easy decision.

Which indicates that I need a much faster external SCSI box. All the discs are 10k u160 or better. The box is only a SUN UW Box. e.g. u40. I guess the bus is completely saturated!

For anybody who wants to experminent with software RAID in linux, MDADM is really the way to go. It’s just so easy….!

mdadm -v --create /dev/md0 --raid-devices=6 --level=raid5 /dev/sd[abcdef]1

mkfs.ext3 /dev/md0

mount /dev/mdo /mnt/raid

will create, build a filesystem and mount a 6 drive RAID 5 array. I should mention that between steps 1 and 2, you really should wait until the array has finished synchronising and reconstructing itself. Although this point is not essential, it will slow things down. Also MDADM is quite clever, and leaves a drive out as a spare. It constructs the array in degraded mode. That is the array is missing a drive. This speeds things up as there are less drives to saturate the bus.