ciplogic.com
Live with grace. Write superb software.

So if you follow up with Docker, you might have found out that the default storage that is provided with a normal Docker installation, is backed by the mighty aufs, created by the awesome Junjiro Okajima.

But out there there is another file system that is faster, with smaller footprint, etc. It's named OverlayFS, and was merged in the main kernel. Sounds to good to be true? Well read about it.

TL;DR Docker With OverlayFS on Ubuntu 14.04:

apt-get install linux-generic-lts-vivid linux-headers-generic-lts-vivid

Reboot

wget get.docker.com -O - | sh
service docker stop
echo 'DOCKER_OPTS="-s overlay"' >> /etc/default/docker
service docker start

Details

Now, this file system is available only from kernel version 3.18 and up. If you just installed Ubuntu 14.04, as of this date (10th of November, 2015), you should have 3.19 already installed. If you have an older existing Ubuntu 14.04 you need to update your kernel manually.

In case you upgraded by mistake your system from Wheezy, to the latest unstable version Stretch, you have several options:

1. Reinstall (recommended)

This is actually the recommended option, since the init scripts have changed across versions. Also it's pretty hard to guarantee that the same packages will be there.

2. Downgrade Your System

This option is a bit trickier, fortunately Jules from inspire.me wrote a pretty good article about it.  Note that the tutorial he wrote was to downgrade from Jessie to Wheezy. Since we want to skip Jessie as well, we need to use the oldstable (aka "wheezy" at the time of writing) instead stable. See https://www.debian.org/releases/ for the current Debian releases.

So since you want now to skip two versions, you need to have the file in /etc/apt/preferences with:

Package: *
Pin: release a=oldstable
Pin-Priority: 1001

A PHP programmer was begging on a street corner. With dirty clothing, extremely sad and distracted, was watching the ground. On the cardboard in front of him was written: "Help a poor PHP programmer".

From time to time, a Java or C# developer would give him something.

A Python programmer that happened to pass by, stopped, took the cardboard, wrote a few words, then left.

Something amazing happened. Ruby, Groovy, C# and Java programmers were stopping, reading what was written and giving plenty of money, some of them with tears in their eyes, crying with deep sorrow. A pretty large crowd gathered around him, so the PHP programmer raised his eyes. He read the cardboard, and cried with a shriek from the bottom of his lungs, lungs of a despaired man, from his truly unfortunate state. Tears started flowing over his cheeks, faced now with the truth revealed to his soul, when he read the words:

"Help a poor PHP programmer. I know good code exists, I just have never seen it."

A Perl programmer, extremely dirty, with his ripped clothing, and disheveled hair also passed trough the crowd, bumping into people. Unfortunately no one discovered the meaning of the senseless words he was muttering, so they let him be, to continue his painful existence.

Here's an update for the automatic updates, geared at CentOS/RHEL only.

Dumitru Ciobârcianu tells us that there is a package for CentOS that already does that, named yum-cron. Thus instead of editing files inside the /etc/cron.daily, you can get away with:

yum install yum-cron

This in turn will create two cron jobs, one daily to do the updates, and one weekly, that will also do cleanup such as:

# cat /etc/yum/yum-weekly.yum 
clean packages
clean expire-cache
ts run
exit

Furthermore it allows configuration for checking packages, and what not. So definitely on CentOS go with yum-cron, since it's the better alternative.

Thank you Dumitru!

On Debian/Ubuntu there is also a package named cron-apt, but that one by default will do only the update of the package definitions (apt-get update -y) and not the actual upgrade of the system.

I generally tend to have quite a bit of virtual machines running Linux. Some of them CentOS, some of them Ubuntu. Probably so do you. Some of them are started more often, some of them lay dormant quite a while, and then when you boot them up for whatever reason, e.g. to test the migration of your blog from apache to nginx, you need to apply whatever updates.

Super annoying, I know.

Thus, here's an easy tip. Just add a script in /etc/cron.daily to do the updates. e.g. /etc/cron.daily/update-my-system. For example I set:

apt-get update -y && apt-get upgrade -y

if it's Ubuntu/Debian, or

yum update -y

if it's CentOS/RHEL.

I do this also on all the development machines that I have a graphical interface, so I don't get that supper annoying dialog asking me for the updates.

You boot, it updates.

It stays up, it updates on a daily basis.

It's that simple. I know I wrote about it before. But it's important.

Update for CentOS

See here: http://blog.ciplogic.com/index.php/blog/104-linux-automatic-updates-on-centos

 

Disqus Comments

comments powered by Disqus

Germanium

The one to rule them all. The browsers that is.

SharpKnight

SharpKnight is an Android chess game.

MagicGroup

MagicGroup is an eclipse plugin.