<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Noyau d&#039;Olive</title>
	<atom:link href="http://noyaudolive.net/feed/" rel="self" type="application/rss+xml" />
	<link>http://noyaudolive.net</link>
	<description>Le blog d&#039;un chef de projet Python un peu geek, kitesurfer photographe et père de famille bien occupé…</description>
	<lastBuildDate>Wed, 30 May 2012 22:37:11 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>Le vrai clavier Mac sous Ubuntu</title>
		<link>http://noyaudolive.net/2012/05/30/le-vrai-clavier-mac-sous-ubuntu/</link>
		<comments>http://noyaudolive.net/2012/05/30/le-vrai-clavier-mac-sous-ubuntu/#comments</comments>
		<pubDate>Wed, 30 May 2012 22:32:19 +0000</pubDate>
		<dc:creator>Karmak23</dc:creator>
				<category><![CDATA[Informatique]]></category>
		<category><![CDATA[Libre Software]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://noyaudolive.net/?p=1067</guid>
		<description><![CDATA[J&#8217;ai enfin réussi à installer Ubuntu sur mon Macbook Air, après bon nombre de péripéties. Mais étrangement, le choix de clavier « Français (Macintosh) » ne permet pas de taper certains caractères comme l&#8217;éllipse (…). Pourtant le caractère apparaît dans la carte du clavier sur la combinaison Shift-AltDroite-v, mais cette combinaison ne produit rien. Par ailleurs sous...  <a href="http://noyaudolive.net/2012/05/30/le-vrai-clavier-mac-sous-ubuntu/" class="more-link" title="Read Le vrai clavier Mac sous Ubuntu">Read more &#187;</a>]]></description>
			<content:encoded><![CDATA[<p>J&#8217;ai enfin réussi à installer Ubuntu sur mon Macbook Air, après bon nombre de péripéties. Mais étrangement, le choix de clavier « Français (Macintosh) » ne permet pas de taper certains caractères comme l&#8217;éllipse (…). Pourtant le caractère apparaît dans la carte du clavier sur la combinaison <code>Shift-AltDroite-v</code>, mais cette combinaison ne produit rien. Par ailleurs sous <code>OS X</code> l&#8217;éllipse s&#8217;obtient avec <code>AltDroite-;</code>. Bien que tous les caractères communs et la plupart de ceux du 3e niveau (comme <code>\</code> et <code>|</code>) soient au même endroit et aux mêmes combinaisons sous <code>Ubuntu</code> et sous <code>OS X</code>, quelques-uns divergent (je ne me rappelle plus exactement, maintenant que j&#8217;ai résolu le problème).</p>

<p>Bon en fait, voilà la solution : <code>setxkbmap -layout fr -model macintosh</code>. Cette commande <em>semble</em> faire la même chose que le choix <code>Français (Macintosh)</code>, mais vraissemblablement ce n&#8217;est pas le cas. Avec <code>setxkbmap</code>, j&#8217;ai retrouvé <strong>strictement</strong> la même carte de clavier que sous <code>OS X</code>, ce qui est exactement ce que je voulais. Je peux même taper des ellipses avec <code>Alt-;</code>. Maintenant, va savoir ce que fait le choix proposé par l&#8217;installateur <code>Ubuntu</code>… Je ne suis pas allé voir.</p>

<p>Merci <a href="http://askubuntu.com/questions/29603/how-do-i-clear-xmodmap-settings">AskUbuntu</a> et <a href="http://askubuntu.com/questions/131044/how-can-i-input-punctuation-marks-like-ellipsis">AskUbuntu</a> ! Et pour mémoire, une <a href="http://askubuntu.com/questions/131044/how-can-i-input-punctuation-marks-like-ellipsis">table des compositions possibles</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://noyaudolive.net/2012/05/30/le-vrai-clavier-mac-sous-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>nullmailer recipe for LXC containers and non-critical machines on the local network</title>
		<link>http://noyaudolive.net/2012/05/23/nullmailer-recipe-for-lxc-containers-and-non-critical-machines-on-the-local-network/</link>
		<comments>http://noyaudolive.net/2012/05/23/nullmailer-recipe-for-lxc-containers-and-non-critical-machines-on-the-local-network/#comments</comments>
		<pubDate>Wed, 23 May 2012 14:58:06 +0000</pubDate>
		<dc:creator>Karmak23</dc:creator>
				<category><![CDATA[Boulot]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Informatique]]></category>
		<category><![CDATA[Journal]]></category>
		<category><![CDATA[Libre Software]]></category>
		<category><![CDATA[Licorn® servers]]></category>
		<category><![CDATA[LXC]]></category>
		<category><![CDATA[System administration]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://noyaudolive.net/?p=1059</guid>
		<description><![CDATA[This recipe takes place on Ubuntu 12.04 LTS, but it works also on Ubuntu 10.04.x LTS. Just install the nullmailer package, and bsd-mailx too (see later why). Apt-get will ask you some questions; you can answer whatever you want, here are what they do, with the real underlying files: In case you want some local...  <a href="http://noyaudolive.net/2012/05/23/nullmailer-recipe-for-lxc-containers-and-non-critical-machines-on-the-local-network/" class="more-link" title="Read nullmailer recipe for LXC containers and non-critical machines on the local network">Read more &#187;</a>]]></description>
			<content:encoded><![CDATA[<p>This recipe takes place on <code>Ubuntu 12.04 LTS</code>, but it works also on <code>Ubuntu 10.04.x LTS</code>. Just install the <code>nullmailer</code> package, and <code>bsd-mailx</code> too (see later why). <code>Apt-get</code> will ask you some questions; you can answer whatever you want, here are what they do, with the real underlying files:</p>

<ul>
<li>In case you want some local daemons to send you mail, edit <code>/etc/nullmailer/adminaddr</code> and fill it with a <em>real</em> address, eg. <code>root@dev.licorn.org</code>, but not <code>root@dev.licorn.local</code>: this domain name is not registered, thus not considered valid. This file will be used <em>only</em> when a daemon sends mail with no sender at all (eg. the &laquo;&nbsp;&nbsp;&raquo; (empty) address).</li>
<li>edit <code>/etc/nullmailer/remotes</code> and fill it with the IP address or FQDN of you relay. On my LXCs, this is just <code>10.0.3.1</code> (the <code>lxcbr0</code> address on the host). On this machine, <code>postfix</code> is listening and will forward mail to the outside.</li>
<li><p>the best part for the end: edit <code>/etc/mailname</code> and be sure there is a valid FQDN inside. <code>localhost</code> will <em>NOT</em> work at all, and <code>nullmailer</code> will produce strange errors (even if <code>adminaddr</code> is correctly set). In my LXC, this is simply <code>dev.licorn.org</code> and so on. If it&#8217;s not valid, nullmailer will complain:</p>

<p>mail olive@licorn.org
Subject: test5
test
Cc: 
nullmailer-queue: Envelope sender address is invalid.
nullmailer-inject: nullmailer-queue failed.
Can&#8217;t send mail: sendmail process failed with error code 1</p></li>
</ul>

<p>And the &laquo;&nbsp;why <code>bsd-mailx</code>?&nbsp;&raquo; answer: if you install the <code>mailutils</code> package (the default Debian/Ubuntu suggestion), not only will it install <code>guile</code>, <code>mysql-common</code> and other totally useless dependancies on your system, but also will it never display the <code>nullmailer-queue</code> error to you. As no error is reported in <code>/var/log/mail.*</code>, you won&#8217;t notice it and will search forever (google is not my friend at all when searching &laquo;&nbsp;<code>nullmailer-queue: Envelope sender address is invalid.</code>&nbsp;&raquo; ). <code>mailutils</code>, you are definitely banned from my machines!</p>
]]></content:encoded>
			<wfw:commentRss>http://noyaudolive.net/2012/05/23/nullmailer-recipe-for-lxc-containers-and-non-critical-machines-on-the-local-network/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Stylebot: the perfect companion for Adblock</title>
		<link>http://noyaudolive.net/2012/05/18/stylebot-the-perfect-companion-for-adblock/</link>
		<comments>http://noyaudolive.net/2012/05/18/stylebot-the-perfect-companion-for-adblock/#comments</comments>
		<pubDate>Fri, 18 May 2012 09:51:35 +0000</pubDate>
		<dc:creator>Karmak23</dc:creator>
				<category><![CDATA[Informatique]]></category>
		<category><![CDATA[Journal]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://noyaudolive.net/?p=1054</guid>
		<description><![CDATA[Stylebot is really neat. If you want to browse “ ad-free ” it&#8217;s the perfect companion for Adblock. When hiding an ad is not possible because it comes from the original site you&#8217;re viewing, and ad images names have nothing special that helps blocking them, just use Stylebot to hide the div they are contained in, with...  <a href="http://noyaudolive.net/2012/05/18/stylebot-the-perfect-companion-for-adblock/" class="more-link" title="Read Stylebot: the perfect companion for Adblock">Read more &#187;</a>]]></description>
			<content:encoded><![CDATA[<p><a href="https://chrome.google.com/webstore/detail/oiaejidbmkiecgbjeifoejpgmdaleoha">Stylebot</a> is really neat. If you want to browse “ ad-free ” it&#8217;s the perfect companion for Adblock. When hiding an ad is not possible because it comes from the original site you&#8217;re viewing, and ad images names have nothing special that helps blocking them, just use <code>Stylebot</code> to hide the <code>div</code> they are contained in, with only your mouse! The selection tool does a great job, it&#8217;s really easy to make you world “ ad-free ”.</p>

<p>In two words, it helps you edit the CSS of the page you&#8217;re on, and apply the custom CSS on top of the site&#8217;s one. It&#8217;s “ custom CSS in a nutshell ”, made very easy and always available.</p>
]]></content:encoded>
			<wfw:commentRss>http://noyaudolive.net/2012/05/18/stylebot-the-perfect-companion-for-adblock/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Listen to iPhone music on my Ubuntu desktop</title>
		<link>http://noyaudolive.net/2012/05/13/listen-to-iphone-music-on-my-ubuntu-desktop/</link>
		<comments>http://noyaudolive.net/2012/05/13/listen-to-iphone-music-on-my-ubuntu-desktop/#comments</comments>
		<pubDate>Sun, 13 May 2012 16:45:45 +0000</pubDate>
		<dc:creator>Karmak23</dc:creator>
				<category><![CDATA[Informatique]]></category>
		<category><![CDATA[Libre Software]]></category>
		<category><![CDATA[System administration]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://noyaudolive.net/?p=1048</guid>
		<description><![CDATA[I followed the answer to this A2DP-related question on askubuntu.com, and it worked flawlessly on my Ubuntu 12.04. To keep the thing summarized, I did: edit /etc/bluetooth/audio.conf to add Enable=Source in the [General] section, and AutoConnect=true for my personnal convenience, sudo service bluetooth restart, eventually unpair/re-pair the computer/iPhone if they was previously paired, pactl list...  <a href="http://noyaudolive.net/2012/05/13/listen-to-iphone-music-on-my-ubuntu-desktop/" class="more-link" title="Read Listen to iPhone music on my Ubuntu desktop">Read more &#187;</a>]]></description>
			<content:encoded><![CDATA[<p>I followed <a href="http://askubuntu.com/questions/2573/can-i-use-my-computer-as-an-a2dp-receiver">the answer to this A2DP-related question on askubuntu.com</a>, and it worked flawlessly on my Ubuntu 12.04. To keep the thing summarized, I did:</p>

<ul>
<li>edit <code>/etc/bluetooth/audio.conf</code> to add <code>Enable=Source</code> in the <code>[General]</code> section, and <code>AutoConnect=true</code> for my personnal convenience,</li>
<li><code>sudo service bluetooth restart</code>,</li>
<li>eventually unpair/re-pair the computer/iPhone if they was previously paired,</li>
<li><code>pactl list sinks</code> to get the <strong>name</strong> of my ALSA output,</li>
<li><code>pactl list sources</code> to get the <strong>name</strong> of the audio source on the iPhone,</li>
<li>summoned the final magic with the command <code>pactl load-module module-loopback source=bluez_source.F8_1E_DF_09_F8_0D sink=alsa_output.pci-0000_00_08.0.analog-stereo</code></li>
</ul>

<p>And now my iPhone music plays on my computer speaker. Which is not better than the iPhone one. But I learned something about <code>PulseAudio</code> and bluetooth on Linux.</p>

<p>Next round — the real thing I was looking to achieve in the first place — is how to use my computer as a bluetooth <strong>phone</strong> headset, e.g I want to answer calls on the computer, hear the caller on the desktop speakers and speak via the webcam microphone. The only road seems to go via <a href="nohands.sf.net">nohands</a>, but <a href="https://launchpad.net/~sebastian-ruehl/+archive/nohands">the last compiled package for Ubuntu</a> is for Natty and doesn&#8217;t install on 12.04 (it wants <code>libaudiofile0</code> instead of the current <code>libaudiofile1</code>). As I have more important things to do, I will not backport it today <img src='http://noyaudolive.net/wp-content/plugins/tango-smilies/tango/face-wink.png' alt=';-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://noyaudolive.net/2012/05/13/listen-to-iphone-music-on-my-ubuntu-desktop/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>LXC and macvlan, host to guest connection</title>
		<link>http://noyaudolive.net/2012/05/09/lxc-and-macvlan-host-to-guest-connection/</link>
		<comments>http://noyaudolive.net/2012/05/09/lxc-and-macvlan-host-to-guest-connection/#comments</comments>
		<pubDate>Wed, 09 May 2012 16:45:06 +0000</pubDate>
		<dc:creator>Karmak23</dc:creator>
				<category><![CDATA[Boulot]]></category>
		<category><![CDATA[Informatique]]></category>
		<category><![CDATA[Journal]]></category>
		<category><![CDATA[Libre Software]]></category>
		<category><![CDATA[Licorn® servers]]></category>
		<category><![CDATA[LXC]]></category>
		<category><![CDATA[System administration]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://noyaudolive.net/?p=1044</guid>
		<description><![CDATA[When you use the macvlan driver with LXC guests, they can communicate with each other with real ease. Great! But in the default setup, the host won&#8217;t be able to communicate with the guests at all. Strangely enough, other machines on your LAN can communicate with the guests. All persons you ask will say the...  <a href="http://noyaudolive.net/2012/05/09/lxc-and-macvlan-host-to-guest-connection/" class="more-link" title="Read LXC and macvlan, host to guest connection">Read more &#187;</a>]]></description>
			<content:encoded><![CDATA[<p>When you use the <code>macvlan</code> driver with LXC guests, they can communicate with each other with real ease. Great!</p>

<p>But in the default setup, the host won&#8217;t be able to communicate with the guests at all. Strangely enough, other machines on your LAN can communicate with the guests. All persons you ask will <a href="http://www.mail-archive.com/lxc-users@lists.sourceforge.net/msg00125.html">say the same thing to you</a>: you have to create a <code>macvlan</code> interface on the host too, for it to be integrated with the bridge. Some <a href="http://jinntech.blogspot.fr/2011/04/lxc-interface-bonding-vlans-macvlan-and.html">make it rather complicated</a>. Me, less. On Ubuntu 12.04 LTS, just edit <code>/etc/network/interfaces</code>, and add:</p>

<pre><code># you should already have an entry for eth0, I will not recopy it here.

auto macvlan0
iface macvlan0 inet dhcp
    # as eth0 and macvlan0 are on the same LAN, we must drop default route and LAN route
    # from eth0 configuration to avoid conflicts (this just slooooow down things).
    pre-up route del default
    # NOTE: adapt this line to your LAN address and netmask 
    pre-up route del -net 192.168.111.0 netmask 255.255.255.0
    pre-up ip link add link eth0 name macvlan0 type macvlan mode bridge
</code></pre>

<p>And then, <code>sudo ifup macvlan0</code> if you don&#8217;t want to reboot. You can now ping your guests, provided they all have a network entry like this:</p>

<pre><code>lxc.network.type=macvlan
lxc.network.macvlan.mode=bridge
lxc.network.link=eth0
lxc.network.flags=up
lxc.network.hwaddr = 00:16:xx:xx:xx:xx
</code></pre>

<p>Happy pinging, and other sort of network things <img src='http://noyaudolive.net/wp-content/plugins/tango-smilies/tango/face-wink.png' alt=';-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://noyaudolive.net/2012/05/09/lxc-and-macvlan-host-to-guest-connection/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Strange things will happen&#8230;</title>
		<link>http://noyaudolive.net/2012/04/12/strange-things-will-happen/</link>
		<comments>http://noyaudolive.net/2012/04/12/strange-things-will-happen/#comments</comments>
		<pubDate>Thu, 12 Apr 2012 16:56:54 +0000</pubDate>
		<dc:creator>Karmak23</dc:creator>
				<category><![CDATA[Libre Software]]></category>
		<category><![CDATA[Licorn® servers]]></category>
		<category><![CDATA[System administration]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://noyaudolive.net/?p=1040</guid>
		<description><![CDATA[During a dist-upgrade on my development machine (Ubuntu Precise Beta), I got: a booted Ubuntu machine with no X (it starts, then shutdown a few seconds after) a X-in-debug-mode which doesn&#8217;t start either (baaaaad!) I checked /var/log/lightdm/x-0-greeter.log just in case and found: ** (process:21707): WARNING **: Error reading existing Xauthority: Error opening file: Permission denied...  <a href="http://noyaudolive.net/2012/04/12/strange-things-will-happen/" class="more-link" title="Read Strange things will happen&#8230;">Read more &#187;</a>]]></description>
			<content:encoded><![CDATA[<p>During a dist-upgrade on my development machine (Ubuntu Precise Beta), I got:</p>

<ul>
<li>a booted Ubuntu machine with no X (it starts, then shutdown a few seconds after)</li>
<li>a X-in-debug-mode which doesn&#8217;t start either (baaaaad!)</li>
</ul>

<p>I checked <code>/var/log/lightdm/x-0-greeter.log</code> just in case and found:</p>

<pre><code>** (process:21707): WARNING **: Error reading existing Xauthority: Error opening file: Permission denied
Error writing X authority: Error opening file '/var/lib/lightdm/.Xauthority': Permission denied
</code></pre>

<p>Then the solution was:</p>

<pre><code>sudo -s
cd /
setfacl -b .
chown root:root .
chmod 755 .
</code></pre>

<p>And don&#8217;t ask me why <code>/</code> suddently got an ACL owned by me (the UID 1000 account), I don&#8217;t know! Don&#8217;t ask me why any other directory didn&#8217;t get this ACL too, I still don&#8217;t know!.</p>

<p>It might be related to Licorn® somewhere, but I can&#8217;t seem to find how: Licorn® touches directories and applies ACLs only under <code>/home</code>.</p>

<p>Anyway, problem solved. Not an Ubuntu bug <img src='http://noyaudolive.net/wp-content/plugins/tango-smilies/tango/face-wink.png' alt=';-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://noyaudolive.net/2012/04/12/strange-things-will-happen/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>About inodes number, inode size and reserved space for superuser on ext4</title>
		<link>http://noyaudolive.net/2012/04/02/about-inodes-and-inode-size-on-ext4/</link>
		<comments>http://noyaudolive.net/2012/04/02/about-inodes-and-inode-size-on-ext4/#comments</comments>
		<pubDate>Mon, 02 Apr 2012 21:06:31 +0000</pubDate>
		<dc:creator>Karmak23</dc:creator>
				<category><![CDATA[Informatique]]></category>
		<category><![CDATA[Libre Software]]></category>
		<category><![CDATA[Licorn® servers]]></category>
		<category><![CDATA[System administration]]></category>

		<guid isPermaLink="false">http://noyaudolive.net/?p=1031</guid>
		<description><![CDATA[I recently had to create an ext4 filesystem on a 4Tb volume. Guess what? inodes have a non-negligible size: mkfs.ext4 /dev/sdc1; df -h Sys. fich. Taille Util. Dispo Uti% Monté sur /dev/sdc1 3,7T 56G 3,4T 2% /media/Save_Leto_4To The filesystem is completely empty. 56G occupied seems quite big, but only 3,4T free means 300G are purely...  <a href="http://noyaudolive.net/2012/04/02/about-inodes-and-inode-size-on-ext4/" class="more-link" title="Read About inodes number, inode size and reserved space for superuser on ext4">Read more &#187;</a>]]></description>
			<content:encoded><![CDATA[<p>I recently had to create an <code>ext4</code> filesystem on a 4Tb volume. Guess what? inodes have a non-negligible size:</p>

<pre><code>mkfs.ext4 /dev/sdc1; df -h
Sys. fich.     Taille Util. Dispo Uti% Monté sur
/dev/sdc1        3,7T   56G  3,4T   2% /media/Save_Leto_4To
</code></pre>

<p>The filesystem is completely empty. 56G occupied seems quite big, but only 3,4T free means 300G are purely wasted!! This is not good at all. Inodes and reserved space for the superuser seem to be the culprits:</p>

<pre><code>df -hi
Sys. fich.     Inodes IUtil. ILibre IUti% Monté sur
/dev/sda1        6,6M   387K   6,2M    6% /
/dev/md0         233M   3,4M   230M    2% /home
/dev/sdc1        233M     11   233M    1% /media/Save_Leto_4To
</code></pre>

<p>First, I guess that 233M inodes is a bit too much, to backup &lt; 5M files (387K + 3,4M).</p>

<p>Second, counting space on <code>/home/</code> (device <code>/dev/md0</code>), I found that the <code>reserved space for superuser</code> (5% on this volume, thus approx 190Gb) could make <code>df</code> results wrong.</p>

<p>To sum up, rounded(rounded(190Gb) + rounded(56G) ) ~~ 300Gb wasted.</p>

<p>Then I tried to narrow down the space used by the inodes and give <strong>0% to the superuser</strong> — I already <em>am</em> the superuser, and enough files in <code>/home/</code> belong to <code>root</code> already:</p>

<pre><code>mkfs.ext4 -m 0 -N 50000000 /dev/sdc1; df -h
Sys. fich.     Taille Util. Dispo Uti% Monté sur
/dev/sdc1        3,7T   12G  3,7T   1% /media/Save_Leto_4To
</code></pre>

<p>That&#039;s better, but we can do more:</p>

<pre><code>mkfs.ext4 -m 0 -N 25000000 /dev/sdc1; df -h
Sys. fich.     Taille Util. Dispo Uti% Monté sur
/dev/sdc1        3,7T  6,2G  3,7T   1% /media/Save_Leto_4To
</code></pre>

<p>Finally, 10M inodes is enough room for the future on this volume:</p>

<pre><code>mkfs.ext4 -m 0 -N 10000000 /dev/sdc1; df -h
Sys. fich.     Taille Util. Dispo Uti% Monté sur
/dev/sdc1        3,7T  2,6G  3,7T   1% /media/Save_Leto_4To
</code></pre>

<p>And then I&#039;m moving all the data from <code>/home</code> back and forth to reformat <code>/dev/md0</code> with the same parameters. Moving 3,4Tb of data takes time…</p>

<p>For the sake of notes, this is on Ubuntu Precise Beta, as of last night updates:</p>

<pre><code>uname -a; lsb_release -a
Linux Leto 3.2.0-21-generic #34-Ubuntu SMP Fri Mar 30 04:25:35 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu precise (development branch)
Release:        12.04
Codename:       precise
</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://noyaudolive.net/2012/04/02/about-inodes-and-inode-size-on-ext4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>La leçon du jour</title>
		<link>http://noyaudolive.net/2012/04/01/la-lecon-du-jour/</link>
		<comments>http://noyaudolive.net/2012/04/01/la-lecon-du-jour/#comments</comments>
		<pubDate>Sun, 01 Apr 2012 04:54:08 +0000</pubDate>
		<dc:creator>Karmak23</dc:creator>
				<category><![CDATA[Informatique]]></category>
		<category><![CDATA[Journal]]></category>
		<category><![CDATA[Licorn® servers]]></category>
		<category><![CDATA[System administration]]></category>

		<guid isPermaLink="false">http://noyaudolive.net/?p=1023</guid>
		<description><![CDATA[« C&#8217;est plus important d&#8217;avoir une sauvegarde complète que d&#8217;avoir un RAID à tolérance de panne ». C&#8217;est le fruit de mon expérience du week-end. La dernière sauvegarde que j&#8217;ai est incomplète car : j&#8217;avais configuré des exclusions ; des données considérées comme « moins importantes », mais n&#8217;empêche qu&#8217;une fois perdues, ça craint. Par exemple ma bibliothèque musicale au format...  <a href="http://noyaudolive.net/2012/04/01/la-lecon-du-jour/" class="more-link" title="Read La leçon du jour">Read more &#187;</a>]]></description>
			<content:encoded><![CDATA[<p>« <strong>C&#8217;est plus important d&#8217;avoir une sauvegarde complète que d&#8217;avoir un RAID à tolérance de panne</strong> ». C&#8217;est le fruit de mon expérience du week-end. La dernière sauvegarde que j&#8217;ai est incomplète car :</p>

<ul>
<li>j&#8217;avais configuré des exclusions ; des données considérées comme « moins importantes », mais n&#8217;empêche qu&#8217;une fois perdues, ça craint. Par exemple ma bibliothèque musicale au format lossy. J&#8217;ai toujours la bibliothèque au format lossless, mais il va falloir régénérer la version lossy, ça va prendre un certain temps, et je ne suis pas sûr de pouvoir conserver les notations qui étaient originellement sur la version lossy.</li>
<li>le volume de sauvegarde était devenu trop petit dernièrement et je n&#8217;ai pas eu d&#8217;alertes. J&#8217;ai donc perdu les 2 ou 3 répertoires récents de photos et vidéos à importer (ça doit être un mois maximum, mais dedans il y avait toutes les photos durant mon congé parental…). Ça craint déjà plus, même si je n&#8217;ai perdu aucune photo/vidéo déjà importées : celles-ci sont toujours en deux exemplaires, sur d&#8217;autres volumes.</li>
</ul>

<p>Donc la conclusion : je vais nettoyer toutes les données que je possède, afin d&#8217;avoir exactement le même espace « utile » que l&#8217;espace de sauvegarde disponible. Comme ça, <strong>tout sera sauvegardé</strong> sans distinction, et je n&#8217;aurai plus de questions à me poser en cas de crash.</p>

<h2>Pour mémoire</h2>

<p>Le volume RAID5 <code>md</code> a pété après une mise à jour système qui a régénéré l&#8217;image <code>initramfs</code>. Il m&#8217;a embetté avec un « <em>do you want to boot degraded array? [y/N]</em> » auquel je n&#8217;ai pas pu répondre, et par la suite toute mes tentatives de reconstruire le volume ont échoué lamentablement. Les enregistrement RAID sur les disques physiques semblaient corrompus : chaque disque listait plusieurs autres, parfois en double, mais aucun ne listait complètement tous les disques du volume, et tous indiquaient qu&#8217;au moins un disque listé était injoignable. <code>mdadm --assemble … /dev/sd[bcde]1</code> pétait sur <code>/dev/sdb1: device busy</code> (même après un <code>--stop</code>). J&#8217;ai donc dû finir par reconstruire le volume complètement et j&#8217;ai donc perdu tout son contenu.</p>

<p>Je me suis dis que quitte à devoir tout perdre d&#8217;un coup à cause d&#8217;un RAID instable (n&#8217;ayant pas trouvé la cause, le problème peut se reproduire n&#8217;importe quand et je m&#8217;y attends…), j&#8217;allais utiliser un RAID0 pour récupérer toute la place disponible, et en faire une sauvegarde intégrale pour ne pas me retrouver de nouveau dans cette situation un jour.</p>
]]></content:encoded>
			<wfw:commentRss>http://noyaudolive.net/2012/04/01/la-lecon-du-jour/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Activate unattended-upgrades on Ubuntu</title>
		<link>http://noyaudolive.net/2012/03/25/activate-unattended-upgrades-on-ubuntu/</link>
		<comments>http://noyaudolive.net/2012/03/25/activate-unattended-upgrades-on-ubuntu/#comments</comments>
		<pubDate>Sun, 25 Mar 2012 01:42:45 +0000</pubDate>
		<dc:creator>Karmak23</dc:creator>
				<category><![CDATA[Boulot]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Informatique]]></category>
		<category><![CDATA[Journal]]></category>
		<category><![CDATA[Libre Software]]></category>
		<category><![CDATA[Licorn® servers]]></category>
		<category><![CDATA[System administration]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://noyaudolive.net/?p=1021</guid>
		<description><![CDATA[On various Ubuntu versions, unattended-upgrades is not enabled when you install it. Just edit /etc/apt/apt.conf.d and fill it with the following content: APT::Periodic::Enable "1"; APT::Periodic::Update-Package-Lists "1"; APT::Periodic::Download-Upgradeable-Packages "1"; APT::Periodic::AutocleanInterval "30"; APT::Periodic::Unattended-Upgrade "1"; The directives are self-explanatory, but you can find more explanations in the file /etc/cron.daily/apt.]]></description>
			<content:encoded><![CDATA[<p>On various <code>Ubuntu</code> versions, <code>unattended-upgrades</code> is not enabled when you install it. Just edit <code>/etc/apt/apt.conf.d</code> and fill it with the following content:</p>

<pre><code>APT::Periodic::Enable "1";
APT::Periodic::Update-Package-Lists "1";
APT::Periodic::Download-Upgradeable-Packages "1";
APT::Periodic::AutocleanInterval "30";
APT::Periodic::Unattended-Upgrade "1";
</code></pre>

<p>The directives are self-explanatory, but you can find more explanations in the file <code>/etc/cron.daily/apt</code>.</p>
]]></content:encoded>
			<wfw:commentRss>http://noyaudolive.net/2012/03/25/activate-unattended-upgrades-on-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Et un serveur dédié pour la deux…</title>
		<link>http://noyaudolive.net/2012/03/24/et-un-serveur-dedie-pour-la-17/</link>
		<comments>http://noyaudolive.net/2012/03/24/et-un-serveur-dedie-pour-la-17/#comments</comments>
		<pubDate>Sat, 24 Mar 2012 07:24:48 +0000</pubDate>
		<dc:creator>Karmak23</dc:creator>
				<category><![CDATA[Boulot]]></category>
		<category><![CDATA[Informatique]]></category>
		<category><![CDATA[Journal]]></category>
		<category><![CDATA[Libre Software]]></category>
		<category><![CDATA[Licorn® servers]]></category>
		<category><![CDATA[System administration]]></category>

		<guid isPermaLink="false">http://noyaudolive.net/?p=1012</guid>
		<description><![CDATA[Ça y est, enfin je me dote d&#8217;un serveur dédié chez OVH pour héberger ce que je veux et être enfin indépendant de ma ligne internet lente et instable. Les bons plans KIMSUFI sont vraiment des bons plans ! Pas de swap sur les serveurs dédiés OVH / KIMSUFI ? Curieusement mon serveur a été livré sans...  <a href="http://noyaudolive.net/2012/03/24/et-un-serveur-dedie-pour-la-17/" class="more-link" title="Read Et un serveur dédié pour la deux…">Read more &#187;</a>]]></description>
			<content:encoded><![CDATA[<p>Ça y est, enfin je me dote d&#8217;un serveur dédié chez OVH pour héberger ce que je veux et être enfin indépendant de ma ligne internet lente et instable. Les <a href="http://www.kimsufi.com/fr/bons_plans/index.xml">bons plans KIMSUFI</a> sont vraiment des bons plans !</p>

<h2>Pas de swap sur les serveurs dédiés OVH / KIMSUFI ?</h2>

<p>Curieusement mon serveur a été livré sans <code>swap</code>. En fait il en a, mais la partition ne mesure que 512Mo, ce qui est un peu petit pour une machine équipée de 4Go de RAM.</p>

<p>Pour la retailler :</p>

<pre><code>ssh root@monserveur
umount /home
fsck -fC /dev/sda2
resize2fs /dev/sda2 630G
fsck -fC /dev/sda2
cfdisk /dev/sda
</code></pre>

<p>Là je détruis les deux dernières partitions puis je recrée <code>sda2</code> plus petite que ce qu&#8217;elle n&#8217;est, ainsi que <code>sda2</code> à laquelle je donne un type <code>82</code> (Linux Swap). <code>cfdisk</code> indique :</p>

<pre><code>Table de partitions écrite, mais échec de la relecture. Exécuter partprobe(8), kpartx(8) ou redémarrer pour mettre à jour la table.
</code></pre>

<p>Puis on termine l&#8217;opération :</p>

<pre><code>partprobe
fsck -fC /dev/sda2
resize2fs /dev/sda2
fsck -fC /dev/sda2
mount /home
mkswap /dev/sda3
swapon /dev/sda3
vim /etc/fstab      # pour activer définitivement /dev/sda3
</code></pre>

<h2>Considérations de sécurité</h2>

<p>Ça me semble hautement dangereux de permettre l&#8217;accès via mots de passe par <code>SSH</code> à notre époque, même si les mots de passe sont bons. J&#8217;ai donc <code>ssh-copy-id root@monserveur</code> — c&#8217;est bon de pouvoir se logger en <code>root</code> quand on n&#8217;a que des comptes LDAP ou quand le <code>/home</code> est démonté / en panne, puis j&#8217;ai ajouté la ligne <code>PasswordAuthentication no</code> dans <code>/etc/ssh/sshd_config</code>.</p>
]]></content:encoded>
			<wfw:commentRss>http://noyaudolive.net/2012/03/24/et-un-serveur-dedie-pour-la-17/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

