project: sata raid 5 file server
this project came about because a client of mine was quickly running out of space in one of the file servers. the current server was actually a windows xp desktop in its previous life. the specs are: pentium 4 running at 1.7 ghz, 256 megabytes of memory, 40 gigabyte hard disk with the video and network card is built into the motherboard.
i converted this slow desktop into a spiffy file server using linux and samba about a year ago. since then i’ve added a 120 gig hard disk to augment the space but apparently that wasn’t enough. adding a 300 gig hard disk would probably help in the short term but i’d rather think and plan for the medium to long term.

the server with the cover off. dusty inside.
the idea is to have a reliable file server with a large storge space. i didn’t want to buy a separate server because there’s a computer here that can do the job with the right upgrades.
the hardware upgrades i chose were:
- four maxtor 300 gb serial ata hard drives — i wanted scsi but that’s still expensive so i went with these sata drives which are still pretty fast and half the price of scsi drives. and their capacity is big too.
- an adaptec serial ata raid 2410sa enclosure kit — i wanted raid 5 and i have known adaptec to be reliable plus i like the enclosure which features hot-swapping and a fan is already built in at the back of the unit.
- hec 385 watt power supply — feeding four sata drives and an ide drive with enough power 24×7 is not a joke but this one should do the job easily.
- thermaltake smart case fan — five drives in one case can generate a lot of heat so i got this to help out the power supply and the enclosure fans.
the first thing to do is backup all the data in the current system. this was easy enough since we have another file server (from another department) with plenty of space.
next is to disassemble the system for cleaning and a little modifying. i did a test fit of the adaptec drive enclosure with the case and found out that four drive guides were blocking the way. those guides would have to be bent back so that the enclosure would fit. i also did some measurements and i knew that the back of the enclosure would hit the motherboard. the compromise would be that two centimeters of the enclosure would be jutting out from the front of the case which is fine by me.

the server up close. the empty space is where i’ll plug the adaptec enclosure. you can see the two hard drives below.
after disassembly and cleaning, the old components goes out to storage and the new ones are installed. adaptec’s installation manual was pretty helpful but its not exactly for a novice. hec’s manual was more sparse.

the adaptec sata raid enclosure kit.
i would have more pictures but the batteries of the camera gave out. i’ll probably add more pictures when i get the chance.

the maxtor 300 gig hard drive (one of four).
there was no space for a cdrom drive so i had to attach it out of the case while it was open just for the purpose of installing software. the disktte drive was also attached externally just in case i needed to use the driver disks for the controller. once everything was put together i rechecked the connections and powered up the system. no error beeps. great!
adaptec has utilities programmed into the controller and the first thing to do was to build the array and clear the disks. this alone took a little over five hours! well, the utility did warn me about it and they are big disks. once the array was built and cleared its time to install linux.

the front view on the enclosure. on the left are two of the four drive carriers. you can see the built-in fan.

the back of the enclosure. just below the fan you’ll see the four sata drive sockets, two molex sockets and a socket for all four leds of the drives.
the distribution i chose was clark connect 3.2r1 (cc). its a distro that’s geared for server use. it doesn’t even have a graphical user interface. i already prepared driver disks for the controller just in case the distro doesn’t recognize it. i was pleasantly surprised that it did and continued on to format the array. that particular task took about 90 minutes. the rest of the installation was a breeze since i only needed samba for windows file sharing and some programs i use to remotely administer the server. i then configged the server to be part of the internal network.
i configured the array to be bootable. unfortunately, the motherboard bios had other plans and said, “no.” no matter how i twiddled with the bios settings to boot from the raid controller it wanted to see an atapi drive first. no biggie. i’ll boot from the ide drive then. cc complied and made the ide drive as boot and installed the rest of the system files in the array.
i then performed some boot testing — several restarts and shutdowns. i wanted to see what happens when the server powers up so there are no suprises later. this server will run headless which means no monitor (and no mouse either). all it has connected to it will be the keyboard, network and power cables so i felt it was important for me to see the boot process before i put the server back into its alloted space. i also performed a test if i can access the web interface of cc from another workstation.
once the tests was successfully done, i moved the server back to its original location, reattached the keyboard, network and power cables and temporarily attached a monitor to see what’s happening at boot and then powered up. everything seems to be in order so i packed up and headed for home. it was getting late.
and no i didn’t forget to restore the data. i just wanted to sleep first.
i also wanted to really test the system for remote administration and what better way to do it than remotely. as in out of the office.
the tools i used for remote administration are win32pad — a notepad replacement and is friendlier to linux text files; putty — as a secure shell client and; winscp — an open source secure ftp client with basic file management functionality. they’re free although winscp would appreciate a donation.
i won’t bore you with firewall details. let’s just say that, with proper credentials, the firewall allows me to log in to the new file server and do stuff ;). once logged in, i added users using the cc web interface, created user groups, copied the backed up files (all 30 gigabytes of it) to the new server and restored the samba configuration file (smb.conf).
one problem i encountered with the data restoration is that after copying back the data, all the directory and file ownerships went to root. that is not really a bad thing but the ownerships are suppose to go to the groups who uses those files and directories. after a couple of chmods (command to change the system modes of files and directories) and chowns (command to change the ownership of files and directories) and everything was fine again.

part of the cc reports page.
i now have a file server with a free capacity of over 800 gigabytes. and as of this writing only 4% of that space is used. yey!
me happy.
