Thursday, February 1, 2007

Virtual RAID-Z columns

The alogrithm for allocating storage on the RAID-Z device is *almost* done (+ all necessary debugging time). Instead of creating a RAID-Z of size:
MIN(disks) * (num_disks * parity)
You will be able to create a RAID that uses the full capacity of the disks in the array. i.e. you will be able to effectively use all space on an array of mismatched disks.

The idea:
1) The length of a virtual column is the size of the largest disk in the RAID.
2) Layout the disks, end to end, modulo the virtual column size
e.g. 120, 80, 60, 40
----------------
| | 80 |____|
|120 | | 40 |
| | |____|
| |____|
| | |
| | 60 |
----------|

3) It's the job of vdev_raidz_map_alloc() to convert an offset/length of the desired access into individual offsets and length within the leaf vdevs.
4) Care needs to be taken at the boundary points between disks, and in the case above the raid-z moves from being 3 cols to 2 cols at offset 90.
5) The benefits are substantial, however. Instead of creating a RAID with size 40*3 = 120, we can, with single parity, creat a RAID of size 80 + 60 + 40 = 180. Furthermore, in the case of blocks not going over disk divides, we save IO bandwidth by using a 3 col RAID-Z instead of a 4 column RAID-Z.

Disaster -- Macbook hard drive failure

The SATA disk in my Macbook committed suicide two days ago. As a result, all work I was doing under VMWare has stopped (VMware Fusion disk images are incompatible with VMware server under Linux).

Back with my old Athlon (minus the dodgy DMA on the Promise card).