Short Attention Span Theatre

Rebuilding NAStie

After a recent spat with NAStie (my home NAS built in building NAStie) and its grub in­fes­ta­tion, I decided to go back to FreeBSD for my home server needs. I like Linux, but mostly for desktop/remote server stuff. For home server on old hardware, I likes me some *BSD.

So, I started my research at my post about RAID1 on FreeBSD (FreeBSD 5.2.1 and cheap RAID1), learned about the RAID-1 options in FreeBSD, and needed to decide whether there was any use in trying for a volume management option.

Answer: NO.

As to why: In my home network server upgrades are driven not by space re­quire­ments, but by old hardware breaking down. My servers are usually hand-me-downs which have been abused by people who (speaking broadly) are not computer savvy. This leads to in­ter­est­ing life-cycles for the hardware, which tends to have had encounters with small humans for extended periods of time before they are "rescued" by me. Since I have never had to add storage to the home server, and I always over­es­ti­mate the total required space for us, it makes sense to set my priorities as follows.

  1. Secure - the data stored should be safe from casual efforts to gain access. I am not trying to stop a determined effort by a major player, but I am trying to stop accidental disclosure and any non-targeted attacks. In this case non-targeted means not targeting me (Dave), it does not mean the attacks would not target an IP address on which my computer happens to be accessible.

  2. Safe - the data stored should be reasonably safe from hard drive failure. I am not looking for perfect safety (impossible!) but expect to be able to recover from a single failed drive. Any data stored on this system will be either a backup of a laptop drive (so, three copies extant), or non-critical data which can be recovered (copies of CD/DVDs, working papers put there tem­porar­i­ly, etc.), thus even failure of both drives at once should just be in­con­ve­nient, not cat­a­stroph­ic.

  3. Accessible - the data stored should be accessible by me anywhere I have Internet access (sshfs or openvpn), and by my wife at home. Speed of access outside the home is not critical, but being able to access it is.

  4. Growth - in the unlikely event my data outgrows my storage capacity (1.5 TB), adding storage should be relatively simple.

As growth is my last priority, and adding hard drives (and thus more space) is not that difficult even with separate partitions to deal with (instead of growing a file system using LVM), I shall not give it much thought.

Now, asides aside, here is a brief "here's how I did it" install de­scrip­tion. This should help in the event I need to look back on how I did it in the future.

Do a standard FreeBSD install but set up gmirror while installing. This was remarkably easy to do once I found the Using Software RAID-1 with FreeBSD page.

Update and install some software.

# freebsd-update fetch install
# portsnap fetch extract
# cd /usr/ports/ports-mgmt/portmaster
# make install
# portmaster shells/bash security/sudo editors/vim-lite www/lynx
# portmaster sysutils/cdrecord sysutils/multitail net/rsync devel/git
# portmaster x11/xorg x11/xlockmore x11-wm/i3 x11/dmenu www/firefox

Note: Some would frown at the presence of X11 on a server, and in a perfect world they are correct. However, I also use this system for playing with FreeBSD and I like three/four uxterms going at once.

Edit /etc/ntp.conf and /etc/rc.conf to make NTP behave. I used the Arch Linux wiki NTP page and FreeBSD Handbook NTP page for reference. NAStie will not be used as the home NTP server, this server will just be used to keep proper time.

# portmaster net/samba35

Configure Samba in a way similar to building NAStie... same references, slightly different internal structure: I will have a single big partition to store things on, but they will be presented as two separate shares to anyone connecting via the network. As I control all the computers writing to these shares, any issues regarding un­con­trolled usage of space should not happen (if they do I can fix the problem as they are my computers ;)).

Finally, we will need some sort of email system on here which does not store the email locally, as I prefer all mail to be sent through my mail server. My preference has been qmail, but I have had thoughts of allowing the default installed MTA to do its job... Hrm. I will try it for a while, and see how things go. The only thing I had to do was modify /etc/mail/aliases, so we will see how well it works.

That is it! The server is running well, the Wif can access her files as can I, and the mirror is fully synced and running. We will see how long that lasts... perhaps my next item will be on how to save the contents of a Time Machine volume to NAStie, or something like that.

Building mutt from mercurial repository on FreeBSD » « htop on FreeBSD
sast favicon