This weekend, I finished the bulk of the work of a long-standing project I had been pondering. I had all sorts of data lying around on my desktop machine that I didn’t want to lose. Photos, videos, school assignments, and the like. I wanted to be able to back up multiple machines and be able to synchronize my documents, especially while I was using my laptop. Knowing what I wanted to do, and being the IT control freak I am, I chose to build out a home storage appliance. I thought I would share my build process.
The hardware you can use for this project is fairly straightforward. I used a hodgepodge of parts I had laying around. I used:
- Case: older Antec case
- Motherboard: Mini-ITX M10000N small form-factor motherboard, nearly everything integrated
- System Hard Disk Drive: IDE drive I had lying around, 30 GB
I had the bulk of what I needed for the project, but I still needed the drives and a way to attach them to the motherboard. I ordered:
- 2 SATA hard drives, 1TB, from NewEgg
- SATA Host-Bus Adapter to add SATA ports to the system from Deal Extreme
- Assorted SATA data and power cables from MonoPrice
Once all the parts arrived, I started my build. For anyone who has built a computer or replaced parts knows how simple the build really is. The motherboard is mounted into the case, along with the drives. The SATA card is placed into this motherboard’s PCI slot, and the cabling is connected. About an hour later (I removed a VERY old motherboard from this case.), I had the system built and ready for the software for the project.
Several distributions of free software could manage both the storage array and the services designed to present the array to the rest of the network. I chose to use a stock installation of Debian 6.0 stable, with as few packages installed as possible, to keep the bloat down. Of the specific software that I made sure to have installed was the SSH server, NFS file sharing services, and Samba file sharing services. After I installed Debian, I manually installed WebMin to provide a web interface for configuring everything.
First business is to create the array from the SATA disks. I used the cfdisk utility at the command-line to create a single partition over the entire drive, using a partition type of DA, which is listed as a Non-FS data partition. I then repeated the procedure for the second disk. Next, I used the webmin panel to create a RAID1 array (/dev/md0) with both of the disks. After I had the array, I created a new LVM volume group to contain the data array. Creating the volume group in Webmin requires a physical volume to be added to the newly created volume group; I chose the RAID array. Finally, I created an ext4 filesystem and waited for the disks in the array to sync. The synchronization process took roughly eight hours.
The next day, I used webmin to create some SMB shares and NFS filesystems. These will allow my Linux machines to use the data as if it were local and give access to the couple of Windows-centric devices available on my network.
With two fairly short days, and some waiting for disk synchronizing, my file storage device is complete. I am in the process of copying my data from my unreliable desktop to the device as we speak. Among my future improvements and enhancements to the configuration will be a tweaking the mounts and setting up a dedicated space for each user, instead of just a single wide-open storage space. From the hardware side, I eventually will upgrade to a hot-swap carriage from IcyDock. I can also add up to two more hard drives to the existing card. As long as the drives are at least 1TB, I can expand the existing RAID1 into a RAID5. If the drives are larger, I will create one partition as large as the partitions on the original drives. I can then create a new partition for the rest of the new drives and create a new array. This is, to the best of my knowledge, is the way the Drobo allows for expanding storage.
Pingback: Learning from Broken Equipment and Minor Mistakes | Nosbig.net