<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="../assets/xml/rss.xsl" media="all"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Enodev.fr / Christophe's log (Posts about OpenIndiana)</title><link>https://www.enodev.fr/</link><description></description><atom:link href="https://www.enodev.fr/categories/openindiana.xml" rel="self" type="application/rss+xml"></atom:link><language>en</language><lastBuildDate>Sun, 10 Mar 2024 09:58:50 GMT</lastBuildDate><generator>Nikola (getnikola.com)</generator><docs>http://blogs.law.harvard.edu/tech/rss</docs><item><title>Install an iSNS server on OpenIndiana</title><link>https://www.enodev.fr/posts/install-an-isns-server-on-openindiana.html</link><dc:creator>Christophe Vu-Brugier</dc:creator><description>&lt;div class="alert alert-info" role="alert"&gt;
  &lt;p&gt;
    &lt;strong&gt;Errata March 2021:&lt;/strong&gt;
    a few statements in this blog post are wrong. These statements are marked with strikethrough text.
    Moreover, I would like to emphasize that
   &lt;a href="https://github.com/open-iscsi/open-isns"&gt;Open-iSNS&lt;/a&gt; is solid and well maintained.
&lt;/p&gt;&lt;/div&gt;

&lt;p&gt;In order to test
&lt;a href="https://github.com/open-iscsi/target-isns"&gt;target-isns&lt;/a&gt;, an iSNS
client that I am developing, I looked for an iSNS server
running on Linux. Unfortunately, the iSNS server implementations
for Linux that I found
(&lt;a href="https://sourceforge.net/projects/linuxisns/"&gt;linuxisns&lt;/a&gt; &lt;del&gt;and
&lt;a href="https://github.com/open-iscsi/open-isns"&gt;Open-iSNS&lt;/a&gt;&lt;/del&gt;) are not
maintained anymore.&lt;/p&gt;
&lt;p&gt;&lt;del&gt;It seems that people managing iSNS servers these days are using
Windows or Solaris&lt;/del&gt;. That's why I decided to install OpenIndiana, an
operating system derived from OpenSolaris, to try Solaris' iSNS
server.&lt;/p&gt;
&lt;h2&gt;Install OpenIndiana&lt;/h2&gt;
&lt;p&gt;&lt;a href="https://openindiana.org/"&gt;OpenIndiana&lt;/a&gt; is a distribution of
&lt;a href="https://wiki.illumos.org/"&gt;Illumos&lt;/a&gt;, the open source fork of Sun's
OpenSolaris. Installing the server version of OpenIndiana is quick and
easy: the installation completes in less than fifteen minutes. Then it
is time to execute a first command:&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code literal-block"&gt;&lt;span class="gp"&gt;$ &lt;/span&gt;uname&lt;span class="w"&gt; &lt;/span&gt;-a
&lt;span class="go"&gt;SunOS openindiana 5.11 oi_151a8 i86pc i386 i86pc Solaris&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;As you can see, this is not Linux ☺. When I was a student ten
years ago, I used to work on an
&lt;a href="http://en.wikipedia.org/wiki/Ultra_5."&gt;Ultra 5 workstation&lt;/a&gt; and at
the time I felt frustrated by Solaris' command-line utilities which
were less convenient than the GNU utilities. Fortunately, OpenIndiana
enables the Bash interpreter and the GNU utilities by default.&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code literal-block"&gt;&lt;span class="gp"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;$SHELL&lt;/span&gt;
&lt;span class="go"&gt;/bin/bash&lt;/span&gt;
&lt;span class="gp"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;$PATH&lt;/span&gt;
&lt;span class="go"&gt;/usr/gnu/bin:/usr/bin:/usr/sbin:/sbin&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Moreover, OpenIndiana allows remote login with SSH and the user
specified during installation is a sudoer.&lt;/p&gt;
&lt;h2&gt;Install the iSNS server&lt;/h2&gt;
&lt;p&gt;That's where things start to differ from Linux: packages are managed
by the &lt;code&gt;pkg&lt;/code&gt; command, not &lt;code&gt;apt&lt;/code&gt; or &lt;code&gt;yum&lt;/code&gt;. To search for a package, you
can use the &lt;code&gt;pkg search&lt;/code&gt; command:&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code literal-block"&gt;&lt;span class="gp"&gt;$ &lt;/span&gt;pkg&lt;span class="w"&gt; &lt;/span&gt;search&lt;span class="w"&gt; &lt;/span&gt;isns
&lt;span class="go"&gt;INDEX       ACTION VALUE                                PACKAGE&lt;/span&gt;
&lt;span class="go"&gt;pkg.summary set    Solaris iSNS Server                  pkg:/service/storage/isns@0.5.11-0.151.1.8&lt;/span&gt;
&lt;span class="go"&gt;basename    file   usr/sbin/isns                        pkg:/service/storage/isns@0.5.11-0.151.1.8&lt;/span&gt;
&lt;span class="go"&gt;pkg.fmri    set    openindiana.org/service/storage/isns pkg:/service/storage/isns@0.5.11-0.151.1.8&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Then, the &lt;code&gt;pkg install&lt;/code&gt; command is executed to install the iSNS package.&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code literal-block"&gt;&lt;span class="gp"&gt;$ &lt;/span&gt;sudo&lt;span class="w"&gt; &lt;/span&gt;pkg&lt;span class="w"&gt; &lt;/span&gt;install&lt;span class="w"&gt; &lt;/span&gt;isns
&lt;span class="go"&gt;           Packages to install:  1&lt;/span&gt;
&lt;span class="go"&gt;       Create boot environment: No&lt;/span&gt;
&lt;span class="go"&gt;Create backup boot environment: No&lt;/span&gt;
&lt;span class="go"&gt;            Services to change:  1&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;

&lt;h2&gt;Enable the iSNS service&lt;/h2&gt;
&lt;p&gt;After installing the iSNS server, you will see that it is not running.
This is because the iSNS service must be enabled.&lt;/p&gt;
&lt;p&gt;The services of OpenIndiana are managed with the &lt;code&gt;svc&lt;/code&gt; family of
commands. For instance, &lt;code&gt;svcs&lt;/code&gt; displays the list of services that are
running.&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code literal-block"&gt;&lt;span class="gp"&gt;$ &lt;/span&gt;svcs
&lt;span class="go"&gt;STATE          STIME    FMRI&lt;/span&gt;
&lt;span class="go"&gt;legacy_run     18:09:16 lrc:/etc/rc2_d/S20sysetup&lt;/span&gt;
&lt;span class="go"&gt;legacy_run     18:09:16 lrc:/etc/rc2_d/S47pppd&lt;/span&gt;
&lt;span class="go"&gt;[...]&lt;/span&gt;
&lt;span class="go"&gt;online         18:10:13 svc:/system/console-login:default&lt;/span&gt;
&lt;span class="go"&gt;online         18:39:07 svc:/system/manifest-import:default&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;If you want to display all services, including the services that are
not running, you have to pass the &lt;code&gt;-a&lt;/code&gt; option to &lt;code&gt;svcs&lt;/code&gt;:&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code literal-block"&gt;&lt;span class="gp"&gt;$ &lt;/span&gt;svcs&lt;span class="w"&gt; &lt;/span&gt;-a&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;grep&lt;span class="w"&gt; &lt;/span&gt;isns
&lt;span class="go"&gt;disabled       18:39:05 svc:/network/isns_server:default&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;As you can see, the iSNS service is not running. Let's enable it with
the &lt;code&gt;svcadm&lt;/code&gt; command:&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code literal-block"&gt;&lt;span class="gp"&gt;$ &lt;/span&gt;sudo&lt;span class="w"&gt; &lt;/span&gt;svcadm&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;enable&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;svc:/network/isns_server
&lt;span class="gp"&gt;$ &lt;/span&gt;svcs&lt;span class="w"&gt; &lt;/span&gt;svc:/network/isns_server
&lt;span class="go"&gt;STATE          STIME    FMRI&lt;/span&gt;
&lt;span class="go"&gt;online         18:59:37 svc:/network/isns_server:default&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;That's it! Our iSNS server is now up and running:&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code literal-block"&gt;&lt;span class="gp"&gt;$ &lt;/span&gt;ps&lt;span class="w"&gt; &lt;/span&gt;aux&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;grep&lt;span class="w"&gt; &lt;/span&gt;isns
&lt;span class="go"&gt;root      2127  0.0  0.2 4712 2352 ?        S 18:59:37  0:00 /usr/sbin/isns&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;</description><category>iSCSI</category><category>iSNS</category><category>OpenIndiana</category><category>Solaris</category><guid>https://www.enodev.fr/posts/install-an-isns-server-on-openindiana.html</guid><pubDate>Sat, 11 Jan 2014 18:00:00 GMT</pubDate></item></channel></rss>