My personal NAS

I built a personal NAS[1] solution back in November of 2015 and it is a “budget solution” mostly based on hardware I already had lying around here at home.

It consists of the following hardware:

  • CPU: Intel(R) Core(TM) i7-2600K CPU @ 3.40GHz
  • Motherboard: ASUS P8B75-MLE
  • Memory: 8GB Kingston HyperX
  • Disks: 1 WD Red 2TB for the OS and 4 WD Red 2TB for my pools
  • Cooling: Custom water cooling
  • Case: Corsair C70


That is practically it when it comes to the hardware powering my NAS. The custom water cooling is a overkill as it could have been cooled by a cheap heat sink coupled with a quiet fan…but what fun is that?
I also have one add-in PCIe SATA III controller card as the motherboard itself has very few SATA III ports, some cheap generic brand I bought via Ebay and which was made in China; it cost me $13.00 with shipping included in the price.

rockstor01_k0nsl rockstor02_k0nsl

As for the operating system. I was very unsure what to go with at the time of assembling the system. My friend “M. Wynn” suggested that I should use NAS4Free, as he was satisfied with it himself. However, I wanted to check out something entirely new which wasn’t very widely used.
rockstor03_k0nsl rockstor03_k0nsl
So, what did I pick? Well, it’s called Rockstor[2] and it truly was something brand spanking new at the time. The first ever public release was pushed to GitHub in July 2015, so at the time I installed it one could say it wasn’t a particularly widely used operating system. In fact, I suspect it still isn’t a widely used operating system. However, I could be wrong on that count.
I am running version 3.8-14.22 and I’m pulling new releases from their test channel rather than the stable one. Yes, I like to live on the edge. The test channel, or branch, features new releases every five days (if there is one available). The stable release channel once every month. My system runs on kernel 4.6.
The four Western Digital enterprise hard disk drives which makes up my btrfs-based pool is configured in RAID 10 because that is the best option for me out of the available raid levels; there is RAID 0, RAID 1, RAID 5, RAID 6 and finally the one I’m using — RAID 10. There are five hard disk drives in total but only four are used for my pool; I honestly cannot afford any more at the moment as it’s over $500 already for the current amount of disks. Keep in mind, this is supposed to be a super budget NAS build and nothing spectacular or mind-blowing.

The web interface of Rockstor has a rather pleasant design based on Bootstrap 3 with a wide variety of features. You can for example create customized storage pools and you can enable their so-called “Rock-on”-feature which is just a fancy front-end for Docker; this will allow you to install various applications such as Deluge, EmbyServer, GitLab, OwnCloud, Sickrage and many more.

Thanks to my water cooling solution the NAS itself is running both cool and quiet. The temperature inside of my house is 16 C and as of this moment the NAS is reporting the following readings:

[root@nas01 ~]# uptime && sensors
 23:18:52 up 29 days,  8:04,  3 users,  load average: 0.27, 0.20, 0.16
Adapter: Virtual device
temp1:        +27.8°C  (crit = +99.0°C)
temp2:        +29.8°C  (crit = +99.0°C)

Adapter: ISA adapter
Physical id 0:  +32.0°C  (high = +80.0°C, crit = +98.0°C)
Core 0:         +32.0°C  (high = +80.0°C, crit = +98.0°C)
Core 1:         +28.0°C  (high = +80.0°C, crit = +98.0°C)
Core 2:         +28.0°C  (high = +80.0°C, crit = +98.0°C)
Core 3:         +22.0°C  (high = +80.0°C, crit = +98.0°C)

That’s with just one fan on the absolute lowest RPM on the dual radiator.

I have to say, despite this being a so-called “curry solution” I’m satisfied with it. I have had zero issues to speak of, none that would warrant mentioning anyway!


[1] A Network Attached Storage (NAS) device is a storage device connected to a network that allows storage and retrieval of data from a centralized location for authorized network users and heterogeneous clients. NAS devices are flexible and scale-out, meaning that as you need additional storage, you can add on to what you already have. A NAS is like having a private cloud right in your home. It’s faster, less expensive and provides all the benefits of a public cloud, giving you absolute control.

[2] Rockstor is a Linux/BTRFS based Network Attached Storage (NAS) and private cloud solution. It is distributed as a CentOS flavored Linux operating system with a newer kernel and Rockstor application software bundled together to easily install a system and manage your data. You can find more information about Rockstor, here.

I hope this might post might be useful to someone else. I certainly would recommend Rockstor for anyone looking to build a personal NAS; it is a solid product and it is 100% open source.


iRedMail: “No module named sqlalchemy”

If you’re wondering why you cannot send e-mails after installing iRedMail, make sure “iredapd” is started correctly and isn’t throwing a fit (e.g check /var/log/maillog). In my case I found out iredapd wasn’t running — the log told me:

May 26 00:45:34 beta500 postfix/smtpd[20791]: warning: problem talking to server Connection refused

I therefore proceed to restart iredapd:

root@beta500:/root # service iredapd restart
iredapd is already stopped.
Starting iredapd ...
Traceback (most recent call last):
  File "/opt/iredapd/iredapd.py", line 11, in 
    from sqlalchemy import create_engine
ImportError: No module named sqlalchemy

Aha! That’s why. The solution is as simple as the error indicates! Simply add the package:

root@beta500:/usr/ports/databases # pkg install databases/py-sqlalchemy
Updating FreeBSD repository catalogue...
FreeBSD repository is up-to-date.
All repositories are up-to-date.
The following 3 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
        py27-sqlalchemy: 0.7.10_2
        py27-sqlite3: 2.7.9_6

The process will require 17 MiB more space.
2 MiB to be downloaded.

Proceed with this action? [y/N]: y
Fetching py27-sqlalchemy-0.7.10_2.txz: 100%    1 MiB   1.3MB/s    00:01
Fetching py27-sqlite3-2.7.9_6.txz: 100%   28 KiB  29.0kB/s    00:01
Fetching sqlite3- 100%  791 KiB 810.5kB/s    00:01
Checking integrity... done (0 conflicting)
[1/3] Installing sqlite3-
[1/3] Extracting sqlite3- 100%
[2/3] Installing py27-sqlite3-2.7.9_6...
[2/3] Extracting py27-sqlite3-2.7.9_6: 100%
[3/3] Installing py27-sqlalchemy-0.7.10_2...
[3/3] Extracting py27-sqlalchemy-0.7.10_2: 100%
root@beta500:/usr/ports/databases # service iredapd restart
iredapd is already stopped.
Starting iredapd ...

You’re done. Now you can send e-mails again


devNET Webmail

devNET Webmail devNET Webmail

I have not been doing much lately so I decided to spice up the webmail used by my clients and myself. The base is Roundecube [1] and the skin was originally by Mr. Dieck but heavily modified by me. This is what it currently looks like:


It’s an ongoing project, but I think that it looks far better than the default “Larry”-skin used in Roundcube, in my view.

The “Larry”-skin looks like this:

Right. That’s it!


1. The Roundcube Webmail suite: https://github.com/roundcube/roundcubemail


New IRC vHost + webpage

zionism.de - peculiar domain? zionism.de - peculiar domain?

Just briefly:

I obtained “zionism.de” for the sole purpose of creating a vHost for usage in IRC, and perhaps later, also use it for VPN purposes. A modest webpage was spawned as well, see:

The domain only cost me seven or eight bucks, so I said to myself and some of my pals “what the heck, I’ll buy it.”

Happy 2014, when it finally dawns!


Running Varnish Cache, again.

I decided to give Varnish Cache another try now that I’ve isolated the back-end from the main web server for k0nsl.org, and it’s all working very fine so far. Took all of five minutes to install + the configuration edits. I’m going to be letting it run and monitor the various instances, logs and also the output generated in varnishstat to evaluate it further!

varnishstat varnishstat

But it feels great so far! Also feels good not having to worry about issues with the back-end being cached 

Another thing: I just bought “zionism.de” (yeah I know…) and will be giving out access to a ZNC via “we.must.destroy.zionism.de” once I got it all set up. The registrar for that domain is not the fastest guys…thank heavens for internet.bs, though. So. In any case, if you’d like to use the ZNC, don’t hesitate to contact me.


[ERROR] Error in accept: Too many open files (MySQL)


I re-post this message here in case somebody else stumbles upon a similar issue. This is mail conversation between myself and a client.


Our MySQL issue should be solved now. I had done something faulty, call it naive, by setting the open_files_limit variable to an unrealistic high value (like 900000) but I didn't think for a second that there could be a max limit for this, so my value never stuck, it never was enabled. I found out this earlier today when I — again — saw this in the log:

131201 20:30:01 [ERROR] /usr/sbin/mysqld: Can't open file: './[DELETION]/md_usermeta.frm' (errno: 24)
131201 20:30:01 [ERROR] /usr/sbin/mysqld: Can't open file: './[DELETION]/md_users.frm' (errno: 24)
131201 20:30:11 [ERROR] /usr/sbin/mysqld: Can't open file: './[DELETION]/phpbb_config.frm' (errno: 24)
131201 20:30:12 [ERROR] /usr/sbin/mysqld: Can't open file: './[DELETION]/phpbb_config.frm' (errno: 24)
131201 20:30:12 [ERROR] /usr/sbin/mysqld: Can't open file: './[DELETION]/ez_options.frm' (errno: 24)
131201 20:30:12 [ERROR] /usr/sbin/mysqld: Can't open file: './[DELETION]/ez_options.frm' (errno: 24)
131201 20:30:12 [ERROR] /usr/sbin/mysqld: Can't open file: './[DELETION]/ez_options.frm' (errno: 24)
131201 20:30:19 [ERROR] /usr/sbin/mysqld: Can't open file: './[DELETION]/phpbb_config.frm' (errno: 24)
131201 20:30:20 [ERROR] /usr/sbin/mysqld: Can't open file: './[DELETION]/wp_options.frm' (errno: 24)
131201 20:30:20 [ERROR] /usr/sbin/mysqld: Can't open file: './[DELETION]/wp_options.frm' (errno: 24)
131201 20:30:20 [ERROR] /usr/sbin/mysqld: Can't open file: './[DELETION]/wp_options.frm' (errno: 24)
131201 20:30:21 [ERROR] /usr/sbin/mysqld: Can't open file: './[DELETION]/wp_options.frm' (errno: 24)
131201 20:30:21 [ERROR] /usr/sbin/mysqld: Can't open file: './[DELETION]/wp_options.frm' (errno: 24)
131201 20:30:21 [ERROR] /usr/sbin/mysqld: Can't open file: './[DELETION]/wp_options.frm' (errno: 24)
131201 20:30:21 [ERROR] /usr/sbin/mysqld: Can't open file: './[DELETION]/wp_options.frm' (errno: 24)

This raised a suspicion of my setting not being applied properly, I take a look at the relevant variables:

[root@srv51 mysql]# mysqladmin  variables |grep -i open
| have_openssl                                      | DISABLED                                                                                                               |
| innodb_open_files                                 | 300                                                                                                                    |
| open_files_limit                                  | 1024                                                                                                                   |
| table_open_cache                                  | 400

Yep, suspicion seems to be valid! So I confirmed that our open_files_limit was only at 1024 (an absurd number for production server with a lot of activity), by doing:

[root@srv51 mysql]# netstat -atnp|grep 3306
tcp        0      0      *                   LISTEN      17612/mysqld

And then:

[root@srv51 mysql]# cat /proc/17612/limits
Limit                     Soft Limit           Hard Limit           Units
Max cpu time              unlimited            unlimited            seconds
Max file size             unlimited            unlimited            bytes
Max data size             unlimited            unlimited            bytes
Max stack size            10485760             unlimited            bytes
Max core file size        0                    unlimited            bytes
Max resident set          unlimited            unlimited            bytes
Max processes             63695                63695                processes
Max open files            1024                 4096                 files
Max locked memory         65536                65536                bytes
Max address space         unlimited            unlimited            bytes
Max file locks            unlimited            unlimited            locks
Max pending signals       63695                63695                signals
Max msgqueue size         819200               819200               bytes
Max nice priority         0                    0
Max realtime priority     0                    0
Max realtime timeout      unlimited            unlimited            us

Yeah, the value I had set never was enabled. Dumb k0nsl! So I re-edited the configuration file, this time setting it at a value of 90000. Re-did the checks after restarting MySQL and the value has now been changed to 90000.
So for now I keep monitoring everything, but that issue is resolved.