== Scope of this NAS ==

There are many choices of Home NAS's out there today which you could consider depending on what you looking for.

If you just want a simple NAS, and are not that much interested in flexibility, managing your data etc, take a look at the NAS in a BOX Solutions.

The HOME NAS I wanted to talk about meet some relatively simple objectives, if these objectives are for you, please read on. I am choosing Flexibility over HIGH Performance


# Fairly simple to setup and maintain
# Easy to recover from a failure
# Easy to upgrade disks to larger disks without impacting the NAS or having to try recreate a logical volume.
# Keep old disks as backups should you have a complete failure or mishap
# Raid 1 type redundancy (more costly)
# Encryption options if required


What I was not so much concerned about although would of been a nice to have

# High Performance
# Saving disk space or having large capacity when using RAID 5.


What I wanted to stay away from was a situation where I lost my data either due to a disk failure or unable to replace th hardware due to age such as a raid controller.

Raid controllers are great when they work, but if you unable to replace them, you may have no data which will be a disaster if you rely on your nas.

I also want to be in control of my data and how it is backed up, accessed, encrypted etc.



== Hardware Requirements ==


# Suitable Server/PC with a basic configuration.
# A minimum 3 Hard disks to start with, 300GB and up. I would recommend a minimum of 2 x 1GB Disks + 1 Disk for the Boot disk. My preference is Seagate, but you can choose what you like.

































# A decent case for cooling your hard disks. I recommend the Antec 900 that can handle many 9 hard disks and has 7 fans for cooling. This is a really cool and inexpensive case. The 7 fans keep the hard drives as cool as anything. The fans also have a speed control, so you can make the hard disks super cool, definitely consider it.







       



== Software Requirements ==

# Ubuntu 9.10 and up or any recent release
# Samba
# Truecrypt if you need or want encryption for your data. [http://www.truecrypt.org Truecrypt]


== Setting up your NAS ==

# Install Ubuntu
# Install SSH (apt-get install ssh)
# Install [[Truecrypt]] (apt-get install truecrypt)
# Verify all your disks are setup by going to System -> Administration -> Disk Utility / Gparted. You should see 3 Disks, 1 Boot disk and 2 Data disks.















== Configure Disks ==

# For each physical disk, create a file system on it such as /dev/sdc1, /dev/sda1. You can choose what ever file system you want, I chose ext3. This takes about 30 mins or so for a 2TB disk.
# Once you have the file systems created, you can choose to encrypt the file systems or not. I am going to walk you through the process at a high level on how to encrypt the disks.
# Truecrypt comes with a gui now, so encrypt devices is fairly straight forward, here is a quick command line tutorial which does the same thing [[Truecrypt_Tutorial]]
# I just encrypt the entire disk, but you can create hidden volumes etc.
# Once you have encrypted your volumes, you can just mount them with a simple script. [[Truecrypt_Mount_Script]] or load the gui, but this is more of a pain if you have multiple file systems.

Once you have the file systems mounted, you should have something like this.

Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/sde1             14326296   4520356   9078200  34% /
udev                    246324       316    246008   1% /dev
none                    246324       204    246120   1% /dev/shm
none                    246324       784    245540   1% /var/run
none                    246324         0    246324   0% /var/lock
none                    246324         0    246324   0% /lib/init/rw
/dev/sr0                177218    177218         0 100% /media/cdrom0

/dev/mapper/truecrypt1  961431816 726301372 186292460    80% /fs2
/dev/mapper/truecrypt2  961431816 726129220 186464612    80% /fs3
/dev/mapper/truecrypt3  1922858096 482702424 1342480088  27% /fs4
/dev/mapper/truecrypt4  1922858096 482702412 1342480100  27% /fs5



== Disk Replication / Rsync Disks ==

In order to keep your disks in sync, put a rsync script in cron which syncs your file systems

# m h  dom mon dow   command
00 01 * * * /fs2/rsync.sh


== rsync.sh ==

#!/bin/bash -x
rsync -a -v --delete /fs2/ /fs3
rsync -a -v --delete /fs4/ /fs5



== Samba / File sharing ==

Once you have your disks up and running, you now need to setup samba.

# Edit /etc/samba/smb.conf and add your shares. See a example of [[smb.conf]] here.
# Restart Samba /etc/init.d/samba restart
# Try connecting from your PC to your NAS Server IP and your share name.

Also check out GeekyFrog for additional reviews of products and items http://geekyfrog.com  Neat reviews of new products and other things.


Category: | 0 Comments

0 comments to “Setting up a Home NAS / File Server”