When Docker.io eats up your disc space

If your Fedora system alerts you about Zero disc space, you may check your Docker installation.

Docker is a great virtualization platform for distributed applications. You can use it to have application containers to ship and deploy them, or use it locally to develop your applications. Cool stuff but it may hit you from the back under some circumstances. You probably won’t experience it if you are using Docker under MacOS or Windows because you need to run it in a VirtualBox anyway.

Some days ago Fedora alert my disc was full, and applications stopped to work properly. Usually a Fedora system can run with 5 to 15 Gigabytes disc space, I configured my system partition with 50 Gigabytes to have enough space for logs and cache files. Now it was full. Why? Later I figured out the reason: Docker’s large DevideMapper files eats up my disc space on the system partition.

Screenshot: boabab shows disc usage

Docker relied on aufs that is not supported in the Linux kernel used by RHEL/Fedora (and marked as deprecated in the Ubuntu kernel) but later Docker backend settled on a DeviceMapper implementation for Fedora, or any other Linux that doesn’t ship by default with aufs support. The DeviceMapper plugin stores the data in very big files (~100GB), by default on your system partition. Not a good place if you have limited size here.

A clean solution would be to create an own disc partition for Docker and mount it to /var/lib/docker/ or /var/lib/docker/devicemapper/. I’ve used a quick fix and copied the Docker files to my /home disc partition that is lot of bigger than my system partition. You can achieve it by:

Note: this worked on my Fedora 20 machine, using two different partitions for the system and home directories!

  1. get root: $ sudo su
  2. stop the Docker demon: # systemctl stop docker.service
  3. copy Docker files: # cp -R /var/lib/docker/ /home/_varlibdockerfiles
  4. backup original Docker files: # mv /var/lib/docker/ /var/lib/docker.backup
  5. add link to new Docker files: # ln -s /home/_varlibdockerfiles/ /var/lib/docker
  6. start Docker demon again: # systemctl start docker.service

Now you can test it by running one of your built Docker containers. You may run into an error like: Error response from daemon: Error running DeviceCreate (createSnapDevice) dm_task_run failed. That means you may have to repair the device mapper meta data:

  1. stop the Docker demon again: # systemctl stop docker.service
  2. # thin_check /home/_varlibdockerfiles/devicemapper/devicemapper/metadata
  3. if this do not show any errors, proceed with: # thin_check --clear-needs-check-flag /home/_varlibdockerfiles/devicemapper/devicemapper/metadata
  4. start Docker demon: # systemctl start docker.service

If this works and you don’t experience unexpected behaviour of your Docker containers, you could remove the backup of the Docker files from your system partition: # rm -Rf /var/lib/docker.backup

My system partition is now back to ~9GB disc usage :)

Other sources:

Wordpress import for Chyrp

Chyrp is a lightweight blogging engine, written in PHP, working with SQLite and MySQL. It is possible to create different types of posts, e.g. Text, Video, Photo, Link and Quote. It looks like a good open-source alternative for Tumblr.

I currently try out Chyrp, thinking about to replace my private Wordpress blog. The recent Chyrp version includes an option to import content from the Wordpress-XML export file. But it didn’t work for exports from Wordpress.com-Blogs and the default import creates only Text posts in Chyrp, regardless of the post type of the original Wordpress data. So I fixed it and added an additional chyrp module that enables the import of types posts. My Wordpress branch for Chyrp improves:

  • imports from wordpress.com is possible
  • tag import is fixed (only with enabled tag module)
  • category import was added (only with enabled category module)
  • import typed Wordpress posts (link, quote, video, image) to the right Chyrp feathers (link, quote, video, photo) if they are enabled

Unknown post types are still imported as text feather in Chryp, e.g. gallery posts in Wordpress. Currently it is not possible to import them as Photo posts in Chyrp because the photo feather only allows one image per post.

How to import content from Wordpress.com to Chyrp

  1. Go to your Wordpress.com blog dashboard and navigate to the Tools/Export option. Download your data from there as XML and safe it.
  2. In Chyrp you need to enable the module “Wordpress Post Types Importer” and the Link, Quote, Photo and Video feathers.
  3. In Chyrp you go to Manage/Import and:
    1. choose your Wordpress-XML export file as import data
    2. fill in the URL prefix that was used in to link media (images) in the Wordpress posts. For WP.com it probably is: http://{{yourblogname}}.files.wordpress.com/
  4. Wait for the success message.
  5. Check Manage/Posts to control the import.

That’s it.

rel=”source” might be not so awesome! We already have alternative options.

Today I’ve learned from The Cangelog news blog about Jeremy Keith’s proposal to add a relation between a project/document and its souce code by using rel="source" somewhere in the HTML markup. Sounds good, but it would only be a unspecific relation between a document or project or whatever and something related to some unspecific type of source code container :) I really miss the improved semantics here. And we already have options to describe it.

Keith wrote:

I got chatting to Aral about a markup pattern that’s become fairly prevalent since the rise of Github: linking to the source code for a website or project. You know, like when you see “fork me on Github” links. […] We were talking about how it would be nice to have some machine-readable way of explicitly marking up those kind of links, whether they’re in the head of the document, or visible in the body. Sounds like a job for the rel attribute, I thought. […] I’ve proposed rel=”source”.

The “fork me on Github” link has at least 3 different meanings:

  1. the website of a software project contains a relation to the public source code repository of the software
  2. the link points to a repository where the content of the webseite is managed, this link is the same on all pages of the website
  3. the link points to the related source of the currently shown page deep in the repository

A human can see the difference, a machine not. If we add code to markup to make the relation machine-readable, a rel="source" wouldn’t do the job. A machine really needs a very clear description about “X has a relation to Y”, the machine need to know about X, Y and the relation. A machine needs a object, a predicate and a subject to understand the fact.

Lack of the object

The brainstorming page about rel="source" at the Microformats wiki describe the use case as:

When an author links to a project’s (or document’s) source code (e.g. on GitHub, Google Code, etc.) a rel value of “source” could be used to explicitly define that relationship.

It already describes the problem: is it the source code of the (software) project or is it a link to the source code of the document (content of the webpage)? X (the object) is not defined here, a simple rel="source" do not imply entailment, there is no logical consequence. Machines would have to guess what the object is.

Lack of the subject and its type

While there is a discussion about the label on the brainstorming site, a machine only cares about the semantical meaning, “sfuzcfzcsz” could be the name of the property that relate a software project to it’s download archive. rel="source" don’t say anything about the subject or its type, it only describes that the related resource has to do something with source code.

  • Is it the source code in a zip/tar/xyz archive?
  • Is it a file containing uncompressed source code?
  • Is it a repository address you can checkout or clone from? Is it Git, Mercurial, SVN, …?
  • Is it a relation to the homepage of a code repository (e.g. most Github links)?
  • Is the link about a special version, branch, tag of the source code?

Where to put the relation in?

You may able to use rel="source" on a meta and anchor element in HTML. Please try to use it on a PNG image — e.g. a computer generated fractal — to describe a relation to the source code of the generating program. Good luck! There is no Microformat vocabulary to wrap it in. Leads to the next problem:

What about listings?

If you have a listing of software projects on one webpage, how can we set the correct relations. Using rel="source" multiple times on various links? A machine would only see multiple source relations on one HTML document because currently there is no proper vocabulary in MF1 and MF2 that you can use to describe the software project or web document, maybe h-item but according the spec “h-item is almost never used on its own.”

Already existing and working alternatives

According to a “rel usecase repository”, Keith writes:

The benefit of having one centralised for this is that you can see if someone else has had the same idea as you. Then you can come to agreement on which value to use, so that everyone’s using the same vocabulary instead of just making stuff up.

Good advice :) There are alternative options developed by the RDF and Microdata communities, developed months or years ago:

  • The DOAP project “create an XML/RDF vocabulary to describe software projects, and in particular open source projects.” The DOAP vocabulary provides properties like repository and more to describe relations to Repositories, Downloads, Wikis, Issue Lists and a lot of more stuff. You can add DOAP to your HTML via RDFa and Microdata.

  • The schema.org vocabulary provides concepts like CreativeWork, SoftwareApplication, Code and properties like codeRepository and downloadUrl, also useable in you HTML markup via RDFa and Microdata syntax.

  • Update (Feb 21): there is already a rel-vcs Microformat that is used and supported by various tools. But t is not listed in the “the official registry for rel values.” Of course it shares most of the problems with rel-source regarding semantics.

We don’t need to live in a religious Microformats-centric world with the Microformats wiki as your bible. :) And rel="source" would be probably not so awesome because:

  • it does not add enough semantics that machines can understand the correct fact
  • there are already alternatives that work

#CSSOff 2013: Markup Mayhem or Closed Design Disaster?

The CSSOff competion 2013 started today. And I got bitterly disappointed. And it seems I’m not the only one after I read the #cssof tweets. Some of the guys criticize mainly the design.

Me not. In my opinion it doesn’t matter if we find the design beautiful and eye candy. Everyone has different preferences. The design is some kind of poster and magazine style that has been (or is) trending recently. It looks close to a print product. This isn’t a problem because CSSOff is done to get challenged at a very high cutting edge level. Transferring this layout to the web keeping the document accessible and good structured, this is really a challenge and fun because we could try out all the new techstuff we usually can’t use in payed client projects.

I am disappointed because the sources of the competition are closed source and not accessible to everyone. And it may imply some legal problems, too (at least in some countries). One of the CSSOff rules is to build on open and standardized technologies like HTML, CSS and Javascript. But you need closed commercial software to work with the layout source: it’s a Photoshop file. Damn it! This is a problem.

PSD templates mostly suck, this too: The usage and layering in the PSD file contains all the “nice” stuff that is hated by developers, e.g. weak names for the layers (I can’t see if it uses layer groups as I don’t have Photoshop) and filter effects not rendered to raster graphics (at least as layer copy).

Dependence on closed commercial software: if you don’t own a copy of Photoshop you can’t access the PSD file format. The sources come with PNG as fallback but this is a joke. It is a flat image without any other informations. If you don’t have the correct version of Photoshop you could run into problems. If your PS version don’t support the right layer effects, you have a problem. If you use another software to open PSD files but that software lacks full PSD support, you simply can’t work with the sources. Check the difference between the fallback PNG (right) and the PSD file opened in Gimp (left):

CSSOff Closed Design Disaster

Other words needed what the problem is about?

The source archive don’t includes layout annotations and raw data: it only contains the PSD, the PNG fallback and a very small Readme file. The only useful information is about the used Google Webfonts. No annotations about used font sizes, weights and lineheights, no info about the grid, no raw/single/retina versions of the used images, no text file with the text blocks used in the layout, no info about used angles on rotations, nothing. Only the useless __MACOS meta folder so everyone can see that someone owns an Apple machine. Probably you really need Photoshop to get your hands on all this important facts. Some attenders filled the gap and provide info on used fonts, source images and texts.

The sources are not free (as in freedom): this is really a problem because the competition terms demand that all results have to be submitted under a Creative Commons CC-BY license. We would need also sources under a free license for that. Propably all images from the layout stay under copyrights and they are not released under a free license. There is no picture old enough that it could be under public domain. I don’t think that product images (barbie box, transformers bluray) are under CC-BY, same for the altered Abbey Road cover (barcode instead of cross-walk stripes) by the Beatles or the stock photographs. You only can get free usable results on free useable sources, and free as in freedom, not as in free beer. You can’t use everything that you can copy for free from web, at least not in a open competiton asking the attenders to illegaly claim other copyrights.

Probably there are some more critical issues with the layout resources but my points above are enough for now.

I wish everyone good luck with the competition. I would like to attend but I don’t have full access to the sources because I use Linux and don’t own a copy of Photoshop. This is sad because the layout is technically complex enough that it could have been a good play with all the nice cutting edge tech. But it is graphically not overcomplex, it could have been easily done with Inkscape and images really released under CC-BY.

Fairphone: ein fair und transparent produziertes Smartphone

… und das Fairphone ist nach Angaben der Hersteller fair zu allen: Menschen und Umwelt, sowohl auf Seite der Hersteller und den Menschen, die für die Herstellung oder deren Rohstoffe arbeiten, als auch für die Nutzer, die hier möglichst offene und nachvollziehbare Technologie geliefert bekommen.

Mit ungefähr 325 Euro ist es eigentlich auch absolut fair zum Geldbeutel, wenn man sich ansieht, was Apple oder Samsung für ihre aktuellen Modelle aufrufen, und da geben die wesentlich mehr Geräte in Auftrag als das Fairphone-Team.

Ich habe momentan noch ein funktionierendes Smartphone (HTC), aber dieser Eintrag ist gleichzeitig als Erinnerung gedacht, wenn ich mir doch ein neues anschaffen möchte, schon allein wegen der möglichen Dual-SIM-Option. Ansonsten ist hier auch ein Quad mit 16GB internen Speicher am laufen. Bis dahin gibt es sicher auch noch ein paar Leistungs- und Nutzertests zu diesem Gerät.

Dass sich das Team wirklich Gedanken macht, kann man sehr gut auf der Seite und auch im Blog nachvollziehen, denn auch Transparenz zu Rohstoffen, Lieferwegen und Produktionsfabriken steht auf der Agenda, also all das was man immer von den großen Herstellern fordert, was die aber angeblich nicht leisten und vollständig kontrollieren können:

Chemnitzer Linuxtage 2013 am Wochenende 16. & 17. März

Chemnitzer Linux-Tage 16./17. März 2013

Auch dieses Jahr möchte ich kurz auf die Chemnitzer Linuxtage hinweisen, die wieder ein volles Programm im Bereich Linux und (Free Libre) Open Source Software haben. Einige der Themen:

Neben weiteren Vorträgen gibt es noch Workshops zu Inkspace, LibreOffice, Python & Django, LaTeX, Rasperry Pi und mehr. Wer nicht direkt vor Ort sein kann, hat die Möglichkeit per Audio- oder Videostream teilzunehmen.

Artikel über RDFa im Screenguide #17: Semantischer Zucker für Webworker

Cover Screenguide #17

Im aktuellen Screenguide-Magazin #17 für Webprofessionals & Designer ist ein Einführungsartikel zu RDFa 1.1/Lite vom mir erschienen. Das Heft ist ab 18.3. in allen Bahnhofs- und Flughafenbuchhandlungen erhältlich, Abonnenten haben es evtl. sogar schon heute im Briefkasten.

Thematisch und konzeptionell kratzt der Artikel natürlich nur an der Oberfläche, wie sich das für Einführungsartikel gehört :) — die Anwendung von RDFa innerhalb von Webseiten und der Vorteil von semantischen Annotationen wird über ein einfaches Beispiel vermittelt. Ich hoffe, dass ist mir gelungen.

Zum Artikel gehören auch 3 recht ausführliche Codebeispiele, die ich als Gist bei Github hinterlegt habe. Diese Beispiele werde ich in den nächsten Tagen nochmal etwas ausführlicher kommentieren und um ein paar mehr Anwendungsfälle erweitern.

Ein kleiner Teil des Artikels kann in der Leseprobe von Ausgabe 17 des Screenguide-Magazins angelesen werden.

Rückmeldungen zu Fehlern und Fragen sind gerne gesehen und werden dann entsprechend hier als Updates vermerkt.

Der Hauptschwerpunkt der aktuellen Ausgabe ist Qualitätsmanagement im Bereich Webentwicklung.

Evaluate User Feedback!

> Many years ago now Google actually paid for a usability study for one of the features I was speccing (microdata) and it was absolutely fascinating to see how people’s actual performance was so divergent from their impressions. We’d ask them questions like “which would be simpler, this or this” and then we’d actually test them by having them use the options, and there was just no relationship between what people said they wanted, and what people were actually able to use.

> Often when people send feedback (not just authors, pretty much anyone who hasn’t been in the process for a long time starts this way) they send feedback along the lines of “I want to add feature X” or “I want feature X to be extended in manner Y”. But when we drill down, ask them “what problem are you trying to solve”, or “what’s your use case” (same question but phrased differently), we often find that either (a) they actually don’t have a real problem, they just thought that it would be a good idea, or (b) their solution wouldn’t actually solve their problem. Often we’re able to come up with much simpler solutions (or point to already-existing solutions), which is quite satisfying.

> Interview with Ian Hickson, HTML editor (html5 Doctor)

(Source: twitter.com)

#Leistungsschutzrecht auf Irisch

Iren und Deutsche scheinen sich ihr Drinkverhalten zu teilen, auch die Verleger und Zeitungsindustrie konsumieren wohl denselben Stoff. Derzeit möchte die NNI gerne Lizenzgebühren auf Links zu Seiten und Artikeln ihrer Klienten erheben.

> They were quite clear in their demands. They told Women’s Aid “a licence is required to link directly to an online article even without uploading any of the content directly onto your own website.” 2012: The year Irish newspapers tried to destroy the web (McGarr)

Laut McGarr Solicitors soll ein Link je nach Abnahmevolumen zwischen 27 und 50 Euro kosten. Und hier sind keine Links gemeint, die andere Ressourcen einbetten, z.B. über src="http://example.com/bild.jpg", sondern einfache Textlinks zu anderen Dokumenten im Internet, unabhängig vom Text des Links (also auch “Hintergünde bei XYZ” oder “mehr dort”).

Natürlich gibt es auch ein Statement der NNI zum Thema, in natürlich klar gestellt wird, dass Links in der Sichtweise der NNI eine Urheberrechtsverletzung (bzw. Copyright Infringement) darstellen, aber dass es hier nur um Lizenzen für kommerzielle Anbieter geht, privat dürfen Links ohne Gebühren gesetzt werden.

Leider ist das nur schwer zu trennen. Ist mein Techblog nun privat, weil ich kein Geld damit verdiene, oder ist es ein Teil meiner freien Entwicklertätigkeit (z.B. als Werbung für mich) und damit ein kommerzielles Angebot und lizenzpflichtig.

Zudem stehen die Einschätzungen kommerziell/privat (E1) und Urheberrechtsverletzung/keine Urh.-verletzung (E2) nicht in Verbindung wie auch die NNI zugibt:

> It is important, in fairness to us and our members, to specifically note here that the submission made on behalf of NNI to the Copyright Review Committee also expressly recognised that there is a distinction between the sending and receipt of links for personal use on the one hand and the sending and receipt of links for commercial purposes on the other (despite the fact that the same legal principles apply to both). Statement on Behalf of National Newspapers of Ireland (NNI)

Das bedeutet, wenn kommerzielle Anbieter in Zukunft aufgrund einer gesetzlichen bzw. richterlichen Einschätzung bezüglich “urheberrechtsverletzende” Links Gebühren zahlen müssen, dann gilt das eigentlich vor dem Gesetz auch für private Anwendungen, d.h. es sind auch Gebühren bei privater Verlinkung möglich. Und wenn die NNI bei ihrem Versprechen bleibt, nicht für private Links zu kassieren, kann das trotzdem jemand anderes tun. Die Büchse der Verlinkungsgebührenpandorra wäre geöffnet.

Wenn das wirklich Realität wird, dann können wir das Internet wirklich für tot erklären, denn Links sind die Killerapplikation des Web 1.0 bis 3.0, die alles erst möglich gemacht hat. Ohne Links als Teil einer freien Kommunikationskultur gibt es kein Internet!

Man wünschte sich wirklich, dass über Nacht alle Links zu Seiten irgendwelcher Verlagsangebote verschwinden würden. Keine Links zu Onlineangeboten von Zeitungen in Sozialen Netzwerken, privaten Seiten, Aggregatoren oder eben bei Suchmaschinen. Dann könnten alle Unterstützer der irischen NNI oder eben des deutschen Leistungsschutzrechtes in ihrem so geschaffenen Intranet untergehen. Würde im Besten Falle kein Außenstehender bemerken, denn ein Link zum Untergang wäre ohne Lizenzgebühr illegal :)

Was Tim Berners-Lee wohl zu diesem Thema sagen würde? Achso, das hat er ja schon, 1997, also vor ca. 16 Jahren:

> The ability to refer to a document (or a person or any thing else) is in general a fundamental right of free speech to the same extent that speech is free. Making the reference with a hypertext link is more efficient but changes nothing else. […] Users and information providers and lawyers have to share this convention. If they do not, people will be frightened to make links for fear of legal implications. […] Myth one: “A normal link is an incitement to copy the linked document in a way which infringes copyright” (TBL)

Insofern noch ein kleiner Lesebebefehl an alle Verleger, Politiker und Anwälte:

Software Wars: movie about how free software will save the world

> The average computer user is unaware there is a war for freedom going on that will determine the path of modern society. Software Wars is a movie about the battle for our right to share technology and ideas. This software will not be ‘owned’ by corporations like Microsoft, Apple, and Google, who are mostly impeding technological progress.Source: Software Wars @ indiegogo

> The main producer is Keith Curtis, a Seattle-based author and programmer who spent 11 years at Microsoft before being converted to the world of Linux and open-source software. The movie is based on a portion of Curtis’ book, “After the Software Wars,” but he’s working on the project with an extensive virtual team out of L.A. — Source: GeekWire

I already had Curtis’ book from 2009 on my list “20 Free Books on Linux, Open Source Software & Philosophy.”

I wondering if that movie is going to be a objective documentary about the subjects Free Libre Open Source Software (FLOSS) and proprietary systems. I guess it won’t be like that. But at least it could be a movie nice to watch, and it can be used in campaigns for free software projects and as an opposite to proprietary software campaigns that people usually watch every day at TV/commercial breaks.

So let us support the crowdfunding campaign of Software Wars.