Thursday, September 10, 2009

OpenSource Drobo replacement on Mac OS X (Snow Leopard)

Recently I lost a 320 USB hard drive. What was on it can eventually be replaced, but I've decided that its time to take my personal storage more seriously. I briefly considered getting a drobo. A friend has one and I'm fairly impressed with its abilities. The thing that bothers me the most about it is that its a completely closed system. I'm a bit of a open source evangelist, but I don't consider myself a zealot. However, If there's one part of a computer system that should be free and open, its the code the manages data storage. I can't compromise on this, fsck closed formats.

After a bit of research I settled on using a 4 drive JBOB usb enclosure in a zfs raidz pool. My server is a Mac a circa 2007 Mac Mini running Snow Leopard. The ZFS support is provided by this project. The project still needs some polish but I'm pleased to say it was easy to get my raidz array up and running. The performance is acceptable, I'm sure it would improve if I could use eSATA instead of USB. It's supported by my enclosure but not my mini sadly.

If you're looking to do something similar with zfs here are a few tips, gotchas & advice:

-if you're afraid of using the shell you should probably get a drobo, I'd say my setup was about as easy as formating and mounting any other file system under *nix. Just different and cooler
-esata should improve performance considerably, its already good enough as a media center drive IMHO.
- use raidz with whole drives, I achieved 2/3+ usable space with 4 drives, if one fails the system will continue to work until it can be replaced.
-whenever my mini reboots the drives do not automount and I get 4 nasty messages about not being able to initialize those 4 drives. I hit ignore and then in the shell I type 'zpool import -f '. I'll setup some init scripts for this eventually.
-watch out for the fact that the disk drive names may change since its usb
-watch out for 'GREEN' drives, mine power themselves down frequently and I've had to write a script to prevent this from happening.