<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Blog</title>
    <link>https://kunzelma.de/</link>
    <description>Recent content on Blog</description>
    <copyright>This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.</copyright>
    <lastBuildDate>Fri, 15 Sep 2023 00:00:00 +0000</lastBuildDate><atom:link href="https://kunzelma.de/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Der Marktmacher by Michael Ridpath</title>
      <link>https://kunzelma.de/reading-list/der-marktmacher/</link>
      <pubDate>2023-09-15</pubDate>
      
      <guid>https://kunzelma.de/reading-list/der-marktmacher/</guid>
      <description>&lt;p&gt;I really liked the book and read the 450 pages in less than 3 days. It&amp;rsquo;s
entertaining but also somewhat detailed (for a lay person) when it talks
about investment banking.&lt;/p&gt;
&lt;p&gt;Das Buch stellt ein paar mal grundlegende Investment Banking
Konzepte klar und leicht verständlich dar.&lt;/p&gt;
&lt;p&gt;Zum Beispiel, Seite 155: Leerverkauf&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&amp;ldquo;Da stimmt doch was nicht&amp;rdquo;, sagte Dave. &amp;ldquo;Das ist eine
Vier-Milliarde-Dollar-Emission, und wir wissen, dass davon drei
Milliarden bei Kunden sind, die ganz bestimmt nicht verkaufen. Bleibt
noch eine Milliarde, von der wir den Löwenanteil haben. Also woher hat
Bloomfield Weiss seine Bonds?&amp;rdquo;&lt;/p&gt;
&lt;p&gt;&amp;ldquo;Die gehen &lt;strong&gt;short&lt;/strong&gt;&amp;rdquo;, sagte Pedro. &amp;ldquo;Wenn die auf so vielen Anleihen
säßen, wüsste ich das doch.&amp;rdquo;&lt;/p&gt;
&lt;p&gt;&amp;ldquo;Also leihen sie sich diese&amp;rdquo;, sagte Ricardo. &amp;ldquo;Von wem, frage ich
mich?&amp;rdquo;&lt;/p&gt;
&lt;p&gt;Alle schwiegen. Bloomfield Weiss überschwemmte den Markt mit Bonds,
die sie nicht hatten. Pedro vermutete, dass sie Leerverkäufe
vornahmen, das heißt, sich die Bonds von einem freundlich gesinnten
Inhaber ausliehen, um sie zu verkaufen. Wenn dieser Inhaber seine
Bonds zurückforderte, musste Bloomfield Weiss sie natürlich auf dem
Markt kaufen. Bloomberg Weiss setzte darauf, dass der Kurs bis dahin
so weit gefallen sein würde, dass die Firma einen satten Profit
einstreichen konnte. Bis dahin, so hoffte Bloomfield Weiss, würde
Dekker Ward aus dem Markt gedrängt sein.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;p&gt;Persönliche Reflektion von Nick nach einer Geschäftsnacht,
wissenschon. Mit einem Essen in einem noblem Restaurant, danach zu Hause
bei Eduardo mit Frauen und weißem Pulver. Nick saß auf einer Bank und
blickte auf London, wo auch seine Arbeitsstelle Canary Wharf lag.&lt;/p&gt;
&lt;p&gt;Seite 198&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Da wirbelten nun die Dekker-Ward-Leute ganz besonders hektisch, alle
um den Nachweis bemüht, dass die vergangene Nacht ihre Arbeitskraft
nicht beeinträchtigt hatte. Sie würden viel sagende Blicke
austauschen, ihren Kunden vorlügen, was Mexiko doch für ein
wunderbares Land sei, die Aufträge notieren und die Profite
einstreichen.&lt;/p&gt;
&lt;p&gt;Ich ließ die letzten Wochen Revue passieren. Den Favela-Deal, die
Geldwäsche, Daves Entlassung, meinen Vertrauensbruch gegenüber Wojtek,
das erbärmliche Geschehen der letzten Nacht. Jeden einzelnen dieser
Vorfälle hätte ich verkraften können, aber zusammen machten sie mich
elend.&lt;/p&gt;
&lt;p&gt;Ich war nicht der richtige Mann für diesen Job. Eine Zeit lang konnte
ich mir das Gegenteil einreden, aber nicht sehr lange. Oder ich musste
mich verändern, wie sich Jamie verändert hatte. So verändern, dass ich
leichten Herzens lügen konnte, ignorieren, was ignoriert werden musste,
tun, was getan werden musste. Wenn mein Gewissen das nicht verkraften
würde, dann musste ich eben auch mein Gewissen verändern.&lt;/p&gt;
&lt;p&gt;Oder kündigen.&lt;/p&gt;
&lt;p&gt;War das Feigheit vor dem Fein? Konnte ich die wirkliche Welt nicht
ertragen? Die Geschäftswelt?&lt;/p&gt;
&lt;p&gt;Das glaubte ich nicht, ehrlich nicht. Gewiss, der Angriff am Strand von
Ipanema hatte mich erschreckt. Aber ich war mit sicher, dass das
keinerlei Einfluss auf mein Urteilsvermögen hatte. Ich musste mich mit
den Tatsachen abfinden und einsehen, dass es ein Fehler gewesen war,
bei Dekker Ward anzufangen. Es war ein totaler Misserfolg. Zwar gebe
ich Fehler nur höchst ungern zu, mein Stolz wehrt sich dagegen, aber
in diesem Fall blieb mir schlicht und ergreifend keine andere Wahl.&lt;/p&gt;
&lt;p&gt;Ricardo würde sagen, ein guter Trader weiß, wann er seine Verluste
realisieren muss. Der Zeitpunkt war gekommen.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;p&gt;Eine höchst amüsante Stelle zu &lt;em&gt;Mergers &amp;amp; Acquisitions&lt;/em&gt;, als Nick aus
Rache Bloomfield Weiss mit Informationen, die er von seinem Freund
Jamie—der noch bei Dekker Ward arbeitet—erfahren hat, dazu
animiert, doch Dekker Ward zu übernehmen, weil sie momentan nicht
besonders gut dastehen.&lt;/p&gt;
&lt;p&gt;Seite 327&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Und diese Burschen waren kaum weniger gefährlich als die
Mafia. Bloomfield Weiss&amp;rsquo; Aggressivität im Bereich der
Unternehmensübernahmen wie auf anderen Gebieten war legendär. Diese
beiden waren höchstpersönlich an der Zerschlagung von Dutzenden
Unternehmen in aller Welt beteiligt gewesen. Die offizielle
Bezeichnung lautet M&amp;amp;A, &lt;strong&gt;Mergers and Acquisitions&lt;/strong&gt;, also Fusionen
und Übernahmen, aber weniger offizielle Bezeichnungen vermitteln einen
besseren Eindruck vom tatsächlichen Geschehen: Personalabbau,
Shareholder value, oder Wertezuwachs für Aktionäre, Abstoßen von
Randaktivitäten, Geld aus dem Unternehmen quetschen. Und dann gibt es
noch eine Reihe von Wortprägungen, die sich mit einem zweiten Aspekt
des Prozesses beschäftigen: goldener Fallschirm, das heißt, die
großzügige Abfindung für leitende Angestellte nach der feindlichen
Übernahme von deren Unternehmen, Anreizsystem und vor allem das kleine
Wörtchen Provision.&lt;/p&gt;
&lt;/blockquote&gt;
</description>
    </item>
    
    <item>
      <title>Wrong Assumptions with irssi</title>
      <link>https://kunzelma.de/posts/wrong-assumptions-irssi/</link>
      <pubDate>2022-09-13</pubDate>
      
      <guid>https://kunzelma.de/posts/wrong-assumptions-irssi/</guid>
      <description>&lt;p&gt;Today I connected back to my irc bouncer &lt;a href=&#34;https://wiki.znc.in/ZNC&#34;&gt;znc&lt;/a&gt; with
the terminal irc client &lt;a href=&#34;https://irssi.org/&#34;&gt;irssi&lt;/a&gt;. I had the configuration
with my self-signed certificate and certificate pinning already figured out in
the past, but that configuration file was on a different computer. And I&amp;rsquo;m
currently travelling, so I didn&amp;rsquo;t have access to it and, more importantly, I
did not save the configuration to my
&lt;a href=&#34;https://gitlab.com/Maaxxs/dotfiles&#34;&gt;dotfiles&lt;/a&gt; or anywhere else where I could
easily look it up. However, I remember that I had some issues getting it to
work, but in the end I got there.&lt;/p&gt;
&lt;p&gt;So I had to do it from scratch, but I thought it would be easy because I&amp;rsquo;ve
already done it. So how hard could it be?&lt;/p&gt;
&lt;p&gt;Well, turns out, it took me about an hour again because I had a wrong
assumption about one configuration option in irssi.&lt;/p&gt;
&lt;p&gt;A configuration block in irssi for a network called &lt;code&gt;libera-znc&lt;/code&gt; may look like
the following:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-txt&#34; data-lang=&#34;txt&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    address = &amp;#34;mybouncer.server.net&amp;#34;;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    chatnet = &amp;#34;libera-znc&amp;#34;;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    port = &amp;#34;1234&amp;#34;;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    passowrd = &amp;#34;znc-user/znc-network-name:znc-user-password&amp;#34;;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    use_tls = &amp;#34;yes&amp;#34;;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    tls_verify = &amp;#34;no&amp;#34;;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    tls_pinned_cert = &amp;#34;12:34:56:78:90:59:0F:28:0F:48:56:FF:51:F9:D4:8C:0B:94:BC:BF:2F:D1:0C:25:D4:E9:AA:BB:CC:DD:EE:FF&amp;#34;;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    autoconnect = &amp;#34;yes&amp;#34;;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Most options should be self-explanatory. So, what was my wrong assumption?&lt;/p&gt;
&lt;p&gt;My znc server uses a self-signed certificate, so I can&amp;rsquo;t use the option
&lt;code&gt;tls_verify&lt;/code&gt;, because the certificate is self-signed and therefore cannot be
verified by any CA out there, e.g. Let&amp;rsquo;s Encrypt. Hence, &lt;em&gt;I removed the option
&lt;code&gt;tls_verify&lt;/code&gt; from the configuration&lt;/em&gt; thinking that this would equal to
&lt;code&gt;tls_verify = &amp;quot;no&amp;quot;&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;However, I want to make sure that I always connect to my server (and to prevent
&lt;a href=&#34;https://en.wikipedia.org/wiki/Man-in-the-middle_attack&#34;&gt;MITM attacks&lt;/a&gt;), so I
generated the sha256 fingerprint of the certificate the znc service is using
with OpenSSL:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;openssl x509 -fingerprint -sha256 -noout -in znc.pem
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;After verifying a thousand times that my generated certificate fingerprint is
actually correct, I took a step back and thought about it again. I tried to
remember what the problem was and I did remember that it was something stupid
and simple. After staring at the configuration for a while, I noticed in
another network configuration the &lt;code&gt;tls_verify = &amp;quot;yes&amp;quot;;&lt;/code&gt; option again. That&amp;rsquo;s
when it hit me. I put &lt;code&gt;tls_verify = &amp;quot;no&amp;quot;;&lt;/code&gt; back into my network configuration
block and it just worked.&lt;/p&gt;
&lt;p&gt;So, to remember this and to write it down somewhere, I created this short blog
post.&lt;/p&gt;
&lt;p&gt;I also looked through the irssi documentation and could not find the
documented default value of the option &lt;code&gt;tls_verify&lt;/code&gt;. However, when looking
through the &lt;a href=&#34;https://irssi.org/NEWS/?highlight=tls_verify&#34;&gt;changelog&lt;/a&gt;, I found
the following bullet point:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;-tls_verify is now enabled by default (#1170, an#18, #1309, an#23, #1343,
#1351) This may cause an ugly display of notls_verify in the output of
/SERVER LIST, even on plain-text connection, on old configs. Kindly remove
the “tls_verify = “no”;” entries from your config file manually.&lt;/p&gt;
&lt;/blockquote&gt;
</description>
    </item>
    
    <item>
      <title>Der Schneesturm - Sorokin</title>
      <link>https://kunzelma.de/reading-list/sorokin_der_schneesturm/</link>
      <pubDate>2022-08-12</pubDate>
      
      <guid>https://kunzelma.de/reading-list/sorokin_der_schneesturm/</guid>
      <description>&lt;p&gt;Es herrscht ein Schneesturm. Der Dokter will unbedingt zu einem Dorf, um dort
Leute zu impfen. Allerdings gibt es keine Pferde mehr in dem Ort und seine
Pferde sind total ausgepowered. Kosma, der normalerweise Brot ausliefert, nimmt
sich der Aufgabe an und sie ziehen mit den 50 Minipferden los. die Kufe seines
Schlittens bricht, als sie auf eine seltsame Pyramide fahren. Der Kutscher will
umkehren um den Schaden zu reparieren, aber der Doktor möchte unbedingt weiter.
Sie durchleben einige Strapazen, wie den Berg und die Mulde, wobei sie den
Pferdis helfen müssen. An einem Punkt treffen sie Leute mit Hochtechnologie.
Dort probiert der Doktor eine neue Droge. Diese ist in Pyramidenform, wodurch
im klar wird, auf was sie da gefahren sind und welcher Wert dort im Schnee
liegen muss. Die Droge versetzt den Doktor in Hochstimmung und sie fahren
mitten im Schneesturm weiter ohne abzuwarten. Dann fahren sie einem im Eis
eingefrorenen Riesen ins Nasenloch mit der gleichen bereits gebrochenen Kufe.
Die Nase wird abgehackt um die Kufe wieder rauszubekommen. Die ist allerdings
kaputt und somit macht sich der Kutscher Kosma ans Werk eines behelfsmäßige
Kufe zu basteln. Währenddessen ist es ziemlich kalt geworden, was Kosma durch
die Arbeit nicht wirklich merkt. Der Doktor allerdings ist bis auf die Knochen
durchgefroren, sodass Kosma erst noch ein Feuer macht, damit sich der Doktor
aufwärmen kann. Irgendwann tauchen auch Wölfe auf, wodurch die &amp;ldquo;Pferdis&amp;rdquo; in
eine Schreckstarre verfallen, die auch anhält, nachdem der Doktor die Wölfe mit
der Pistole vertrieben hat (das könnte auch vor dem Nasenloch und dem Riesen
gewesen sein). Ich glaube, sie hatten sich wieder festgefahren, als der Doktor
extrem wütend ist und seine Koffer packt und geradeaus losstapft um zu seinem
Ziel zu kommen. Das geht allerdings schief und er kommt gerade noch so wieder
züruck zum Kutscher, der sich mit seinen Wärme spendenden Pferdis verkrochen
hat, um bis zum Morgengrauen zu warten, damit der Weg sichtbar wird. Der Doktor
verzieht sich mit Kosma. Allerdings platzt der Behälter in dem sie liegen und
Kosma zieht es nun am linken Schulterblatt. Der ist aber zu müde, um sich
nochmal zu bewegen und der Doktor nimmt sehr viel Platz weg, sodass er so
liegen bleibt. Am nächsten morgen werden sie von Chinesen gefunden. Der Doktor
spürt seine Beine nicht und kann kaum reden. Kosma ist allerdings erfroren.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Benchmarking on the Helios4</title>
      <link>https://kunzelma.de/posts/benchmarking-on-the-helios4/</link>
      <pubDate>2021-11-08</pubDate>
      
      <guid>https://kunzelma.de/posts/benchmarking-on-the-helios4/</guid>
      <description>&lt;!-- This should never be a blog post but I made many tests because I really wanted
to known how the Helios4 performs in different situations. So I also started
taking notes and this post is basically the result of my notes with a few
explaining sentences. --&gt;
&lt;p&gt;If you don&amp;rsquo;t know about the Helios4, &lt;a href=&#34;https://wiki.kobol.io/helios4/intro/&#34;&gt;you can read about it
here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;First of all, during benchmarking a lot of things &lt;a href=&#34;https://youtu.be/vm1GJMp0QN4?t=1065&#34;&gt;can go
wrong&lt;/a&gt; (I really recommend watching these
5 mintues of a lightning talk about benchmarking). Hence, take the results with
a grain of salt. While I&amp;rsquo;m not doing any &lt;em&gt;fancy&lt;/em&gt; calculations here, I am still
not an expert. During the tests the Helios was always &lt;em&gt;idle&lt;/em&gt;, or, at least, I
did not do anything else. For instance, it could have happened that a cronjob
was run during a benchmark, but I don&amp;rsquo;t think that this should have a high
impact. Further, I was running the tests (with bonnie) multiple times.&lt;/p&gt;
&lt;p&gt;The Helios4 has support for four drives but I use it currently with 2x4TB
drives.&lt;/p&gt;
&lt;p&gt;At the end of this post, you&amp;rsquo;ll find a &lt;a href=&#34;#table-of-results-with-bonnie&#34;&gt;table summarizing the
results&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;running-omv-with-ext4-on-lvm-on-raid-1&#34;&gt;
    Running OMV with EXT4 on LVM on RAID 1&amp;nbsp;&lt;a class=&#34;hash-link nohover&#34; href=&#34;#running-omv-with-ext4-on-lvm-on-raid-1&#34;
        title=&#34;Link to this section&#34;&gt;&lt;svg width=&#34;16&#34; height=&#34;16&#34; viewBox=&#34;0 0 24 24&#34; fill=&#34;none&#34; stroke=&#34;grey&#34;
            stroke-width=&#34;3&#34; stroke-linecap=&#34;round&#34; stroke-linejoin=&#34;round&#34;&gt;
            &lt;path d=&#34;M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71&#34;&gt;&lt;/path&gt;
            &lt;path d=&#34;M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71&#34;&gt;&lt;/path&gt;
        &lt;/svg&gt;
    &lt;/a&gt;
&lt;/h2&gt;
&lt;p&gt;For the first few tests, I actually installed
&lt;a href=&#34;https://www.openmediavault.org/&#34;&gt;OpenMediaVault&lt;/a&gt; (&lt;a href=&#34;https://wiki.kobol.io/helios4/omv/&#34;&gt;Helios4
Wiki&lt;/a&gt;) as I never used it before and wanted
to try it out. I literally followed the instructions on the &lt;a href=&#34;https://wiki.kobol.io/helios4/omv/&#34;&gt;Official Kobol
wiki&lt;/a&gt; which meant&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;setting up my RAID 1 (mirror)&lt;/li&gt;
&lt;li&gt;installing the LVM plugin and creating the volumes&lt;/li&gt;
&lt;li&gt;creating the EXT4 filesystem&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I installed and activated SMB as well and after I was able to connect to it
finally (permission things&amp;hellip;), I used &lt;code&gt;dd&lt;/code&gt; to push some data over the network
to get a feeling for the speed.&lt;/p&gt;
&lt;p&gt;It&amp;rsquo;s important to note that I did not change any configration or tried to make
any optimizations. This was run with the default settings.&lt;/p&gt;
&lt;h3 id=&#34;smb-performance&#34;&gt;
    SMB Performance&amp;nbsp;&lt;a class=&#34;hash-link nohover&#34; href=&#34;#smb-performance&#34;
        title=&#34;Link to this section&#34;&gt;&lt;svg width=&#34;16&#34; height=&#34;16&#34; viewBox=&#34;0 0 24 24&#34; fill=&#34;none&#34; stroke=&#34;grey&#34;
            stroke-width=&#34;3&#34; stroke-linecap=&#34;round&#34; stroke-linejoin=&#34;round&#34;&gt;
            &lt;path d=&#34;M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71&#34;&gt;&lt;/path&gt;
            &lt;path d=&#34;M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71&#34;&gt;&lt;/path&gt;
        &lt;/svg&gt;
    &lt;/a&gt;
&lt;/h3&gt;
&lt;p&gt;As you can see in the command, I wanted to copy 10 GB originally, but aborted
at 3.1 GB, which took 160s at a rate of about 20 MB/s. Using the same command
to read the written data again resulted in about the same speed.&lt;/p&gt;
&lt;p&gt;w=20MB/s, r=20MB/s&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;╭─max@host /run/user/1000/gvfs/smb-share:server&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;helios4,share&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;data/test
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;╰─$ dd &lt;span class=&#34;k&#34;&gt;if&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;/dev/zero &lt;span class=&#34;nv&#34;&gt;of&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;test.img &lt;span class=&#34;nv&#34;&gt;bs&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;1M &lt;span class=&#34;nv&#34;&gt;count&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;m&#34;&gt;10000&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;status&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;progress
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;m&#34;&gt;3283091456&lt;/span&gt; bytes &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;3,3 GB, 3,1 GiB&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt; copied, &lt;span class=&#34;m&#34;&gt;160&lt;/span&gt; s, 20,5 MB/s^C
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;3132+0 records in
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;3132+0 records out
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;m&#34;&gt;3284140032&lt;/span&gt; bytes &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;3,3 GB, 3,1 GiB&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt; copied, 160,051 s, 20,5 MB/s
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;╭─max@host /run/user/1000/gvfs/smb-share:server&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;helios4,share&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;data/test
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;╰─$ dd &lt;span class=&#34;k&#34;&gt;if&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;test.img &lt;span class=&#34;nv&#34;&gt;of&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;/dev/null &lt;span class=&#34;nv&#34;&gt;bs&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;1M &lt;span class=&#34;nv&#34;&gt;status&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;progress
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;m&#34;&gt;3275751424&lt;/span&gt; bytes &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;3,3 GB, 3,1 GiB&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt; copied, &lt;span class=&#34;m&#34;&gt;166&lt;/span&gt; s, 19,7 MB/s
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;3132+0 records in
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;3132+0 records out
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;m&#34;&gt;3284140032&lt;/span&gt; bytes &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;3,3 GB, 3,1 GiB&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt; copied, 166,45 s, 19,7 MB/s
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Copying a 15 GB video file from my computer onto the Helios4 took almost
exactly 13 minutes, which is pretty much the rate shown by &lt;code&gt;dd&lt;/code&gt;: 15.000 MB /
(13*60s) = 19.2 MB/s.&lt;/p&gt;
&lt;p&gt;I was a little confused about this speed. The Helios4 has a gigabit ethernet
port, my computer and all other involved components as well. Theoretically,
this means a throughput of about 125 MB/s. I did not expect to reach this speed
in practice, but only 20 MB/s seemed to be a bit low?&lt;/p&gt;
&lt;h3 id=&#34;sshfs-performance&#34;&gt;
    SSHFS Performance&amp;nbsp;&lt;a class=&#34;hash-link nohover&#34; href=&#34;#sshfs-performance&#34;
        title=&#34;Link to this section&#34;&gt;&lt;svg width=&#34;16&#34; height=&#34;16&#34; viewBox=&#34;0 0 24 24&#34; fill=&#34;none&#34; stroke=&#34;grey&#34;
            stroke-width=&#34;3&#34; stroke-linecap=&#34;round&#34; stroke-linejoin=&#34;round&#34;&gt;
            &lt;path d=&#34;M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71&#34;&gt;&lt;/path&gt;
            &lt;path d=&#34;M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71&#34;&gt;&lt;/path&gt;
        &lt;/svg&gt;
    &lt;/a&gt;
&lt;/h3&gt;
&lt;p&gt;Next, I tried SSHFS. You don&amp;rsquo;t need anything special, the only requirement is
the ssh daemon and ssh is running on all my servers, anyway.&lt;/p&gt;
&lt;p&gt;Again, I did not change any configurations or made any optimizations. This was
run with the default settings when you mount a folder with SSHFS.&lt;/p&gt;
&lt;p&gt;The usage of &lt;code&gt;sshfs&lt;/code&gt; is &lt;code&gt;sshfs [user@]host:[dir] mountpoint [options]&lt;/code&gt;.  The
directoy on the Helios4 is mounted to &lt;code&gt;~/test&lt;/code&gt; locally, which you can achieve
with&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;sshfs helios4:/srv/dev-disk-by-uuid-dfb36876-37ed-4860-9a86-ecf608a3d986/data/test ~/test/
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;I used the same &lt;code&gt;dd&lt;/code&gt; command but with &lt;code&gt;count=1000&lt;/code&gt; so that 1 GB is transferred
because I did not want to wait for 10 GB.&lt;/p&gt;
&lt;p&gt;w=29MB/s, r=31MB/s&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;╭─max@host ~/test
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;╰─$ dd &lt;span class=&#34;k&#34;&gt;if&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;/dev/zero &lt;span class=&#34;nv&#34;&gt;of&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;test.img &lt;span class=&#34;nv&#34;&gt;bs&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;1M &lt;span class=&#34;nv&#34;&gt;count&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;m&#34;&gt;1000&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;status&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;progress
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;m&#34;&gt;1044381696&lt;/span&gt; bytes &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;1,0 GB, &lt;span class=&#34;m&#34;&gt;996&lt;/span&gt; MiB&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt; copied, &lt;span class=&#34;m&#34;&gt;35&lt;/span&gt; s, 29,6 MB/s
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;1000+0 records in
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;1000+0 records out
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;m&#34;&gt;1048576000&lt;/span&gt; bytes &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;1,0 GB, &lt;span class=&#34;m&#34;&gt;1000&lt;/span&gt; MiB&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt; copied, 35,5097 s, 29,5 MB/s
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;╭─max@host ~/test
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;╰─$ dd &lt;span class=&#34;k&#34;&gt;if&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;test.img &lt;span class=&#34;nv&#34;&gt;of&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;/dev/null &lt;span class=&#34;nv&#34;&gt;bs&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;1M &lt;span class=&#34;nv&#34;&gt;status&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;progress
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;m&#34;&gt;1023410176&lt;/span&gt; bytes &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;1,0 GB, &lt;span class=&#34;m&#34;&gt;976&lt;/span&gt; MiB&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt; copied, &lt;span class=&#34;m&#34;&gt;33&lt;/span&gt; s, 31,0 MB/s
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;1000+0 records in
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;1000+0 records out
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;m&#34;&gt;1048576000&lt;/span&gt; bytes &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;1,0 GB, &lt;span class=&#34;m&#34;&gt;1000&lt;/span&gt; MiB&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt; copied, 33,8286 s, 31,0 MB/s
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;I transmitted the same 15 GB video file as above as well, which took about 8
minutes: 15.000 MB / (8*60s) = 31 MB/s. That&amp;rsquo;s definitely better than 19.2
MB/s.&lt;/p&gt;
&lt;p&gt;So roughly, SSHFS seems to be about 10 MB/s faster than SMB. Interesting. This
actually spiked my interest to &lt;em&gt;actually&lt;/em&gt; do some benchmarking on the Helios4
itself.  Up until now, I only wanted to get a feel for transmission speeds,
which I could expect.&lt;/p&gt;
&lt;h3 id=&#34;test-on-the-helios4-locally&#34;&gt;
    Test on the Helios4 locally&amp;nbsp;&lt;a class=&#34;hash-link nohover&#34; href=&#34;#test-on-the-helios4-locally&#34;
        title=&#34;Link to this section&#34;&gt;&lt;svg width=&#34;16&#34; height=&#34;16&#34; viewBox=&#34;0 0 24 24&#34; fill=&#34;none&#34; stroke=&#34;grey&#34;
            stroke-width=&#34;3&#34; stroke-linecap=&#34;round&#34; stroke-linejoin=&#34;round&#34;&gt;
            &lt;path d=&#34;M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71&#34;&gt;&lt;/path&gt;
            &lt;path d=&#34;M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71&#34;&gt;&lt;/path&gt;
        &lt;/svg&gt;
    &lt;/a&gt;
&lt;/h3&gt;
&lt;p&gt;I connected to the Helios4 with &lt;code&gt;ssh&lt;/code&gt; and run basically the same &lt;code&gt;dd&lt;/code&gt; test as
before, this time with a 10 GB file (&lt;code&gt;count=10000&lt;/code&gt;). This shows the writing and
reading speeds to the disk if no network is involved.&lt;/p&gt;
&lt;p&gt;w=158MB/s, r=212Mb/s&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;╭─max@helios4 /srv/dev-disk-by-uuid-dfb36876-37ed-4860-9a86-ecf608a3d986/data/test
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;╰─$ dd &lt;span class=&#34;k&#34;&gt;if&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;/dev/zero &lt;span class=&#34;nv&#34;&gt;of&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;test.img &lt;span class=&#34;nv&#34;&gt;bs&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;1M &lt;span class=&#34;nv&#34;&gt;count&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;m&#34;&gt;10000&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;status&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;progress
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;m&#34;&gt;5071962112&lt;/span&gt; bytes &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;5.1 GB, 4.7 GiB&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt; copied, &lt;span class=&#34;m&#34;&gt;32&lt;/span&gt; s, &lt;span class=&#34;m&#34;&gt;158&lt;/span&gt; MB/s^C
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;4944+0 records in
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;4944+0 records out
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;m&#34;&gt;5184159744&lt;/span&gt; bytes &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;5.2 GB, 4.8 GiB&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt; copied, 32.7079 s, &lt;span class=&#34;m&#34;&gt;158&lt;/span&gt; MB/s
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;╭─max@helios4 /srv/dev-disk-by-uuid-dfb36876-37ed-4860-9a86-ecf608a3d986/data/test
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;╰─$ dd &lt;span class=&#34;k&#34;&gt;if&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;test.img &lt;span class=&#34;nv&#34;&gt;of&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;/dev/null &lt;span class=&#34;nv&#34;&gt;bs&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;1M &lt;span class=&#34;nv&#34;&gt;status&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;progress
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;m&#34;&gt;5084545024&lt;/span&gt; bytes &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;5.1 GB, 4.7 GiB&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt; copied, &lt;span class=&#34;m&#34;&gt;24&lt;/span&gt; s, &lt;span class=&#34;m&#34;&gt;212&lt;/span&gt; MB/s
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;4944+0 records in
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;4944+0 records out
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;m&#34;&gt;5184159744&lt;/span&gt; bytes &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;5.2 GB, 4.8 GiB&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt; copied, 24.5122 s, &lt;span class=&#34;m&#34;&gt;211&lt;/span&gt; MB/s
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Great! Writing happens with about 150 MB/s and reading at about 210 MB/s. This
shows that the disk I/O is definitely not the limiting factor. Now, let&amp;rsquo;s do a
test with a proper tool: &lt;code&gt;bonnie++&lt;/code&gt;&lt;/p&gt;
&lt;h3 id=&#34;test-with-bonnie&#34;&gt;
    Test with Bonnie++&amp;nbsp;&lt;a class=&#34;hash-link nohover&#34; href=&#34;#test-with-bonnie&#34;
        title=&#34;Link to this section&#34;&gt;&lt;svg width=&#34;16&#34; height=&#34;16&#34; viewBox=&#34;0 0 24 24&#34; fill=&#34;none&#34; stroke=&#34;grey&#34;
            stroke-width=&#34;3&#34; stroke-linecap=&#34;round&#34; stroke-linejoin=&#34;round&#34;&gt;
            &lt;path d=&#34;M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71&#34;&gt;&lt;/path&gt;
            &lt;path d=&#34;M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71&#34;&gt;&lt;/path&gt;
        &lt;/svg&gt;
    &lt;/a&gt;
&lt;/h3&gt;
&lt;p&gt;With &lt;code&gt;bonnie++&lt;/code&gt; (&lt;a href=&#34;https://www.coker.com.au/bonnie++/&#34;&gt;website&lt;/a&gt;) you can test
the performance of your filesystem and hard drives. The manpage tells you
everything you need to know, but let&amp;rsquo;s look at the used options quickly:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;-d&lt;/code&gt; sets the directory for the test&lt;/li&gt;
&lt;li&gt;&lt;code&gt;-c 1&lt;/code&gt; the level of concurrency&lt;/li&gt;
&lt;li&gt;&lt;code&gt;-s 4024&lt;/code&gt; the size of the file(s) for IO performance measures in megabytes.
4024 is twice the size the RAM of the Helios4 (2G)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;-n 1&lt;/code&gt; the number of files for the file creation test (measured in multiples
of 1024 files)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;-f&lt;/code&gt; specified without a parameter, this skips the per-char IO tests.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;-b&lt;/code&gt; no write buffering, so &lt;code&gt;fsync()&lt;/code&gt; is called after every write.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I really like the result:&lt;/p&gt;
&lt;p&gt;w=146MB/s, rw=78MB/s, r=177MB/s&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;/usr/sbin/bonnie++ -d /srv/dev-disk-by-uuid-dfb36876-37ed-4860-9a86-ecf608a3d986/data/test/perform  -c &lt;span class=&#34;m&#34;&gt;1&lt;/span&gt; -s &lt;span class=&#34;m&#34;&gt;4024&lt;/span&gt; -n &lt;span class=&#34;m&#34;&gt;1&lt;/span&gt; -f -b
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Version  1.98       ------Sequential Output------ --Sequential Input- --Random-
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;                    -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Name:Size etc        /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;helios4       4024M            146m  &lt;span class=&#34;m&#34;&gt;48&lt;/span&gt; 78.1m  &lt;span class=&#34;m&#34;&gt;34&lt;/span&gt;            177m  &lt;span class=&#34;m&#34;&gt;45&lt;/span&gt; 147.1   &lt;span class=&#34;m&#34;&gt;5&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Latency                         185ms     383ms               104ms     435ms
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Version  1.98       ------Sequential Create------ --------Random Create--------
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;helios4             -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete--
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;              files  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;                  &lt;span class=&#34;m&#34;&gt;1&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;1672561147&lt;/span&gt;   &lt;span class=&#34;m&#34;&gt;0&lt;/span&gt; +++++ +++ -1046580777   &lt;span class=&#34;m&#34;&gt;0&lt;/span&gt; -1081091648   &lt;span class=&#34;m&#34;&gt;0&lt;/span&gt; +++++ +++ -898267616   &lt;span class=&#34;m&#34;&gt;0&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Latency               177ms     276us   90292us   59943us      24us     103ms
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;ext4-on-raid-1&#34;&gt;
    EXT4 on RAID 1&amp;nbsp;&lt;a class=&#34;hash-link nohover&#34; href=&#34;#ext4-on-raid-1&#34;
        title=&#34;Link to this section&#34;&gt;&lt;svg width=&#34;16&#34; height=&#34;16&#34; viewBox=&#34;0 0 24 24&#34; fill=&#34;none&#34; stroke=&#34;grey&#34;
            stroke-width=&#34;3&#34; stroke-linecap=&#34;round&#34; stroke-linejoin=&#34;round&#34;&gt;
            &lt;path d=&#34;M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71&#34;&gt;&lt;/path&gt;
            &lt;path d=&#34;M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71&#34;&gt;&lt;/path&gt;
        &lt;/svg&gt;
    &lt;/a&gt;
&lt;/h2&gt;
&lt;p&gt;Next, I removed OpenMediaVault and built my own setup. First, I created an EXT4
filesytem directly on the &lt;a href=&#34;https://en.wikipedia.org/wiki/Standard_RAID_levels#RAID_1&#34;&gt;RAID
1&lt;/a&gt; to compare the
result to the previous test. The difference is that no LVM is used anymore.
Both tests were run with no encryption in use.&lt;/p&gt;
&lt;p&gt;The RAID 1 can be accessed with the device &lt;code&gt;/dev/md0&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The following command creates the EXT4 filesystem. By default, a block size of
4096 is used. This is not relevant now, but it will be later when a LUKS
container is used for encryption.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;sudo mkfs.ext4 /dev/md0
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Mount and run the test.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;sudo mount /dev/mapper/cryptroot /mnt/md0
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;/usr/sbin/bonnie++ -d /mnt/md0/ -c &lt;span class=&#34;m&#34;&gt;1&lt;/span&gt; -s &lt;span class=&#34;m&#34;&gt;4024&lt;/span&gt; -n &lt;span class=&#34;m&#34;&gt;1&lt;/span&gt; -f -b
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Result: w=160MB/s, rw=96MB/s, r=160MB/s&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Version  1.98       ------Sequential Output------ --Sequential Input- --Random-
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;                    -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Name:Size etc        /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;helios4       4024M            160m  &lt;span class=&#34;m&#34;&gt;54&lt;/span&gt; 96.6m  &lt;span class=&#34;m&#34;&gt;39&lt;/span&gt;            160m  &lt;span class=&#34;m&#34;&gt;37&lt;/span&gt; 145.0   &lt;span class=&#34;m&#34;&gt;4&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Latency                         170ms     287ms               194ms     471ms
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Version  1.98       ------Sequential Create------ --------Random Create--------
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;helios4             -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete--
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;              files  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;                  &lt;span class=&#34;m&#34;&gt;1&lt;/span&gt; -569212263   &lt;span class=&#34;m&#34;&gt;0&lt;/span&gt; +++++ +++ &lt;span class=&#34;m&#34;&gt;1545298178&lt;/span&gt;   &lt;span class=&#34;m&#34;&gt;0&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;1958692144&lt;/span&gt;   &lt;span class=&#34;m&#34;&gt;0&lt;/span&gt; +++++ +++ &lt;span class=&#34;m&#34;&gt;1912692157&lt;/span&gt;   &lt;span class=&#34;m&#34;&gt;0&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Latency               199ms     264us     116ms     119ms      40us   91260us
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Second run: w=164MB/s, rw=95MB/s, r=167MB/s&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Version  1.98       ------Sequential Output------ --Sequential Input- --Random-
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;                    -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Name:Size etc        /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;helios4       4024M            164m  &lt;span class=&#34;m&#34;&gt;53&lt;/span&gt; 95.9m  &lt;span class=&#34;m&#34;&gt;38&lt;/span&gt;            167m  &lt;span class=&#34;m&#34;&gt;39&lt;/span&gt; 146.9   &lt;span class=&#34;m&#34;&gt;4&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Latency                         176ms     517ms             95391us     400ms
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Version  1.98       ------Sequential Create------ --------Random Create--------
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;helios4             -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete--
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;              files  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;                  &lt;span class=&#34;m&#34;&gt;1&lt;/span&gt; -222359118   &lt;span class=&#34;m&#34;&gt;0&lt;/span&gt; +++++ +++ &lt;span class=&#34;m&#34;&gt;1549587127&lt;/span&gt;   &lt;span class=&#34;m&#34;&gt;0&lt;/span&gt; -1213966720   &lt;span class=&#34;m&#34;&gt;0&lt;/span&gt; +++++ +++ -2058643209   &lt;span class=&#34;m&#34;&gt;0&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Latency               194ms     268us     100ms     105ms      17us   89368us
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Interesting! While reading seems to be a bit slower, the writing and rw value
are slightly higher than on the setup with OVM.&lt;/p&gt;
&lt;h2 id=&#34;ext4-on-luks-on-raid-1&#34;&gt;
    EXT4 on LUKS on RAID 1&amp;nbsp;&lt;a class=&#34;hash-link nohover&#34; href=&#34;#ext4-on-luks-on-raid-1&#34;
        title=&#34;Link to this section&#34;&gt;&lt;svg width=&#34;16&#34; height=&#34;16&#34; viewBox=&#34;0 0 24 24&#34; fill=&#34;none&#34; stroke=&#34;grey&#34;
            stroke-width=&#34;3&#34; stroke-linecap=&#34;round&#34; stroke-linejoin=&#34;round&#34;&gt;
            &lt;path d=&#34;M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71&#34;&gt;&lt;/path&gt;
            &lt;path d=&#34;M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71&#34;&gt;&lt;/path&gt;
        &lt;/svg&gt;
    &lt;/a&gt;
&lt;/h2&gt;
&lt;p&gt;Instead of creating the EXT4 filesystem directly on the RAID 1 device, we will
use a LUKS container to provide encryption and create an EXT4 filesystem on top
of it.&lt;/p&gt;
&lt;p&gt;It&amp;rsquo;s important to note that these results cannot be compared to the previous
speed measurements because no encryption was used there. As you will see, the
additional computing power for the encryption takes its performance toll.&lt;/p&gt;
&lt;p&gt;First, let&amp;rsquo;s briefly look at the two 4 TB drives. Both, &lt;code&gt;/dev/sda&lt;/code&gt; and
&lt;code&gt;/dev/sdb&lt;/code&gt; report a physical sector size of 4096 bytes and a logical size of
512 bytes. Hence, it should be ensured that the LUKS container and the
filesystem use a block (sector) size of 4096 to use the drive efficiently.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;helios4:~:% sudo hdparm -I /dev/sda &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; grep &lt;span class=&#34;s1&#34;&gt;&amp;#39;Sector size&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Logical  Sector size:                   &lt;span class=&#34;m&#34;&gt;512&lt;/span&gt; bytes
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Physical Sector size:                  &lt;span class=&#34;m&#34;&gt;4096&lt;/span&gt; bytes
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;helios4:~:% sudo hdparm -I /dev/sdb &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; grep &lt;span class=&#34;s1&#34;&gt;&amp;#39;Sector size&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Logical  Sector size:                   &lt;span class=&#34;m&#34;&gt;512&lt;/span&gt; bytes
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Physical Sector size:                  &lt;span class=&#34;m&#34;&gt;4096&lt;/span&gt; bytes
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;unaligned-luks-sector-size-and-ext4-block-size&#34;&gt;
    Unaligned LUKS Sector Size and EXT4 Block Size&amp;nbsp;&lt;a class=&#34;hash-link nohover&#34; href=&#34;#unaligned-luks-sector-size-and-ext4-block-size&#34;
        title=&#34;Link to this section&#34;&gt;&lt;svg width=&#34;16&#34; height=&#34;16&#34; viewBox=&#34;0 0 24 24&#34; fill=&#34;none&#34; stroke=&#34;grey&#34;
            stroke-width=&#34;3&#34; stroke-linecap=&#34;round&#34; stroke-linejoin=&#34;round&#34;&gt;
            &lt;path d=&#34;M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71&#34;&gt;&lt;/path&gt;
            &lt;path d=&#34;M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71&#34;&gt;&lt;/path&gt;
        &lt;/svg&gt;
    &lt;/a&gt;
&lt;/h3&gt;
&lt;p&gt;The LUKS container was created with default options:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;sudo cryptsetup luksFormat /dev/md0
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;And by default, LUKS uses a sector size of 512 bytes. Information about a LUKS
container can be read with the &lt;code&gt;cryptsetup&lt;/code&gt; command as follows.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;helios4:md0:% sudo cryptsetup status /dev/mapper/cryptroot
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;/dev/mapper/cryptroot is active and is in use.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  type:    LUKS2
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  cipher:  aes-xts-plain64
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  keysize: &lt;span class=&#34;m&#34;&gt;512&lt;/span&gt; bits
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  key location: keyring
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  device:  /dev/md0
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  sector size:  &lt;span class=&#34;m&#34;&gt;512&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  offset:  &lt;span class=&#34;m&#34;&gt;32768&lt;/span&gt; sectors
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  size:    &lt;span class=&#34;m&#34;&gt;7813740160&lt;/span&gt; sectors
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  mode:    read/write
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The LUKS container can be opened with &lt;code&gt;sudo cryptsetup open /dev/md0 cryptroot&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Thereafter, the EXT4 filesystem was created with default options, too:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;sudo mkfs.ext4 /dev/mapper/cryptroot
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The default block size is 4096 as can be seen with command &lt;code&gt;dumpe2fs&lt;/code&gt;:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;helios4:md0:% sudo dumpe2fs /dev/mapper/cryptroot &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; grep &lt;span class=&#34;s1&#34;&gt;&amp;#39;Block size&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;dumpe2fs 1.44.5 &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;15-Dec-2018&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Block size:               &lt;span class=&#34;m&#34;&gt;4096&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The sector size of the LUKS container and the block size of the filesystem are
not identical. This is &lt;em&gt;not&lt;/em&gt; recommended and will likely result in a
performance loss. But I wanted to know how big the difference between aligned
and unaligned sector/blocksize actually is.&lt;/p&gt;
&lt;p&gt;A friendly reminder about the speed with an unencrypted EXT4 filesystem on the RAID 1:&lt;/p&gt;
&lt;p&gt;w=164MB/s, rw=95MB/s, r=167MB/s&lt;/p&gt;
&lt;p&gt;Bonnie++ is run with &lt;code&gt;/usr/sbin/bonnie++ -d /mnt/md0/ -c 1 -s 4024 -n 1 -f -b&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Result: w64MB/s, rw=34MB/s, r=53MB/s&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Version  1.98       ------Sequential Output------ --Sequential Input- --Random-
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;                    -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Name:Size etc        /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;helios4       4024M           64.1m  &lt;span class=&#34;m&#34;&gt;20&lt;/span&gt; 34.1m  &lt;span class=&#34;m&#34;&gt;13&lt;/span&gt;           53.8m  &lt;span class=&#34;m&#34;&gt;12&lt;/span&gt; 150.5   &lt;span class=&#34;m&#34;&gt;5&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Latency                        1146ms    1184ms             73276us     361ms
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Version  1.98       ------Sequential Create------ --------Random Create--------
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;helios4             -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete--
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;              files  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;                  &lt;span class=&#34;m&#34;&gt;1&lt;/span&gt; -1499258492   &lt;span class=&#34;m&#34;&gt;0&lt;/span&gt; +++++ +++ &lt;span class=&#34;m&#34;&gt;1469852849&lt;/span&gt;   &lt;span class=&#34;m&#34;&gt;0&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;162904477&lt;/span&gt;   &lt;span class=&#34;m&#34;&gt;0&lt;/span&gt; +++++ +++ -1983072567   &lt;span class=&#34;m&#34;&gt;0&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Latency               193ms     281us     171ms     167ms      20us     210ms
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Second run: w=64MB/s, rw=30MB/s, r=53MB/s&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Version  1.98       ------Sequential Output------ --Sequential Input- --Random-
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;                    -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Name:Size etc        /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;helios4       4024M           64.2m  &lt;span class=&#34;m&#34;&gt;20&lt;/span&gt; 30.6m  &lt;span class=&#34;m&#34;&gt;12&lt;/span&gt;           53.1m  &lt;span class=&#34;m&#34;&gt;12&lt;/span&gt; 147.4   &lt;span class=&#34;m&#34;&gt;4&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Latency                        1044ms     922ms               155ms     312ms
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Version  1.98       ------Sequential Create------ --------Random Create--------
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;helios4             -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete--
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;              files  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;                  &lt;span class=&#34;m&#34;&gt;1&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;693104966&lt;/span&gt;   &lt;span class=&#34;m&#34;&gt;0&lt;/span&gt; +++++ +++ -1357348910   &lt;span class=&#34;m&#34;&gt;0&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;1029287914&lt;/span&gt;   &lt;span class=&#34;m&#34;&gt;0&lt;/span&gt; +++++ +++ &lt;span class=&#34;m&#34;&gt;1121994707&lt;/span&gt;   &lt;span class=&#34;m&#34;&gt;0&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Latency               230ms     270us     108ms     162ms      39us     142ms
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;I did a few more runs but they all yielded the same results. As you can see,
the speed drops significantly.&lt;/p&gt;
&lt;h3 id=&#34;aligned-luks-sector-size-and-ext4-block-size&#34;&gt;
    Aligned LUKS Sector Size and EXT4 Block Size&amp;nbsp;&lt;a class=&#34;hash-link nohover&#34; href=&#34;#aligned-luks-sector-size-and-ext4-block-size&#34;
        title=&#34;Link to this section&#34;&gt;&lt;svg width=&#34;16&#34; height=&#34;16&#34; viewBox=&#34;0 0 24 24&#34; fill=&#34;none&#34; stroke=&#34;grey&#34;
            stroke-width=&#34;3&#34; stroke-linecap=&#34;round&#34; stroke-linejoin=&#34;round&#34;&gt;
            &lt;path d=&#34;M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71&#34;&gt;&lt;/path&gt;
            &lt;path d=&#34;M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71&#34;&gt;&lt;/path&gt;
        &lt;/svg&gt;
    &lt;/a&gt;
&lt;/h3&gt;
&lt;p&gt;The following setup uses the correct sector size of 4096 for the LUKS container,
which slightly improves the benchmark results.&lt;/p&gt;
&lt;p&gt;The commands to create the setup:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;sudo cryptsetup luksFormat --sector-size &lt;span class=&#34;m&#34;&gt;4096&lt;/span&gt; /dev/md0
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;sudo cryptsetup open /dev/md0 cryptroot
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Now, the sector size is 4096:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;helios4:~:% sudo cryptsetup status /dev/mapper/cryptroot
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;/dev/mapper/cryptroot is active.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  type:    LUKS2
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  cipher:  aes-xts-plain64
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  keysize: &lt;span class=&#34;m&#34;&gt;512&lt;/span&gt; bits
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  key location: keyring
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  device:  /dev/md0
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  sector size:  &lt;span class=&#34;m&#34;&gt;4096&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  offset:  &lt;span class=&#34;m&#34;&gt;32768&lt;/span&gt; sectors
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  size:    &lt;span class=&#34;m&#34;&gt;7813740160&lt;/span&gt; sectors
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  mode:    read/write
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Create the EXT4 filesystem.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;sudo mkfs.ext4 /dev/mapper/cryptroot
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;sudo dumpe2fs /dev/mapper/cryptroot &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; grep &lt;span class=&#34;s1&#34;&gt;&amp;#39;Block size&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The block size of EXT4 is again 4096 (as the last time).&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;sudo mount /dev/mapper/cryptroot /mnt/md0
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;/usr/sbin/bonnie++ -d /mnt/md0/ -c &lt;span class=&#34;m&#34;&gt;1&lt;/span&gt; -s &lt;span class=&#34;m&#34;&gt;4024&lt;/span&gt; -n &lt;span class=&#34;m&#34;&gt;1&lt;/span&gt; -f -b
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Running the test with &lt;code&gt;bonnie++&lt;/code&gt; returns the following result, which is indeed
a few megabytes better than previously. In my opinion, the encryption is worth
it and I&amp;rsquo;ll happily take the performance trade-off.&lt;/p&gt;
&lt;p&gt;w=73MB/s, rw=37MB/s, r=59MB/s&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Version  1.98       ------Sequential Output------ --Sequential Input- --Random-
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;                    -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Name:Size etc        /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;helios4       4024M           73.3m  &lt;span class=&#34;m&#34;&gt;23&lt;/span&gt; 37.4m  &lt;span class=&#34;m&#34;&gt;14&lt;/span&gt;           59.4m  &lt;span class=&#34;m&#34;&gt;14&lt;/span&gt; 143.5   &lt;span class=&#34;m&#34;&gt;4&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Latency                         728ms     748ms             97800us     387ms
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Version  1.98       ------Sequential Create------ --------Random Create--------
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;helios4             -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete--
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;              files  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;                  &lt;span class=&#34;m&#34;&gt;1&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;1961043105&lt;/span&gt;   &lt;span class=&#34;m&#34;&gt;0&lt;/span&gt; +++++ +++ -1124638686   &lt;span class=&#34;m&#34;&gt;0&lt;/span&gt; -110386393   &lt;span class=&#34;m&#34;&gt;0&lt;/span&gt; +++++ +++ &lt;span class=&#34;m&#34;&gt;1338972754&lt;/span&gt;   &lt;span class=&#34;m&#34;&gt;0&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Latency               244ms     288us     148ms     210ms      25us     186ms
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Second go: w=73MB/s, rw=32MB/s, r=59MB/s&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Version  1.98       ------Sequential Output------ --Sequential Input- --Random-
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;                    -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Name:Size etc        /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;helios4       4024M           73.4m  &lt;span class=&#34;m&#34;&gt;23&lt;/span&gt; 32.2m  &lt;span class=&#34;m&#34;&gt;13&lt;/span&gt;           59.5m  &lt;span class=&#34;m&#34;&gt;14&lt;/span&gt; 152.3   &lt;span class=&#34;m&#34;&gt;3&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Latency                         694ms     618ms             78881us     397ms
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Version  1.98       ------Sequential Create------ --------Random Create--------
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;helios4             -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete--
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;              files  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;                  &lt;span class=&#34;m&#34;&gt;1&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;289626538&lt;/span&gt;   &lt;span class=&#34;m&#34;&gt;0&lt;/span&gt; +++++ +++ -1096656038   &lt;span class=&#34;m&#34;&gt;0&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;1782974649&lt;/span&gt;   &lt;span class=&#34;m&#34;&gt;0&lt;/span&gt; +++++ +++ &lt;span class=&#34;m&#34;&gt;665618027&lt;/span&gt;   &lt;span class=&#34;m&#34;&gt;0&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Latency               173ms     260us     110ms     170ms      24us     102ms
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;encryption-offloaded-to-the-cesa-unit&#34;&gt;
    Encryption Offloaded to the CESA Unit&amp;nbsp;&lt;a class=&#34;hash-link nohover&#34; href=&#34;#encryption-offloaded-to-the-cesa-unit&#34;
        title=&#34;Link to this section&#34;&gt;&lt;svg width=&#34;16&#34; height=&#34;16&#34; viewBox=&#34;0 0 24 24&#34; fill=&#34;none&#34; stroke=&#34;grey&#34;
            stroke-width=&#34;3&#34; stroke-linecap=&#34;round&#34; stroke-linejoin=&#34;round&#34;&gt;
            &lt;path d=&#34;M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71&#34;&gt;&lt;/path&gt;
            &lt;path d=&#34;M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71&#34;&gt;&lt;/path&gt;
        &lt;/svg&gt;
    &lt;/a&gt;
&lt;/h3&gt;
&lt;p&gt;Then I remembered that the Helios4 has a &lt;a href=&#34;https://wiki.kobol.io/helios4/cesa/&#34;&gt;CESA
unit&lt;/a&gt; (Cryptographic Engines and Security
Accelerator unit), which can be used to offload encryption. I thought that
using the CESA unit will improve the benchmark results further, but the results
were quite disappointing.&lt;/p&gt;
&lt;p&gt;While creating the LUKS container, the cipher &lt;code&gt;aec-cbc-essiv:sha256&lt;/code&gt; must be
specified to use the unit. This can be achieved with the following command. We
keep the correct sector size, too.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;sudo cryptsetup -c aes-cbc-essiv:sha256 luksFormat --sector-size &lt;span class=&#34;m&#34;&gt;4096&lt;/span&gt; /dev/md0
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Open the container.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;sudo cryptsetup open /dev/md0 cryptroot
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Verify cipher and sector size.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;helios4:~:% sudo cryptsetup status /dev/mapper/cryptroot
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;/dev/mapper/cryptroot is active.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  type:    LUKS2
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  cipher:  aes-cbc-essiv:sha256
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  keysize: &lt;span class=&#34;m&#34;&gt;256&lt;/span&gt; bits
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  key location: keyring
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  device:  /dev/md0
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  sector size:  &lt;span class=&#34;m&#34;&gt;4096&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  offset:  &lt;span class=&#34;m&#34;&gt;32768&lt;/span&gt; sectors
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  size:    &lt;span class=&#34;m&#34;&gt;7813740160&lt;/span&gt; sectors
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  mode:    read/write
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Create filesystem.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;sudo mkfs.ext4 /dev/mapper/cryptroot
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Check block size.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;helios4:~:% sudo dumpe2fs /dev/mapper/cryptroot &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; grep &lt;span class=&#34;s1&#34;&gt;&amp;#39;Block size&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;dumpe2fs 1.44.5 &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;15-Dec-2018&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Block size:               &lt;span class=&#34;m&#34;&gt;4096&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Let&amp;rsquo;s mount the partition and start the test!&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;sudo mount /dev/mapper/cryptroot /mnt/md0
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;/usr/sbin/bonnie++ -d /mnt/md0/ -c &lt;span class=&#34;m&#34;&gt;1&lt;/span&gt; -s &lt;span class=&#34;m&#34;&gt;4024&lt;/span&gt; -n &lt;span class=&#34;m&#34;&gt;1&lt;/span&gt; -f -b
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;w=48MB/s, rw=29MB/s, r=60MB/s&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Version  1.98       ------Sequential Output------ --Sequential Input- --Random-
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;                    -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Name:Size etc        /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;helios4       4024M           48.8m  &lt;span class=&#34;m&#34;&gt;16&lt;/span&gt; 29.9m  &lt;span class=&#34;m&#34;&gt;12&lt;/span&gt;           60.7m  &lt;span class=&#34;m&#34;&gt;14&lt;/span&gt; 145.8   &lt;span class=&#34;m&#34;&gt;5&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Latency                        1150ms    1852ms             58338us     347ms
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Version  1.98       ------Sequential Create------ --------Random Create--------
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;helios4             -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete--
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;              files  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;                  &lt;span class=&#34;m&#34;&gt;1&lt;/span&gt; -2068442525   &lt;span class=&#34;m&#34;&gt;0&lt;/span&gt; +++++ +++ &lt;span class=&#34;m&#34;&gt;1658309631&lt;/span&gt;   &lt;span class=&#34;m&#34;&gt;0&lt;/span&gt; -747844300   &lt;span class=&#34;m&#34;&gt;0&lt;/span&gt; +++++ +++ &lt;span class=&#34;m&#34;&gt;614890684&lt;/span&gt;   &lt;span class=&#34;m&#34;&gt;0&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Latency               171ms     262us     155ms     173ms      27us     139ms
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;second run: w=48MB/s, rw=27MB/s, r=59MB/s&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Version  1.98       ------Sequential Output------ --Sequential Input- --Random-
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;                    -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Name:Size etc        /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;helios4       4024M           48.6m  &lt;span class=&#34;m&#34;&gt;16&lt;/span&gt; 27.5m  &lt;span class=&#34;m&#34;&gt;11&lt;/span&gt;           59.4m  &lt;span class=&#34;m&#34;&gt;13&lt;/span&gt; 147.9   &lt;span class=&#34;m&#34;&gt;5&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Latency                        1193ms    1148ms             93477us     356ms
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Version  1.98       ------Sequential Create------ --------Random Create--------
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;helios4             -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete--
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;              files  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;                  &lt;span class=&#34;m&#34;&gt;1&lt;/span&gt; -932939759   &lt;span class=&#34;m&#34;&gt;0&lt;/span&gt; +++++ +++ &lt;span class=&#34;m&#34;&gt;827095864&lt;/span&gt;   &lt;span class=&#34;m&#34;&gt;0&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;1905523812&lt;/span&gt;   &lt;span class=&#34;m&#34;&gt;0&lt;/span&gt; +++++ +++ -1495813491   &lt;span class=&#34;m&#34;&gt;0&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Latency               181ms     270us     214ms     238ms      21us     140ms
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Well, the result is not very convincing. With the encryption offloaded to the
CESA unit, the results are worse than before.&lt;/p&gt;
&lt;h2 id=&#34;table-of-results-with-bonnie&#34;&gt;
    Table of Results with Bonnie++&amp;nbsp;&lt;a class=&#34;hash-link nohover&#34; href=&#34;#table-of-results-with-bonnie&#34;
        title=&#34;Link to this section&#34;&gt;&lt;svg width=&#34;16&#34; height=&#34;16&#34; viewBox=&#34;0 0 24 24&#34; fill=&#34;none&#34; stroke=&#34;grey&#34;
            stroke-width=&#34;3&#34; stroke-linecap=&#34;round&#34; stroke-linejoin=&#34;round&#34;&gt;
            &lt;path d=&#34;M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71&#34;&gt;&lt;/path&gt;
            &lt;path d=&#34;M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71&#34;&gt;&lt;/path&gt;
        &lt;/svg&gt;
    &lt;/a&gt;
&lt;/h2&gt;
&lt;p&gt;All setups use a RAID 1 and the EXT4 filesystem with a block size of 4096.&lt;/p&gt;
&lt;p&gt;The exception is the EXT4 filesystem created by OMV. I&amp;rsquo;m not sure which block
size was used as I created it with the OVM web GUI and I didn&amp;rsquo;t check it in the
terminal. However, I assume that the default block size of 4096 was used.&lt;/p&gt;
&lt;p&gt;Nonetheless, if another block size than 4096 was used, this might explain the
worse performance of the setup of OMV with EXT4 on LVM on RAID 1 versus the
plain EXT4 on the RAID 1; but perhaps this is just the indirection layer of LVM?&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th style=&#34;text-align:left&#34;&gt;Setup&lt;/th&gt;
&lt;th style=&#34;text-align:left&#34;&gt;LUKS sector size&lt;/th&gt;
&lt;th style=&#34;text-align:left&#34;&gt;encryption&lt;/th&gt;
&lt;th style=&#34;text-align:right&#34;&gt;write MB/s&lt;/th&gt;
&lt;th style=&#34;text-align:right&#34;&gt;read-write MB/s&lt;/th&gt;
&lt;th style=&#34;text-align:right&#34;&gt;read MB/s&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style=&#34;text-align:left&#34;&gt;OMV - EXT4 on LVM&lt;/td&gt;
&lt;td style=&#34;text-align:left&#34;&gt;no luks&lt;/td&gt;
&lt;td style=&#34;text-align:left&#34;&gt;none&lt;/td&gt;
&lt;td style=&#34;text-align:right&#34;&gt;146&lt;/td&gt;
&lt;td style=&#34;text-align:right&#34;&gt;78&lt;/td&gt;
&lt;td style=&#34;text-align:right&#34;&gt;177&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&#34;text-align:left&#34;&gt;EXT4&lt;/td&gt;
&lt;td style=&#34;text-align:left&#34;&gt;no luks&lt;/td&gt;
&lt;td style=&#34;text-align:left&#34;&gt;none&lt;/td&gt;
&lt;td style=&#34;text-align:right&#34;&gt;160&lt;/td&gt;
&lt;td style=&#34;text-align:right&#34;&gt;96&lt;/td&gt;
&lt;td style=&#34;text-align:right&#34;&gt;160&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&#34;text-align:left&#34;&gt;EXT4 on LUKS&lt;/td&gt;
&lt;td style=&#34;text-align:left&#34;&gt;512&lt;/td&gt;
&lt;td style=&#34;text-align:left&#34;&gt;aes-xts-plain64&lt;/td&gt;
&lt;td style=&#34;text-align:right&#34;&gt;64&lt;/td&gt;
&lt;td style=&#34;text-align:right&#34;&gt;34&lt;/td&gt;
&lt;td style=&#34;text-align:right&#34;&gt;53&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&#34;text-align:left&#34;&gt;EXT4 on LUKS&lt;/td&gt;
&lt;td style=&#34;text-align:left&#34;&gt;4096&lt;/td&gt;
&lt;td style=&#34;text-align:left&#34;&gt;aes-xts-plain64&lt;/td&gt;
&lt;td style=&#34;text-align:right&#34;&gt;73&lt;/td&gt;
&lt;td style=&#34;text-align:right&#34;&gt;37&lt;/td&gt;
&lt;td style=&#34;text-align:right&#34;&gt;59&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&#34;text-align:left&#34;&gt;EXT4 on LUKS (CESA)&lt;/td&gt;
&lt;td style=&#34;text-align:left&#34;&gt;4096&lt;/td&gt;
&lt;td style=&#34;text-align:left&#34;&gt;aes-cbc-essiv:sha256&lt;/td&gt;
&lt;td style=&#34;text-align:right&#34;&gt;48&lt;/td&gt;
&lt;td style=&#34;text-align:right&#34;&gt;29&lt;/td&gt;
&lt;td style=&#34;text-align:right&#34;&gt;60&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Regarding the CESA unit, there exists a &lt;a href=&#34;https://wiki.kobol.io/helios4/cesa/#https-benchmark&#34;&gt;HTTPS
Benchmark&lt;/a&gt; in the official
wiki.&lt;/p&gt;
&lt;h2 id=&#34;out-of-scope&#34;&gt;
    Out of Scope&amp;nbsp;&lt;a class=&#34;hash-link nohover&#34; href=&#34;#out-of-scope&#34;
        title=&#34;Link to this section&#34;&gt;&lt;svg width=&#34;16&#34; height=&#34;16&#34; viewBox=&#34;0 0 24 24&#34; fill=&#34;none&#34; stroke=&#34;grey&#34;
            stroke-width=&#34;3&#34; stroke-linecap=&#34;round&#34; stroke-linejoin=&#34;round&#34;&gt;
            &lt;path d=&#34;M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71&#34;&gt;&lt;/path&gt;
            &lt;path d=&#34;M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71&#34;&gt;&lt;/path&gt;
        &lt;/svg&gt;
    &lt;/a&gt;
&lt;/h2&gt;
&lt;p&gt;There may be many aspects, which affect the measurement itself as well as how
you evaluate the results. For instance, I did not look at the energy usage or
CPU usage while &lt;a href=&#34;https://wiki.kobol.io/helios4/cesa/#results&#34;&gt;the HTTPS
benchmark&lt;/a&gt; takes the CPU usage
into account.&lt;/p&gt;
&lt;p&gt;Personally, I settled on the RAID 1 with an EXT4 filesystem on a LUKS container
(with the correct sector size, of course). This provides encryption, which is a
must-have, and reasonable speed. Furthermore, no other software but ssh is
required, which is already running anyway.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Send RAID Alerts with my Helios4 via Email</title>
      <link>https://kunzelma.de/posts/send-raid-alerts-from-my-helios4/</link>
      <pubDate>2021-05-03</pubDate>
      
      <guid>https://kunzelma.de/posts/send-raid-alerts-from-my-helios4/</guid>
      <description>&lt;p&gt;The goal is to be able to send RAID alerts from my
&lt;a href=&#34;https://kobol.io/helios4/&#34;&gt;Helios4&lt;/a&gt; to my email address and because my personal
IP address provided by my ISP is on a default blocklist and therefore not
allowed to send mail, I quickly created a workaround. I already use a VPS, which
is set up to send mail, so I figured I just need to connect my Helios4 to my VPS
and tell the server to send the email instead.&lt;/p&gt;
&lt;p&gt;On the VPS I created an extra user for this, so I can clean this up quickly if
it went sideways (but it didn&amp;rsquo;t) and for some other constraints such as limiting
this public key to only executing one script (more on that later).&lt;/p&gt;
&lt;p&gt;The new user on the server is quickly created with:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;sudo useradd -m heliosmail
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Then I created a new keypair (&lt;code&gt;ssh-keygen -t ed25519&lt;/code&gt;) on the Helios4 and copied
the public key to &lt;code&gt;/home/heliosmail/.ssh/authorized_keys&lt;/code&gt; on my server. The user
&lt;code&gt;heliosmail&lt;/code&gt; (if authenticated with this public key) should only be able to
execute one command, so we modify the &lt;code&gt;authorized_keys&lt;/code&gt; file slightly. The
reason is that the SD card of the Helios4 is not encrypted itself (only the data
on the RAID) and &lt;em&gt;if&lt;/em&gt; that keypair got compromised, then I don&amp;rsquo;t want anyone to
be able to log into my VPS. Specifically, I inserted this part in front of the
public key: &lt;code&gt;command=&amp;quot;/home/heliosmail/mail.sh $SSH_ORIGINAL_COMMAND&amp;quot;&lt;/code&gt;&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nv&#34;&gt;command&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;/home/heliosmail/mail.sh &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$SSH_ORIGINAL_COMMAND&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt; ssh-ed25519 AAAAC3NzaC1lZ...
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Now, when the user &lt;code&gt;heliosmail&lt;/code&gt; logs in (actually, &lt;em&gt;authenticates
successfully&lt;/em&gt;), the &lt;code&gt;mail.sh&lt;/code&gt; script is automatically
executed. The variable &lt;code&gt;SSH_ORIGINAL_COMMAND&lt;/code&gt; contains the original command
which was issued by the user. So you could log this if you wanted, but I use
this variable to pass an argument (the event &lt;em&gt;why&lt;/em&gt; an email is now being sent) to
the script.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;mail.sh&lt;/code&gt; script has the following content:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;cp&#34;&gt;#!/bin/bash
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;cp&#34;&gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nv&#34;&gt;EVENT&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$1&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# first, strip underscores&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nv&#34;&gt;CLEAN&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;EVENT&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;//_/&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# next, replace spaces with underscores&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nv&#34;&gt;CLEAN&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;CLEAN&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;// /_&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# now, clean out anything that&amp;#39;s not alphanumeric or an underscore&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nv&#34;&gt;CLEAN&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;CLEAN&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;//[^a-zA-Z0-9_]/&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# finally get the spaces back because I like them.&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nv&#34;&gt;CLEAN&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;CLEAN&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;//_/ &lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;To: my@email.com&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;Subject: Helios RAID alert&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;Look at the RAID.&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;Event: &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$CLEAN&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;.&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; sendmail -t
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The first argument which is passed into the script is the &lt;em&gt;event&lt;/em&gt;. This is the
reason why &lt;code&gt;mdadm&lt;/code&gt; triggered the configured script on the Helios4 (see below).
And because I pass the argument to the &lt;code&gt;echo&lt;/code&gt; command, it should be sanitized in
order to avoid command injection.&lt;/p&gt;
&lt;p&gt;Then I decided to modify the script which is run by &lt;code&gt;mdadm&lt;/code&gt;. This is configured
in &lt;code&gt;/etc/mdadm/mdadm.conf&lt;/code&gt; on the line which starts with &lt;code&gt;PROGRAM&lt;/code&gt;. The line
starting with &lt;code&gt;MAILADDR&lt;/code&gt; specifies the mail address and I commented it out
because the Helios4 itself is not sending any mail. &lt;sup id=&#34;fnref:1&#34;&gt;&lt;a href=&#34;#fn:1&#34; class=&#34;footnote-ref&#34; role=&#34;doc-noteref&#34;&gt;1&lt;/a&gt;&lt;/sup&gt;&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;PROGRAM /usr/sbin/mdadm-fault-led.sh
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Actually, this script makes an LED blink on the Helios (or switch it on
permanently if a critical error occurred).  The only line which I added to this
script is the one after the &lt;code&gt;EVENT&lt;/code&gt; variable is defined.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;cp&#34;&gt;#!/bin/bash
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;cp&#34;&gt;&lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;#&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# Make Red Fault LED (LED2) reports mdadm error events.&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;#&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nv&#34;&gt;EVENT&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$1&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# I added the following line to connect to my VPS&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;su -c &lt;span class=&#34;s2&#34;&gt;&amp;#34;ssh cloud &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$EVENT&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt; max &amp;gt;/dev/null
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;...
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;I use &lt;code&gt;su&lt;/code&gt; in order to change to the user &lt;code&gt;max&lt;/code&gt; because the ssh pubkey
authentication is only configured for this user and not for root. The &lt;code&gt;-c&lt;/code&gt; flag
specifies the command which should be run and the &lt;code&gt;$EVENT&lt;/code&gt; is the reason why
this script was triggered in the first place and I want to see this in the email
as described earlier.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;ssh cloud&lt;/code&gt; part works because &lt;code&gt;cloud&lt;/code&gt; is defined in &lt;code&gt;~/.ssh/config&lt;/code&gt; and
&lt;code&gt;$EVENT&lt;/code&gt; would be the actual command which should be executed when connected to
the server (stored in the &lt;code&gt;SSH_ORIGINAL_COMMAND&lt;/code&gt; variable on the server).&lt;/p&gt;
&lt;p&gt;Inserting this line of code at the beginning also means that an email for &lt;em&gt;every
event&lt;/em&gt; is being sent. If this is not desirable, you can move the inserted line
into one or more of the following &lt;code&gt;if&lt;/code&gt; statements which check for certain
events. You can also check the &lt;a href=&#34;https://wiki.kobol.io/helios4/mdadm/#configure-fault-led&#34;&gt;official docs on the Helios4
wiki&lt;/a&gt;.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# Active component device of an array has been marked as faulty OR A newly noticed array appears to be degraded.&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[[&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;$EVENT&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;==&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;Fail&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;||&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;$EVENT&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;==&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;DegradedArray&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;]]&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;then&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt; none &amp;gt; &lt;span class=&#34;nv&#34;&gt;$TRIGGER&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;1&lt;/span&gt; &amp;gt; &lt;span class=&#34;nv&#34;&gt;$BRIGHTNESS&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;fi&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# An md array started reconstruction&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;$EVENT&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;==&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;RebuildStarted&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;then&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt; timer &amp;gt; &lt;span class=&#34;nv&#34;&gt;$TRIGGER&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;1&lt;/span&gt; &amp;gt; &lt;span class=&#34;nv&#34;&gt;$BRIGHTNESS&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;fi&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# An md array that was rebuilding, isn&amp;#39;t any more, either because it finished normally or was aborted.&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;$EVENT&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;==&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;RebuildFinished&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;then&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt; none &amp;gt; &lt;span class=&#34;nv&#34;&gt;$TRIGGER&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;0&lt;/span&gt; &amp;gt; &lt;span class=&#34;nv&#34;&gt;$BRIGHTNESS&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;fi&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# Test RED Fault LED&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;$EVENT&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;==&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;TestMessage&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;then&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt; timer &amp;gt; &lt;span class=&#34;nv&#34;&gt;$TRIGGER&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;1&lt;/span&gt; &amp;gt; &lt;span class=&#34;nv&#34;&gt;$BRIGHTNESS&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    sleep &lt;span class=&#34;m&#34;&gt;5&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;0&lt;/span&gt; &amp;gt; &lt;span class=&#34;nv&#34;&gt;$BRIGHTNESS&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;fi&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;That&amp;rsquo;s it!&lt;/p&gt;
&lt;p&gt;If everything works, you should get an email if you run&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;sudo mdadm --monitor --scan --test -1
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;which triggers the event &lt;code&gt;&amp;quot;TestMessage&amp;quot;&lt;/code&gt;. You should know that if the script
&lt;code&gt;/usr/sbin/mdadm-fault-led.sh&lt;/code&gt; gets updated, you may need to make the above
modifications again.&lt;/p&gt;
&lt;div class=&#34;footnotes&#34; role=&#34;doc-endnotes&#34;&gt;
&lt;hr&gt;
&lt;ol&gt;
&lt;li id=&#34;fn:1&#34;&gt;
&lt;p&gt;This should not matter but if you run &lt;code&gt;sudo mdadm --monitor --scan --test -1&lt;/code&gt; and &lt;code&gt;sendmail&lt;/code&gt; is not installed, you&amp;rsquo;ll get a message saying that &amp;ldquo;sendmail
could not be found&amp;rdquo;.&amp;#160;&lt;a href=&#34;#fnref:1&#34; class=&#34;footnote-backref&#34; role=&#34;doc-backlink&#34;&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
</description>
    </item>
    
    <item>
      <title>Reverse SSH connection</title>
      <link>https://kunzelma.de/posts/reverse-ssh-connection/</link>
      <pubDate>2019-11-14</pubDate>
      
      <guid>https://kunzelma.de/posts/reverse-ssh-connection/</guid>
      <description>&lt;p&gt;I have a raspberry pi which is running pihole and some other things and I want
to be able to connect to it from wherever I am without exposing it directly to
the internet. So, I thought I could make this possible with an SSH connection
form my raspberry pi to my VPS and, at the same time, forwarding the SSH port.
Then I can use my VPS as a jumphost by connecting to the VPS and then to the
forwarded SSH port from pi.&lt;/p&gt;
&lt;h2 id=&#34;generating-ssh-key-pairs&#34;&gt;
    Generating SSH key pairs&amp;nbsp;&lt;a class=&#34;hash-link nohover&#34; href=&#34;#generating-ssh-key-pairs&#34;
        title=&#34;Link to this section&#34;&gt;&lt;svg width=&#34;16&#34; height=&#34;16&#34; viewBox=&#34;0 0 24 24&#34; fill=&#34;none&#34; stroke=&#34;grey&#34;
            stroke-width=&#34;3&#34; stroke-linecap=&#34;round&#34; stroke-linejoin=&#34;round&#34;&gt;
            &lt;path d=&#34;M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71&#34;&gt;&lt;/path&gt;
            &lt;path d=&#34;M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71&#34;&gt;&lt;/path&gt;
        &lt;/svg&gt;
    &lt;/a&gt;
&lt;/h2&gt;
&lt;p&gt;First, let&amp;rsquo;s generate the needed key pairs for the vps and the raspberry pi. I
like to create folders in &lt;code&gt;.ssh&lt;/code&gt; to keep my keys sorted.&lt;/p&gt;
&lt;p&gt;I use Curve 25519 for pubkey authentication.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;ssh-keygen -t ed25519
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Generate two keys. My directory structure looks like this&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-txt&#34; data-lang=&#34;txt&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;-- .ssh/
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  |- config
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  |- pihole/
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    |- id_ed25519
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    |- id_ed25519.pub
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  |- vps/
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    |- id_ed25519
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    |- id_ed25519.pub
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;with the following SSH &lt;code&gt;config&lt;/code&gt;&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-txt&#34; data-lang=&#34;txt&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Host vps
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    HostName VPS_IP
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    User USERNAME
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    Port PORT
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    IdentityFile ~/.ssh/vps/id_ed25519
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Host pihole
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    HostName LOCAL_IP
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    user USERNAME
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    IdentityFile ~/.ssh/pihole/id_ed25519
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Great, now I can connect to my vps with &lt;code&gt;ssh vps&lt;/code&gt; and to my raspberry pi with
&lt;code&gt;ssh pihole&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id=&#34;raspberry-pi&#34;&gt;
    Raspberry Pi&amp;nbsp;&lt;a class=&#34;hash-link nohover&#34; href=&#34;#raspberry-pi&#34;
        title=&#34;Link to this section&#34;&gt;&lt;svg width=&#34;16&#34; height=&#34;16&#34; viewBox=&#34;0 0 24 24&#34; fill=&#34;none&#34; stroke=&#34;grey&#34;
            stroke-width=&#34;3&#34; stroke-linecap=&#34;round&#34; stroke-linejoin=&#34;round&#34;&gt;
            &lt;path d=&#34;M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71&#34;&gt;&lt;/path&gt;
            &lt;path d=&#34;M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71&#34;&gt;&lt;/path&gt;
        &lt;/svg&gt;
    &lt;/a&gt;
&lt;/h2&gt;
&lt;p&gt;I want to make sure that my raspberry pi is always connecting to my vps, e.g. if
SSH crashed or if I restarted my pi. I use a systemd service and SSH public key
authentication to accomplish this.&lt;/p&gt;
&lt;p&gt;Go to &lt;code&gt;/etc/systemd/system/&lt;/code&gt; and create a &lt;code&gt;ssh-reverse.service&lt;/code&gt; file with the
following content:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-txt&#34; data-lang=&#34;txt&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;[Unit]
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Description=Reverse SSH connection
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;After=network.target
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;[Service]
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Type=simple
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;ExecStart=/usr/bin/ssh -vvv -g -N -T -o &amp;#34;ServerAliveInterval 10&amp;#34; -o &amp;#34;ExitOnForwardFailure yes&amp;#34; -R 22221:localhost:22 -l USERNAME -p PORT -i /home/USERNAME/.ssh/id_ed25519 VPS_IP
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Restart=always
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;RestartSec=5s
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;[Install]
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;WantedBy=default.target
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Replace &lt;code&gt;USERNAME&lt;/code&gt;, &lt;code&gt;PORT&lt;/code&gt;, &lt;code&gt;VPS_IP&lt;/code&gt; and the path to the &lt;code&gt;IdentityFile&lt;/code&gt; (&lt;code&gt;-i&lt;/code&gt;)
with your values.&lt;/p&gt;
&lt;p&gt;A few important options (more info: &lt;code&gt;man ssh_config&lt;/code&gt;)&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;-R 22221:localhost:22&lt;/code&gt; This forwards the SSH port on my pi (&lt;code&gt;localhost:22&lt;/code&gt;)
to the port &lt;code&gt;22221&lt;/code&gt; on my vps&lt;/li&gt;
&lt;li&gt;&lt;code&gt;ExitOnForwardFailure yes&lt;/code&gt; If forwarding of the port fails, we want to exit&lt;/li&gt;
&lt;li&gt;&lt;code&gt;ServerAliveInterval 10&lt;/code&gt; My pi sends a packet every 10 seconds to keep the
connection alive&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If this unit is not running, we try restarting the connection every 5 seconds.
Make sure, that you already accepted the public key of your VPS on the raspberry
pi by connecting to it manually. Otherwise the systemd unit will fail over and
over again.&lt;/p&gt;
&lt;p&gt;Then enable the service&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;sudo systemctl start ssh-reverse.service
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;sudo systemctl &lt;span class=&#34;nb&#34;&gt;enable&lt;/span&gt; ssh-reverse.service
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;ssh-configuration&#34;&gt;
    SSH configuration&amp;nbsp;&lt;a class=&#34;hash-link nohover&#34; href=&#34;#ssh-configuration&#34;
        title=&#34;Link to this section&#34;&gt;&lt;svg width=&#34;16&#34; height=&#34;16&#34; viewBox=&#34;0 0 24 24&#34; fill=&#34;none&#34; stroke=&#34;grey&#34;
            stroke-width=&#34;3&#34; stroke-linecap=&#34;round&#34; stroke-linejoin=&#34;round&#34;&gt;
            &lt;path d=&#34;M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71&#34;&gt;&lt;/path&gt;
            &lt;path d=&#34;M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71&#34;&gt;&lt;/path&gt;
        &lt;/svg&gt;
    &lt;/a&gt;
&lt;/h2&gt;
&lt;p&gt;Let&amp;rsquo;s write the SSH configuration to connect to the raspberry pi via the VPS.&lt;/p&gt;
&lt;p&gt;The configuration for the connection to the VPS is already in place and, in my
case, it&amp;rsquo;s called &lt;code&gt;vps&lt;/code&gt;. So, if I do &lt;code&gt;ssh vps&lt;/code&gt; I will be connected to my VPS.
Great. Now let&amp;rsquo;s use the VPS as &lt;strong&gt;jump host&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Write a new Host configuration in &lt;code&gt;~/.ssh/config&lt;/code&gt;. I called it &lt;code&gt;pihole-remote&lt;/code&gt;
so that I can still connect to my raspberry pi via &lt;code&gt;ssh pihole&lt;/code&gt; in my LAN when
I&amp;rsquo;m home.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-txt&#34; data-lang=&#34;txt&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Host pihole-remote
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    ProxyJump vps
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    HostName localhost
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    user PI_USER
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    Port 22221
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    IdentityFile ~/.ssh/pihole/id_ed25519
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    LocalForward 8888 localhost:80
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Now I can connect to my raspberry pi by using my VPS as a jump host. I&amp;rsquo;m also
fowarding &lt;code&gt;localhost:80&lt;/code&gt; to &lt;code&gt;8888&lt;/code&gt;, so that I can access my pihole webinterface
in my browser whenever I am connected to my pi with SSH.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Resources</title>
      <link>https://kunzelma.de/resources/</link>
      <pubDate>0001-01-01</pubDate>
      
      <guid>https://kunzelma.de/resources/</guid>
      <description>&lt;p&gt;This page contains links to organizations/people/tech stuff that I find
interesting. If you know something interesting that&amp;rsquo;s not on here, &lt;a href=&#34;https://kunzelma.de/about&#34;&gt;tell
me&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;civic-organisations&#34;&gt;
    Civic Organisations&amp;nbsp;&lt;a class=&#34;hash-link nohover&#34; href=&#34;#civic-organisations&#34;
        title=&#34;Link to this section&#34;&gt;&lt;svg width=&#34;16&#34; height=&#34;16&#34; viewBox=&#34;0 0 24 24&#34; fill=&#34;none&#34; stroke=&#34;grey&#34;
            stroke-width=&#34;3&#34; stroke-linecap=&#34;round&#34; stroke-linejoin=&#34;round&#34;&gt;
            &lt;path d=&#34;M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71&#34;&gt;&lt;/path&gt;
            &lt;path d=&#34;M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71&#34;&gt;&lt;/path&gt;
        &lt;/svg&gt;
    &lt;/a&gt;
&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://digitalcourage.de/&#34;&gt;Digitalcourage&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://algorithmwatch.org/&#34;&gt;AlgorithmWatch&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://freiheitsrechte.org/&#34;&gt;Gesellschaft für Freiheitsrechte (GFF)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://www.wikimedia.org/&#34;&gt;Wikimedia&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://re-publica.com/en&#34;&gt;re:publica&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://netzpolitik.org/&#34;&gt;Netzpolitik.org&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;journalism---humans&#34;&gt;
    Journalism - Humans&amp;nbsp;&lt;a class=&#34;hash-link nohover&#34; href=&#34;#journalism---humans&#34;
        title=&#34;Link to this section&#34;&gt;&lt;svg width=&#34;16&#34; height=&#34;16&#34; viewBox=&#34;0 0 24 24&#34; fill=&#34;none&#34; stroke=&#34;grey&#34;
            stroke-width=&#34;3&#34; stroke-linecap=&#34;round&#34; stroke-linejoin=&#34;round&#34;&gt;
            &lt;path d=&#34;M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71&#34;&gt;&lt;/path&gt;
            &lt;path d=&#34;M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71&#34;&gt;&lt;/path&gt;
        &lt;/svg&gt;
    &lt;/a&gt;
&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://www.michaelmoore.com/about#%C2%A7about-michael-moore&#34;&gt;Michael Moore&lt;/a&gt;. Movies/documentaries include
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://www.youtube.com/watch?v=cebnlqi9RGQ&#34;&gt;Fahrenheit 9/11&lt;/a&gt; (&lt;a href=&#34;https://www.youtube.com/watch?v=jOEnf2hrYW4&amp;amp;pp=ygUPZmFocmVuaGVpdCA5LzEx&#34;&gt;german&lt;/a&gt;),&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://www.youtube.com/watch?v=gAqYPA6Rsa8&#34;&gt;Capitalism - A Love Story&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://www.youtube.com/watch?v=ggvzwY-oyXk&#34;&gt;Where to Invade Next&lt;/a&gt;,&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://www.youtube.com/watch?v=WRQv9xMQ3E0&#34;&gt;Fahrenheit 11/9&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://chrishedges.substack.com/&#34;&gt;Chris Hedges&lt;/a&gt;. Covering US foreign policy, economic realities,
and civil liberties in American society.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://johnpilger.com/&#34;&gt;John Pilger&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;documentaries&#34;&gt;
    Documentaries&amp;nbsp;&lt;a class=&#34;hash-link nohover&#34; href=&#34;#documentaries&#34;
        title=&#34;Link to this section&#34;&gt;&lt;svg width=&#34;16&#34; height=&#34;16&#34; viewBox=&#34;0 0 24 24&#34; fill=&#34;none&#34; stroke=&#34;grey&#34;
            stroke-width=&#34;3&#34; stroke-linecap=&#34;round&#34; stroke-linejoin=&#34;round&#34;&gt;
            &lt;path d=&#34;M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71&#34;&gt;&lt;/path&gt;
            &lt;path d=&#34;M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71&#34;&gt;&lt;/path&gt;
        &lt;/svg&gt;
    &lt;/a&gt;
&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://www.youtube.com/watch?v=RHsI4djpdNU&#34;&gt;Deep Web&lt;/a&gt; (2015) About the Silk Road and Ross Ulbricht&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;tech-independence&#34;&gt;
    Tech Independence&amp;nbsp;&lt;a class=&#34;hash-link nohover&#34; href=&#34;#tech-independence&#34;
        title=&#34;Link to this section&#34;&gt;&lt;svg width=&#34;16&#34; height=&#34;16&#34; viewBox=&#34;0 0 24 24&#34; fill=&#34;none&#34; stroke=&#34;grey&#34;
            stroke-width=&#34;3&#34; stroke-linecap=&#34;round&#34; stroke-linejoin=&#34;round&#34;&gt;
            &lt;path d=&#34;M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71&#34;&gt;&lt;/path&gt;
            &lt;path d=&#34;M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71&#34;&gt;&lt;/path&gt;
        &lt;/svg&gt;
    &lt;/a&gt;
&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://sive.rs/ti&#34;&gt;Detailed instructions&lt;/a&gt; by Derek Sivers&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;git-hosting&#34;&gt;
    Git Hosting&amp;nbsp;&lt;a class=&#34;hash-link nohover&#34; href=&#34;#git-hosting&#34;
        title=&#34;Link to this section&#34;&gt;&lt;svg width=&#34;16&#34; height=&#34;16&#34; viewBox=&#34;0 0 24 24&#34; fill=&#34;none&#34; stroke=&#34;grey&#34;
            stroke-width=&#34;3&#34; stroke-linecap=&#34;round&#34; stroke-linejoin=&#34;round&#34;&gt;
            &lt;path d=&#34;M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71&#34;&gt;&lt;/path&gt;
            &lt;path d=&#34;M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71&#34;&gt;&lt;/path&gt;
        &lt;/svg&gt;
    &lt;/a&gt;
&lt;/h3&gt;
&lt;p&gt;If you&amp;rsquo;re looking for other places than GitHub to host source code:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://codeberg.org/&#34;&gt;Codeberg&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://gitea.io/&#34;&gt;Gitea&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://forgejo.org/&#34;&gt;Forgejo&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://gitlab.com/&#34;&gt;Gitlab&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://sourcehut.org/&#34;&gt;Sourcehut&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;blogs-and-websites-i-like--blog-roll&#34;&gt;
    Blogs and Websites I like // Blog Roll&amp;nbsp;&lt;a class=&#34;hash-link nohover&#34; href=&#34;#blogs-and-websites-i-like--blog-roll&#34;
        title=&#34;Link to this section&#34;&gt;&lt;svg width=&#34;16&#34; height=&#34;16&#34; viewBox=&#34;0 0 24 24&#34; fill=&#34;none&#34; stroke=&#34;grey&#34;
            stroke-width=&#34;3&#34; stroke-linecap=&#34;round&#34; stroke-linejoin=&#34;round&#34;&gt;
            &lt;path d=&#34;M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71&#34;&gt;&lt;/path&gt;
            &lt;path d=&#34;M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71&#34;&gt;&lt;/path&gt;
        &lt;/svg&gt;
    &lt;/a&gt;
&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://sive.rs/&#34;&gt;Derek Sivers&lt;/a&gt;. Very interesting life; musician,
circus performer, entrepeneur, &lt;a href=&#34;https://sive.rs/slow&#34;&gt;slow thinker&lt;/a&gt;, likes a different
point of view&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://guzey.com/&#34;&gt;Alexey Guzey&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://steadyhq.com/de/realitatsabzweig/posts&#34;&gt;Realitätsabzweig - Frank Rieger&lt;/a&gt; (German)
as well as his post &lt;a href=&#34;https://frank.geekheim.de/?page_id=128&#34;&gt;We lost the war. Welcome to the world of
tomorrow&lt;/a&gt; (English) on his blog &lt;em&gt;Knowledge brings Fear&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://blog.fefe.de&#34;&gt;Fefe&amp;rsquo;s Blog - Felix von Leitner&lt;/a&gt; (German)&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://verfassungsblog.de/&#34;&gt;Verfassungsblog/On Matters Constitutional&lt;/a&gt;
Many well-versed and detailed posts on EU law, regulation, and politics.&lt;/li&gt;
&lt;/ul&gt;
</description>
    </item>
    
  </channel>
</rss>

