Sunday, 11 October 2009

Building a customised quiet NAS using Ubuntu server 9.04: Part 1 (background)

Two years ago, we provided a simple NAS device to a customer based around the NSLU2. This setup was originally designed to combat the problem of permissions on OS X and the fact that the applications appear to ignore the umask. Shell scripts do not ignore the umask, but applications can pick and choose their own permissions. The problem is compounded by the main application running under Mac classic.

Sharing documents inside the office was somewhat problematical which is where I came in. The customer now uses this NAS as the central store for all their documents and a big sledgehammer of a cron job comes along every 15 minutes and updates all the permissions on every file. This works brilliantly (even though it runs contrary to the *nix philosophy).

The customer also required off-site data replication, which meant that 3 disks were required. DISK 1 was the main system disk for the NSLU2. DISK 2 of the NSLU2 would be swapped out [DISK 2A], replaced with a second DISK 2 [DISK 2B] and DISK 2A stored offsite (and vice-versa). A nightly backup would rsync everything from DISK 1 to DISK 2?.

The problem is that the NSLU2 and the USB disks associated with it are messy and the swapover was usually problematical due to mounting/umounting issues. It was never going to be very elegant.

After the last outage [caused by a swapover of DISK 2 into DISK 1], I persuaded the MD to upgrade the server to something custom built and perfectly suited to their needs. This would be contained NAS in a box, RAID 1 (mirrored) disks and mount HFS formatted USB disks so that the backups could be mounted in OS X. It would be a one button switch on/off operation. It would run Ubuntu server 9.04 (I don't want to wait for the next LTS release and 8.04 is just so 2008).

Shopping list:

  1. Foxconn R10-S3 Intel Atom 330 (Dual core with HT, appears as 4 CPUs to Linux) from Micro Direct.
  2. 2GB Memory DIMM from Crucial.
  3. 2 x HGST 1TB SATA Saturn hard drives from Dabs. I was unable to buy the hard drives from Microdirect as their javascript shopping basket (UPDATE quantity appears to be fubar'd). Sigh.

I propose to re-use the Hard drives bought for the NSLU2 and reformat them as hfsplus filesystems once the data has been migrated across to the new NAS.

Next issue - building the server, installing the OS.

No comments: