Thursday, October 23, 2014

Your Own Cloud Server - Owncloud on a Low Power Server

Modern everyday "computing" (referring to computer usage) is done on low power devices, such as smartphones and tablet PCs.
 Many of such devices and their applications (aka apps) depend on the availability of "the cloud".
"The cloud" brings its very own challenges and difficulties. Many cloud service, in particular the gratis ones, claim ownership of the data given to them. In addition to that kind of problem, the space offered by such services is usually rather limited. Of course ... one can get more, when paying some sort of subscription fee. Fair enough...

However, there is an alternative: running your very own cloud service.

Let's take some considerations to design a system for a private cloud service:
  1. low energy consumption
  2. high capacity
  3. availability
  4. data safety
  5. low cost
  6. available clients
With the present technology, I figure one cannot obtain all the wishes with using just a single computer. However, I believe that a simple system can be set up to fulfill all the requirements of the considerations. Actually, I did just that, for my very own personal cloud.

And here is how I did it, and what I used.

The Cloud Server Hardware
For serving the personal cloud, a computer is needed that runs essentially 24/7. The power consumption of which will finally dominate the energy bill for the system. Also, I wanted this particular server to be really silent, since I do not have the space for a dedicated server room.
My decision was to go for an GigaByte BRIX with a Celeron N2807. This device is passively cooled, very cheap and takes 2.5" HDDs. I decided to give the BRIX 4GB of RAM and a 500GB TOSHIBA HDD, making it a very quiet little box with a decent capacity.

The Cloud Server OS & Software
For the OS I decided to go with ubuntu server 14.04.1 LTS. Ubuntu is not my first choice when it comes to operation systems, in particular due to the built-in spyware (e.g. Zeitgeist), however, when it comes to hardware compatibility, ubuntu is the leader of the pack. Using a contemporary device as the BRIX therefore urges for the decision to use ubuntu. Also, I think that stuff like Zeitgeist is not present on the server edition of ubuntu (not sure though). To make life easy, I use webmin on the headless server,
Turning towards the cloud server. I am aware of only one server for which cloud clients exist for essentially every system available: owncloud.
The documentation available for ubuntu server and owncloud is good enough, so that I wont comment any further.

Availability
That's a topic that splits in 2 easily.
  1. the server needs to run 24/7, we already had that topic....
  2. the server needs to be reachable from anywhere
For the second point I would like to point towards dynamic DNS.  Should you have your very own domain, this will of course not affect you. I use a dynDNS called noip, which is for free under certain circumstances.

Data Safety
Now we are touching a topic that is not as easy as it sound. How safe do you want your data to be? How much of your data do you need to be really safe?
Since I can't answer any of questions alike for anyone else but me, I would like to share my very own approach to the problem.
In my home, a file-server backs up all data on a RAIDZ (Zetabyte FS RAID). For the purpose I run a 6 core AMD FX6100 based, 4 x 1TB HDD machine. This particular machine, running FreeNAS, was originally housing my cloud-server. However, AMD processors are known for being somewhat power hungry, hence, this server runs a few hours a week only.
For data safety, I backup of all my computers, including the BRIX, on this file-server. Such backups can be easily configured for the cloud-server, using webmin (NFS is your friend!).

The Costs
Finally, the last topic. The BRIX is the cheapest computer I ever bought... I believe. In average this thing runs on 5 to 8 Watts.

Clients
Owncloud.org offers clients for Windows, OS-X and Linux for free.  Further, paid apps are available to connect Android and IOS devices to owncloud severs. There are some 3rd party Android apps available for free...

Conclusion
Running your own cloud service is an easy thing, which comes essentially for free. Volume is not an issue any longer, add as much space as you need! The BRIX comes with a USB3 port, hence you can plug as much storage as your heart desires into the device...



BIOS photos (BRIX)
on demand, I shot some photos (literally) of the BIOS settings I believe being relevant (no particular order):





I hope, those help...


UPDATE:
Wolfram Webers found that his BRIXs wont boot using ubuntu. However, Wolfram made a successful attempt installing CentOS7. Actually, I might just give that a try too! Thanks Wolfram!


UPDATE:
Wolfram Webers wrote on google+:
It was grub, of course. And here's my solution that works at least for Debian 7.8:

GRUB_DEFAULT=0
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX="crashkernel=auto vconsole.keymap=de vconsole.font=latarcyrh eb-sun16 rhgb quiet"
GRUB_TERMINAL_OUTPUT="console"
GRUB_DISABLE_SUBMENU=true
GRUB_DISABLE_RECOVERY=true


Again, thank you very Wolfram! I am sure that this help other who wish to build such a little own-cloud server.


Sunday, October 19, 2014

Yosemite or not?

Having had my share of failures in my experiments, I would like to add another one: OS-X Yosemite!

I tested the new OS-X on 2 of my Hackintoshs:
  1. a Z77 i3 - which installed fine 
  2. a Z87 xeon - the install failed
Let's start with the 2nd ... my Z87 Xeon E3 runs Mavericks perfectly!
When trying to install Yosemite, the entire thing fails. Yosemite was written half way, so I had to recover Mavericks from backups. No problem here...

The Z77 i3 did not object to the installation of OS-X Yosemite. However... The BIG deal about OS-X-10.10 was that any modern IOS device can connect to the OS-X computer.
Well, my iPad-mini could actually _not_ connect to the i3 running Yosemite. Neither through WiFi, not through Bluetooth.

So... what's the point?!

Yosemite does not install properly on hardware running Mavericks.
Even if Yosemite is installed, the functionality does not match the promises...

What's the point?!

I'll be running Mavericks for the time being.

Tuesday, September 9, 2014

NAS4Free Observation

Presently I am duplicating the data residing on my NAS4Free server (Acer EasyStore H340) to my somewhat more potent AMD FX6100 based FreeNAS server.

Copying data by means of NFS is not that exciting...
However, what can be observed is.
My NAS4Free is usually set to the "Powermode" "adaptive" (low power consumption). For events like copying TBs of data, I might set it to "highadaptive" (high performance - using more power).
Since my Intel ATOM 230 seems to be the bottleneck, I opened the gates and set it to "maximum" (highest performance).

Watching the sever performance, the following was observed:
  • adaptive produced a solid outbound data stream of about 30Mbps with a CPU load of about 10%
  • lowadaptive produce the same outbound data stream of about 30Mbps with slightlt higher CPU load of 12%
  • maximum actually resulted in a lower outbound data stream of about 25Mbps ....
Not sure why that is. However, my conclusion is to always run this particular server at "lowadaptive".

Friday, August 29, 2014

Changing from NAS4free to FreeNAS

I am a great fan of NAS4Free. It houses my most precious data for a long time by now.
However, there is a problem with using TimeMachine with NAS4Free. Actually, I have no clue why...

Incidentally, I was playing with another distribution, quite similar to NAS4Free: FreeNAS. FreeNAS is a bit heavier than NAS4Free, although they share the same origin.
Unfortunately, FreeNAS is a tad to big to fit on the internal SSD of my Acer Easystore (Intel Atom based), which actually houses my precious data.

From another project, I had a box with an AMD FX-6100 processor, which was not doing a lot. So I decided to give it a shot, installed 4 HDDs and NAS4Free on a stick. To that time, I thought that my TimeMachine problem was originated in the lack of compute power of the humble Intel Atom. Well, I was wrong. Even 6 cores and 8GB RAM could not solve those problems.
However, the NAS with the AMD FX-6100 served perfectly in all other services.

My TM-backups were done, you will find that post on this blog, on a FreeNAS-based AMD-APU machine, which I called TimeVault. To the present day, this is a very reliable TimaCapsule subsitute.

However, I decided to give my bad-ass 6 core NAS a second chance concerning TimeMachine. So, I got myself an external 3TB HDD, to temporarily backup the data. It took for ages, with many failures, doing it via AFP and a regular Hackintosh. I discovered that using the Hackintosh, this backup was much faster, not failing at any stage, using NFS (which I had set up for my UNIX machines anyway). Lesson #1: use NFS even on a Mac/Hack!

Now, finally, today, I did the migration from NAS4Free to FreeNAS on the 6 core machine.
And this is was this post is all about!
Buying an HDD, backing up data and all that for just for the bin!
I booted a 1 year old CD version of FreeNAS and installed it.
As soon as the box was up, I could just use WebGui with "Storage" => "Auto Import Volume" to import my 4 ZFS formatted data disks. Everything was done automatically... the process even recognized my ZFS data pool settings! And of course, all my data was fine!

Finally I installed the most recent stable upgrade of FreeNAS.

Presently running it, TM finally seems to be happy backing up to the 6 core box.

Monday, March 31, 2014

Quick Tip: Calibrate Your Monitor!

If you are using your Hacktintosh to just check email once in a while, this post is not further importance to you. However, if the computer is used for any sort of visual work, such as processing of video or still photography, artwork or design, you may want to consider calibrating you screen.

Of course there is the relatively pricy option of screen calibrators which you connect via USB and all the magic happens.

As to Apple's OS-X, there is a calibration mode provided for free, which uses even more precious sensors, namely your very own eyes.
For using this tool, you want to open the "Displays" option in "System Preferences". Go to the "Color"-tab. Now you want to click on "Calibrate...", which will open another window. Be sure to check the "Expert mode" box! As of now, lean back (as the instructions will tell you) and follow the instructions!
My experience told me to do this exercise a couple of times in order to get the hang of the tool and a  precise calibration. Mind you, you are using parts of your very own body to calibrate an electronic device. Using your senses always involves learning.

Sunday, March 30, 2014

The Ultimate Touchpad(s)

Not that I did so much myself concerning IT lately. However, there is always stuff to discover.

Lately, I bought a Wacom Bamboo Pad (the wireless version). The initial plan was to have a graphics tablet to go along with the HP ProBook 4540s (the one with OS-X on it) for photo editing, i.e. retouching.

The Bamboo comes at a price comparable to Apple's Magic Trackpad. The Bamboo, however, has a huge bonus over the Magic Trackpad, it comes with a stylus, which is really helpful for retouching photos.

The silver-ish design of the Bamboo nearly matches the ProBook's looks.

Hooking the thing up to the computer leads to instant functioning as tablet w/ a stylus. Don't stop here! Install the latest driver from Wacom, your tablet will now function as a touch-pad.

The interesting bit about the Bamboo is that it functions in two different modes.
  1. When using it with fingers (touch) it reacts relative to the input, just like expected from a touch pad.
  2. As soon as the stylus is used for input, the tablet reacts in absolute mode, i.e. the position of the stylus determines the position of the cursor on the screen.
Having used the Bamboo for a while and really enjoyed it when working on photos, I decided to also buy the Wacom Intuos, to pair up with my workstation. Although I have not yet done a lot with it, I love the eraser option on the far end of the stylus! Really cool when working on masks in GIMP.
The Intuos does not seem to work a priori at all. Installing the proper driver is mandatory. However, with the driver installed, an entirely new world for controlling a Hackintosh arises!

Saturday, March 1, 2014

Disable or Not Swap on Your M(H)ac(k)intosh

Why would you want to do that?! Well, simple, today, RAM does not cost a thing, 8GB or 16GB are plenty for most applications, and there still is the option to go to 32GB. Virtual memory, it seems, is not that important any longer.

Most of the recent Macintosh, or Hackintoshs respectively, have the operating system on an SSD, for quick boot-up times. I believe real Macintosh computers employ SSDs only nowadays, but I am not sure...
We all know, that the easiest way to wear down your SSD is, to use it as a swap (virtual memory) device.

Given that your computer is supplied with sufficient RAM for your tasks, you may want to try this:
http://wiki.summercode.com/how_to_disable_or_enable_swapping_in_mac_os_x
and disable swap all together.
Presently, with my most recent build (16GB), I am actually trying this.

Hackintosh computers usually employ a regular HDD for mass-storage (or scratch), next to the SSD boot drive. For those boxes, one may consider using the magnetic HDD for swapping. This is a bit more complicated, but still doable:
  • boot your Hackintosh into Single user mode using "-s" (no quotation marks)
  • mount your HDD, using something like (depending on your setup, disk1s2 is my HDD, mounted on the mount point /Volumes/HOME/):
    mount -t hfs /dev/disk1s2 /Volumes/HOME
  • now lets make a hidden "vm"-directory:
    mkdir /Volumes/HOME/.vm
  • link the new "vm" directory to the expected place:
    ln -s /var/vm /Volumes/HOME/.vm
    you may also link "/private" if you want:
    ln -s /private/var/vm /Volumes/HOME/.vm
  • for good measures it created empty files (probably not necessary):
    touch /Volumes/HOME/.vm/swapfile0
    and
    touch /Volumes/HOME/.vm/swapfile1since those were the files found first...
  • to enable swap, I entered:
    launchctl load -F /System/Library/LaunchDeamons/com.apple.dynamic_pager.plist
When you're done with that, you just want to make sure all data are written using the command sync. Now, just type reboot.

A from now, my system uses swap (virtual memory) on the magnetic disk, leaving the SSD alone.

Of course, running swap of the HDD might be possible w/o switching off swap in the first place. I have not tried this, but I am certain that (in Single User mode) creating the hidden directory first, copying the swapfiles to it, deleting the previous /var/vm location and finally linking the hidden directory to /var/vm will do the exact same thing.