Wiki source for HomeNasSetup

Show raw source

======Home NAS Setup======
Follows my notes on building a home made Network Attached Server (NAS).

These are notes are not a step-by-step tutorial, instead they are a complete guide from I've done to solve some difficulties that I've been facing. For topics that I've found interesting notes I'll provide the reference. For the solutions that I came up, I'll try to describe more detailed.

I have assembled to cheapest computer possible to work as NAS:
- Motherboard PCWARE IPX1800E2;
- 2xIntel(R) Celeron(R) CPU J1800 @ 2.41GHz Processor, embedded in the motherboard;
- 2x2 TB Seagate Constellation ES - SATA 2.6;
- 1x2 TB Seagate Barracuda 3.5 - SATA 3.1;

=====Operational System=====
For the NAS OS I've choosen [[ OpenSUSE 15.1]].

=====Disks and Filesystems=====
In order to have some redundancy and not trow away I've decided to use the RAID software available on linux with [[ mdadm]]. I'm using RAID level 5, which permits to miss one of my tree disks without loosing any data. As file systems I've played safe and chose EXT4 for / and XFS for /mnt/storage.

=====Notables Software=====
The most important softwares that work as glue between the NAS and theirs clients.

- [[ pySleepWake]]: Software to sleep and wake up the server when some client searches for it;
- [[ rsync]]: is a very well known file synchronizer in Unix world. Its main purpose here is transfer files in bulk to NAS. Was very useful to very the first NAS population. Nonetheless, I still use when I want to perform a 'full' backup or make sure that client is in sync with the NAS.
- [[ syncthing]]: This program constantly verifies for changes in clients/NAS (here the update is bidirectional, if desired) and keep both in sync. I do not use for my entire home directory, only for specific and most important folders that are frequently altered.
- [[ SSHFS]]: This is a precious piece of software that permits to mount the NAS folders as 'local' volumes over SSH and, better yet, on demand!
- [[ duplicity]]: USE IT???!?!?!
- [[ ES File Manager]]: This is a pretty good file manager for Android that gives the possibility to access the NAS remotely through mobile/wifi networks. With this app you can replace any other 'cloud' stuff. However, it is full of unwanted crap. I'm just still using it while I don't find a better solution.

=====Energy Saving=====
Here in my house the NAS doesn't need to be on 24h/7, it would be an waste of power and also annoying extra heat and noise. So I've decided start it on demand. To accomplish this it necessary other computer able to wake up the NAS, since it is necessary to 'sense' in the network that some other device is looking for the server and also must capable of sending 'magik packets'. The other computer that I'm using to do this task is one Raspberry Pi 2.

There are few software options to this in the web (please refer the links provided below). However, none of them were exactly were I was looking for. So I wrote a small set of Python scripts, called [[ pySleepWake]]. In this set there are two Python scripts: the first '' must go in the server and the second '', should be placed in the device that will be turned on all the time. The controlled variable used to suspend the NAS was taken as the network rx and tx traffic average in a given time window.

Here are some links that I've read as references:

=====Networking & Remote Access=====

- File sharing using ssh (linux) and samba (windows and mac).


=====Raspberry Pi Setup=====

Firewall [X]

=====Other Useful Links=====
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki