<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
   <title>Solaris User</title>
   <link rel="alternate" type="text/html" href="http://solaris-user.com/" />
   <link rel="self" type="application/atom+xml" href="http://solaris-user.com/atom.xml" />
   <id>tag:solaris-user.com,2011://1</id>
   <updated>2011-06-16T01:33:55Z</updated>
   <subtitle>Solarisユーザーのための情報サイト</subtitle>
   <generator uri="http://www.sixapart.com/movabletype/">Movable Type 3.36</generator>

<entry>
   <title>ZFSプール／ファイルシステムのバージョン毎の機能早見表</title>
   <link rel="alternate" type="text/html" href="http://solaris-user.com/zfs/zfs_features_per_version.html" />
   <id>tag:solaris-user.com,2011://1.86</id>
   
   <published>2011-06-16T01:00:28Z</published>
   <updated>2011-06-16T01:33:55Z</updated>
   
   <summary>ZFSプール／ファイルシステムのバージョン毎の機能は以下の通りです。</summary>
   <author>
      <name></name>
      
   </author>
         <category term="ZFS関連" scheme="http://www.sixapart.com/ns/types#category" />
   
   <category term="17" label="ZFS" scheme="http://www.sixapart.com/ns/types#tag" />
   
   <content type="html" xml:lang="ja" xml:base="http://solaris-user.com/">
      <![CDATA[詳細は以下のドキュメントを参照してください。<br />
<li><a href="http://download.oracle.com/docs/cd/E19253-01/819-6260/index.html" target="_blank">Oracle Solaris ZFS 管理ガイド(Solaris10)</a></li>
<li><a href="http://download.oracle.com/docs/cd/E19963-01/html/821-1448/index.html" target="_blank">Oracle Solaris ZFS Administration Guide (Solaris11Express)</a></li>
]]>
      <![CDATA[<table border="1">
<tr>
<th>OSバージョン</th>
<th>zpool バージョン</th>
<th>zfs バージョン</th>
<th>機能</th>
<th>コメント</th>
</tr>

<tr>
<td>Solaris 11 Express</td>
<td>31</td>
<td>5</td>
<td>
 <ul>
  <li>暗号化</li>
  <li>スナップショット差分</li>
  <li>読み取り専用でのプールのインポート</li>
  <li>ログデバイスが見つからない状態でのプールのインポート</li>
 </ul>
</td>
<td></td>
</tr>

<tr>
<td>Solaris 10 9/10</td>
<td>22</td>
<td>4</td>
<td>
 <ul>
  <li>トリプルパリティRAID-Z (raidz3)</li>
  <li>logbias プロパティ</li>
  <li>プールリカバリ</li>
  <li>ミラー分割</li>
  <li>デバイス置換の強化</li>
  <li>ZFS システムプロセス</li>
 </ul>
</td>
<td></td>
</tr>


<tr>
<td>Solaris 10 10/09</td>
<td>10</td>
<td>3</td>
<td>
 <ul>
  <li>ZFS のFlashインストール対応</li>
  <li>ユーザー/グループクォータ</li>
  <li>ZFS キャッシュデバイス (L2ARC)</li>
  <li>ファイルシステム作成時のZFSプロパティ設定</li>
  <li>primarycacheプロパティとsecondarycacheプロパティ</li>
  <li>ログデバイスのリカバリ</li>
 </ul>
</td>
<td></td>
</tr>



<tr>
<td>Solaris 10 5/09</td>
<td>10</td>
<td>3</td>
<td>
 <ul>
  <li>ゾーンのクローン機能とZFSクローン機能の連携</li>
 </ul>
</td>
<td></td>
</tr>


<tr>
<td>Solaris 10 10/08</td>
<td>10</td>
<td>3</td>
<td>
 <ul>
  <li>専用ZILログデバイス</li>
  <li>ZFSブート（rootファイルシステムのZFS化）</li>
  <li>ZFS上のゾーン作成</li>
  <li>スナップショットの再帰的なリネーム</li>
  <li>スナップショットのロールバックを改善</li>
  <li>スナップショットのsend処理を改善</li>
  <li>gzip 圧縮</li>
  <li>複数のユーザデータコピー（dittoブロック）<p>
  <li>quota / reservation機能でスナップショットやクローンを除外可能</li>
  <li>障害モード</li>
  <li>ZFSアップグレード</li>
  <li>管理権限の委譲</li>
 </ul>
</td>
<td>Solaris 10 10/08 以降ではzpoolとzfsにはversionオプションがついて、古いZFSプールでもバージョンの表示が可能になった。</td>
</tr>



<tr>
<td>Solaris 10 5/08</td>
<td>4</td>
<td>1</td>
<td>

</td>
<td>プールのバージョンチェックはSolaris 10 5/08上のzdb(1M) で可能</td>
</tr>


<tr>
<td>Solaris 10 8/07</td>
<td>4</td>
<td>1</td>
<td>
 <ul>
  <li>iSCSIサポート</li>
  <li>zpoolヒストリ機能</li>
  <li>ファイルシステム作成時にプロパティの設定が可能に</li>
 </ul>
</td>
<td>プールのバージョンチェックはSolaris 10 8/07上のzdb(1M) で可能</td>
</tr>

<tr>
<td>Solaris 10 11/06</td>
<td>3</td>
<td>1</td>
<td>
 <ul>
  <li>再帰的なスナップショット</li>
  <li>ダブルパリティRAID-Z (raidz2)</li>
  <li>クローンのプロモーション機能</li>
 </ul>
</td>
<td>プールのバージョンチェックはSolaris 10 11/06上のzdb(1M) で可能</td>
</tr>

<tr>
<td>Solaris 10 6/06</td>
<td>2</td>
<td>1</td>
<td>
 <ul>
  <li>プールのアップグレード</li>
  <li>壊れたプールのリストア</li>
  <li>Solaris FMAへの統合</li>
  <li>ファイルシステム監視ツール (fsstat)</li>
 </ul>
</td>
<td>Initial release of ZFS in Solaris 10<p>
プールのバージョンチェックはSolaris 10 6/06上のzdb(1M) で可能</td>
</tr>


</table>]]>
   </content>
</entry>
<entry>
   <title>Solaris11 Expressで使えるzonestatコマンドをSolaris10で使うには</title>
   <link rel="alternate" type="text/html" href="http://solaris-user.com/solaris11/solaris10_zonestat.html" />
   <id>tag:solaris-user.com,2011://1.85</id>
   
   <published>2011-06-10T01:43:34Z</published>
   <updated>2011-06-10T01:49:08Z</updated>
   
   <summary></summary>
   <author>
      <name></name>
      
   </author>
         <category term="Solaris11" scheme="http://www.sixapart.com/ns/types#category" />
   
   <category term="8" label="Solaris11" scheme="http://www.sixapart.com/ns/types#tag" />
   <category term="24" label="Zones" scheme="http://www.sixapart.com/ns/types#tag" />
   
   <content type="html" xml:lang="ja" xml:base="http://solaris-user.com/">
      
      <![CDATA[Solaris10用のzonestatのPerlスクリプトが以下のページに公開されています。<br />
<a href="http://hub.opensolaris.org/bin/view/Project+zonestat/files?viewer=attachments&language=en">http://hub.opensolaris.org/bin/view/Project+zonestat/files?viewer=attachments&language=en</a>
<br />
もちろんOracleのサポート対象外ですので自己責任で使ってください。]]>
   </content>
</entry>
<entry>
   <title>模擬問題：Oracle認定Oracle Solaris 10アソシエイツ</title>
   <link rel="alternate" type="text/html" href="http://solaris-user.com/certification/try_ocsas.html" />
   <id>tag:solaris-user.com,2011://1.84</id>
   
   <published>2011-04-18T13:35:59Z</published>
   <updated>2011-07-04T02:21:02Z</updated>
   
   <summary></summary>
   <author>
      <name></name>
      
   </author>
         <category term="Solaris認定資格" scheme="http://www.sixapart.com/ns/types#category" />
   
   
   <content type="html" xml:lang="ja" xml:base="http://solaris-user.com/">
      
      <![CDATA[<ul>
<li><a href="http://www.oracle.com/jp/education/certification/try-vol83-solaris.html">Oracle認定Oracle Solaris 10 アソシエイツ レベル問題 Vol.83 (chmod)</a></li>
<li><a href="http://www.oracle.com/jp/education/certification/try-vol84-solaris.html">Oracle認定Oracle Solaris 10 アソシエイツ レベル問題 Vol.84 (mv)</a></li>
<li><a href="http://www.oracle.com/jp/education/certification/try-vol85-solaris.html">Oracle認定Oracle Solaris 10 アソシエイツ レベル問題 Vol.85 (grep)</a></li>
<li><a href="http://www.oracle.com/jp/education/certification/try-vol86-solaris.html">Oracle認定Oracle Solaris 10 アソシエイツ レベル問題 Vol.86 (compress)</a></li>
<li><a href="http://www.oracle.com/jp/education/certification/try-vol87-solaris.html">Oracle認定Oracle Solaris 10 アソシエイツ レベル問題 Vol.87 (ftp)</a></li>
<li><a href="http://www.oracle.com/jp/education/certification/try-vol88-solaris.html">Oracle認定Oracle Solaris 10 アソシエイツ レベル問題 Vol.88 (while)</a></li>
<li><a href="http://www.oracle.com/jp/education/certification/try-vol89-solaris.html">Oracle認定Oracle Solaris 10 アソシエイツ レベル問題 Vol.89 (出力リダイレクト)</a></li>
<li><a href="http://www.oracle.com/jp/education/certification/try-vol90-solaris.html">Oracle認定Oracle Solaris 10 アソシエイツ レベル問題 Vol.90 (man, MANPATH)</a></li>
<li><a href="http://www.oracle.com/jp/education/certification/try-vol91-solaris.html">Oracle認定Oracle Solaris 10 アソシエイツ レベル問題 Vol.91 (kill, pkill)</a></li>
<li><a href="http://www.oracle.com/jp/education/certification/try-vol92-solaris.html">Oracle認定Oracle Solaris 10 アソシエイツ レベル問題 Vol.92 (.rhosts, /etc/hosts.equiv)</a></li>
</ul>]]>
   </content>
</entry>
<entry>
   <title>Solaris Fingerprint DataBase (sfpDB) の使い方</title>
   <link rel="alternate" type="text/html" href="http://solaris-user.com/security_check/solaris_fingerprint_database.html" />
   <id>tag:solaris-user.com,2011://1.83</id>
   
   <published>2011-04-15T14:31:08Z</published>
   <updated>2011-04-15T14:33:58Z</updated>
   
   <summary></summary>
   <author>
      <name></name>
      
   </author>
         <category term="セキュリティチェックツール" scheme="http://www.sixapart.com/ns/types#category" />
   
   
   <content type="html" xml:lang="ja" xml:base="http://solaris-user.com/">
      
      <![CDATA[Solaris Fingerprint DataBase (sfpDB) とは、Sun が提供している MD5 による Solaris
システムファイルのハッシュ値データベースです。このデータベースと照合することでシステムファイルが（特にコマンド等が不正侵入者によって）書き換えら
れていないかを検証することができます。<br>
<br>
使い方は以下のように２通りあります。<br>
<br>
◆ ブラウザを使用し、GUI で行う。<br>
　　以下のサイトで MD5 ハッシュ値を貼り付けることでチェックできます。<br>
　　→　<a target="_blank"
href="http://sunsolve.sun.com/fileFingerprints.do">Solaris Fingerprint
DataBase</a><br>
　　この方法はちょっとしたファイルを検査するときに便利です。<br>
<br>
◆ <span style="font-family: courier;">sfpC.pl</span> や <span
style="font-family: courier;">sidekick.sh</span> スクリプトを使用して、コマンドラインから
sfpDB を参照しに行くプログラムを走らせることができます。<br>
　　この方法は多くのファイルをまとめてチェックするときに便利です。<br>
　　上記スクリプトは以下のサイトから入手できます。<br>
　　→&nbsp; <a target="_blank"
href="http://www.sun.com/blueprints/tools/">Sun BluePrints OnLine -
Scripts and Tools</a><br>
　　ページ下の方の sfpc-1.2.tar.Z and sidekick.sh.Z というリンクからダウンロードできます。<br>
<br>
<br>
ここでは自由度の高いスクリプトを使用して sfpDB を利用する方法を紹介します。<br>
<br>
まず、上記のサイトからスクリプトをダウンロードして適当なディレクトリに展開します。<br>
<br style="font-family: courier;">
<span style="font-family: courier;">bash-3.00# <span
style="font-weight: bold;">pwd</span></span><br
style="font-family: courier;">
<span style="font-family: courier;">/var/tmp/sfpDB</span><br
style="font-family: courier;">
<span style="font-family: courier;">bash-3.00# <span
style="font-weight: bold;">ls</span></span><br
style="font-family: courier;">
<span style="font-family: courier;">sfpC-1.2.tar.Z&nbsp; sidekick.sh.Z</span><br
style="font-family: courier;">
<span style="font-family: courier;">bash-3.00# <span
style="font-weight: bold;">uncompress *</span></span><br
style="font-family: courier;">
<span style="font-family: courier;">bash-3.00# <span
style="font-weight: bold;">ls</span></span><br
style="font-family: courier;">
<span style="font-family: courier;">sfpC-1.2.tar&nbsp; sidekick.sh</span><br
style="font-family: courier;">
<span style="font-family: courier;">bash-3.00# <span
style="font-weight: bold;">tar xvf sfpC-1.2.tar</span></span><br
style="font-family: courier;">
<span style="font-family: courier;">x sfpC-1.2, 0 bytes, 0 テープブロック</span><br
style="font-family: courier;">
<span style="font-family: courier;">x sfpC-1.2/sfpC.pl, 6172 bytes, 13
テープブロック</span><br style="font-family: courier;">
<span style="font-family: courier;">x sfpC-1.2/README.sfpC, 8754 bytes,
18 テープブロック</span><br style="font-family: courier;">
<span style="font-family: courier;">bash-3.00#</span><br>
<br>
ここでチェックしたいファイルの md5 ハッシュ値を求めます。<br>
Solaris 10 であれば、標準で入っている <span style="font-family: courier;">digest</span>
コマンドを使ってもよいですが、<span style="font-family: courier;">sfpC.pl</span> も <span
style="font-family: courier;">sidekick.sh</span> も md5
コマンドを使用するように設計されているようですので、md5 コマンドのバイナリをダウンロードします。<br>
→ <a href="http://jp.sunsolve.sun.com/md5/md5.tar.Z">md5 コマンドのダウンロード</a><br>
<br>
ダウンロードした md5 コマンドのバイナリを以下のようにセットアップします。<br>
<br>
<span style="font-family: courier;">bash-3.00# <span
style="font-weight: bold;">pwd</span></span><br
style="font-family: courier;">
<span style="font-family: courier;">/var/tmp/sfpDB</span><br
style="font-family: courier;">
<span style="font-family: courier;">bash-3.00# <span
style="font-weight: bold;">ls</span></span><br
style="font-family: courier;">
<span style="font-family: courier;">md5.tar.Z&nbsp;&nbsp;&nbsp;&nbsp;
sfpC-1.2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sfpC-1.2.tar&nbsp; sidekick.sh</span><br
style="font-family: courier;">
<span style="font-family: courier;">bash-3.00# <span
style="font-weight: bold;">uncompress md5.tar.Z</span></span><br
style="font-family: courier;">
<span style="font-family: courier;">bash-3.00# <span
style="font-weight: bold;">tar xvf md5.tar</span></span><br
style="font-family: courier;">
<span style="font-family: courier;">x md5, 0 bytes, 0 テープブロック</span><br
style="font-family: courier;">
<span style="font-family: courier;">x md5/md5-x86, 23452 bytes, 46
テープブロック</span><br style="font-family: courier;">
<span style="font-family: courier;">x md5/md5-sparc, 23892 bytes, 47
テープブロック</span><br style="font-family: courier;">
<span style="font-family: courier;">bash-3.00# <span
style="font-weight: bold;">cp md5/md5-sparc /usr/sbin/md5</span></span><br
style="font-family: courier;">
<span style="font-family: courier;">bash-3.00# <span
style="font-weight: bold;">chmod 700 /usr/sbin/md5</span></span><br
style="font-family: courier;">
<span style="font-family: courier;">bash-3.00# <span
style="font-weight: bold;">ls -l /usr/sbin/md5</span></span><br
style="font-family: courier;">
<span style="font-family: courier;">-rwx------&nbsp;&nbsp; 1
root&nbsp;&nbsp;&nbsp;&nbsp; root&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
23892&nbsp; 8月 16日&nbsp; 13:17 /usr/sbin/md5</span><br
style="font-family: courier;">
<span style="font-family: courier;">bash-3.00#</span><br>
<br>
使用方法は簡単で以下のように実行するだけです。<br>
<br>
<span style="font-family: courier;">bash-3.00# <span
style="font-weight: bold;">md5 /usr/bin/ls</span></span><br
style="font-family: courier;">
<span style="font-family: courier;">MD5 (/usr/bin/ls) =
ae08d6328d118dfc6ee87cd42436972e</span><br>
<br>
ちなみに同じ出力を Solaris 10 標準の <span style="font-family: courier;">digest</span>
コマンドで得る場合は、以下のように実行します。一見複雑に見えますが、多機能なためアルゴリズム指定などが入っているだけです。またパイプ(|)の右側
は小文字で出力される md5 を 大文字の MD5 に変換しているだけです。<br>
（注意：sfpDB では大文字で MD5 と記述する必要があります。）<br>
<br>
<span style="font-family: courier;">bash-3.00# <span
style="font-weight: bold;">digest -a md5 -v /usr/bin/ls | sed
's/md5/MD5/'</span></span><br style="font-family: courier;">
<span style="font-family: courier;">MD5 (/usr/bin/ls) =
ae08d6328d118dfc6ee87cd42436972e</span><br>
<br>
<br>
【<span style="font-family: courier;">sfpC.pl</span> スクリプトの実行】<br>
<br>
準備ができたら sfpC.pl スクリプトのある場所まで移動します。<br>
<br>
<span style="font-family: courier;">bash-3.00# <span
style="font-weight: bold;">pwd</span></span><br
style="font-family: courier;">
<span style="font-family: courier;">/var/tmp/sfpDB</span><br
style="font-family: courier;">
<span style="font-family: courier;">bash-3.00# <span
style="font-weight: bold;">cd sfpC-1.2</span></span><br
style="font-family: courier;">
<span style="font-family: courier;">bash-3.00# <span
style="font-weight: bold;">ls</span></span><br
style="font-family: courier;">
<span style="font-family: courier;">README.sfpC&nbsp; sfpC.pl</span><br>
<br>
この記事を書いている 2007年8月16日時点にダウンロードした <span style="font-family: courier;">sfpC.pl</span>
では上記スクリプトにある sfpDB の URL は古いものになっています。<br>
<span style="font-family: courier;">sfpC.pl</span> をエディタで開いて 137
行目付近の以下のエントリを書き換えてください。<br>
<br>
変更前：<br>
<span style="font-family: courier;">my $req = POST
'http://sunsolve.Sun.COM/pub-cgi/fileFingerprints.pl',</span><br>
↓<br>
変更後：<br>
<span style="font-family: courier; font-weight: bold;">my $req = POST
'http://jp.sunsolve.sun.com/fileFingerprints.do',</span><br>
<br>
<br>
そして、先ほどの md5 コマンドを使用してチェックしたいファイルの MD5 ハッシュをファイルに落とします。ここでは <span
style="font-family: courier;">/usr/bin/ls</span> コマンドを調べると仮定します。<br>
<br>
<span style="font-family: courier;">bash-3.00# <span
style="font-weight: bold;">md5 /usr/bin/ls &gt; md5.out</span></span><br
style="font-family: courier;">
<span style="font-family: courier;">bash-3.00# <span
style="font-weight: bold;">cat md5.out</span></span><br
style="font-family: courier;">
<span style="font-family: courier;">MD5 (/usr/bin/ls) =
ae08d6328d118dfc6ee87cd42436972e</span><br>
<br>
後は、カレントディレクトリにある <span style="font-family: courier;">sfpC.pl</span>
スクリプトを以下のように実行するだけです。<br>
<small style="color: rgb(255, 0, 0);">※注意： Solaris 標準の perl
では必要なモジュールが見つからず、失敗することがあります。README.sfpC ファイルを見て、perl
に必要なモジュールを組み込むか、別途 perl パッケージをインストールして sfpC.pl 内の perl
のパスを変更するなど修正が必要です。</small><br>
<br>
<span style="font-family: courier;">bash-3.00# <span
style="font-weight: bold;">./sfpC.pl md5.out</span></span><br
style="font-family: courier;">
<br style="font-family: courier;">
<span style="font-family: courier;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
ae08d6328d118dfc6ee87cd42436972e -&nbsp; - 1 match(es)</span><br
style="font-family: courier;">
<br style="font-family: courier;">
<br style="font-family: courier;">
<span style="font-family: courier;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
canonical-path: /usr/bin/ls</span><br style="font-family: courier;">
<span style="font-family: courier;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
package: SUNWcsu</span><br style="font-family: courier;">
<span style="font-family: courier;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
version: 11.10.0,REV=2005.01.21.15.53</span><br
style="font-family: courier;">
<span style="font-family: courier;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
architecture: sparc</span><br style="font-family: courier;">
<br style="font-family: courier;">
<span style="font-family: courier;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
source: Solaris 10/SPARC</span><br style="font-family: courier;">
<br style="font-family: courier;">
<span style="font-family: courier;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
patch: 118855-36RS</span><br>
<br>
【<span style="font-family: courier;">sidekick.sh</span> スクリプトの実行】<br>
<br>
まず <span style="font-family: courier;">sidekick.sh</span>
スクリプトの以下の部分をシステムの構成に合わせて編集し、スクリプトに実行権をつけます。<br>
<br>
<span style="font-family: courier;">bash-3.00# <span
style="font-weight: bold;">vi sidekick.sh</span></span><br>
<span style="font-family: courier;">----------------------------<br>
...</span><br style="font-family: courier;">
<span style="font-family: courier;">SIDEKICK_MD5=</span><span
style="font-weight: bold; font-family: courier;">/usr/sbin/md5</span><br
style="font-family: courier;">
<span style="font-family: courier;">...</span><br
style="font-family: courier;">
<span style="font-family: courier;">SIDEKICK_PERL=</span><span
style="font-weight: bold; font-family: courier;">/usr/local/bin/perl</span><br
style="font-family: courier;">
<span style="font-family: courier;">...</span><br
style="font-family: courier;">
<span style="font-family: courier;">SIDEKICK_SFPC=</span><span
style="font-weight: bold; font-family: courier;">/var/tmp/sfpDB/sfpC-1.2/sfpC.pl</span><br>
-----------------------------------<br>
<br>
<span style="font-family: courier;">bash-3.00# <span
style="font-weight: bold;">chmod 744 sidekick.sh</span><br>
bash-3.00# <span style="font-weight: bold;">ls -l sidekick.sh</span></span><br
style="font-family: courier;">
<span style="font-family: courier;">-rwxr--r--&nbsp;&nbsp; 1
root&nbsp;&nbsp;&nbsp;&nbsp; root&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
10711 Aug 16 13:03 sidekick.sh</span><br>
<br>
以下のように実行すると簡単な使用方法が出力されます。<br>
<br style="font-family: courier;">
<span style="font-family: courier;">bash-3.00# <span
 style="font-weight: bold;">./sidekick.sh -h</span></span><br
 style="font-family: courier;">
<span style="font-family: courier;">./sidekick.sh</span><br
 style="font-family: courier;">
<br style="font-family: courier;">
&nbsp;
<span style="font-family: courier;">-R
new-root-dir&nbsp;&nbsp;&nbsp; Specify an alternate root directory.</span><br
 style="font-family: courier;">
&nbsp;
<span style="font-family: courier;">-r
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; Find files commonly found in root kits.</span><br
 style="font-family: courier;">
&nbsp;
<span style="font-family: courier;">-u
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; Find files with the set-uid bit set.</span><br
 style="font-family: courier;">
&nbsp;
<span style="font-family: courier;">-g
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; Find files with the set-gid bit set.</span><br
 style="font-family: courier;">
&nbsp;
<span style="font-family: courier;">-s
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; Find files with the sticky bit set.</span><br
 style="font-family: courier;">
&nbsp;
<span style="font-family: courier;">-U
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; Find files with no valid user.</span><br
 style="font-family: courier;">
&nbsp;
<span style="font-family: courier;">-G
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; Find files with no valid group.</span><br
 style="font-family: courier;">
&nbsp;
<span style="font-family: courier;">-a
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; Find all files. warning: slow and many false
positives will ocure</span><br style="font-family: courier;">
&nbsp;
<span style="font-family: courier;">-S
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; Standalone mode.&nbsp; sfpC will not be executed.</span><br
 style="font-family: courier;">
&nbsp;
<span style="font-family: courier;">-h
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; Display this message.</span><br>
<br>
<br>
例えば、rootkit などの検出に使用するときには以下のように実行します。これは rootkit
によって置き換えられそうなコマンドがあらかじめスクリプト内に登録されており、１つ１つに対して前述の sfpC.pl
スクリプトが実行されているだけです。<br>
<br>
<span style="font-family: courier;">bash-3.00# <span
style="font-weight: bold;">./sidekick.sh -r</span></span><br
style="font-family: courier;">
<span style="font-family: courier;">Searching for files commonly found
in rootkits.</span><br style="font-family: courier;">
<span style="font-family: courier;">The output has been saved to
rootkitfiles-md5.20070817110238.</span><br style="font-family: courier;">
<span style="font-family: courier;">Using sfpC to process MD5
signatures from file, rootkitfiles-md5.20070817110238.</span><br
style="font-family: courier;">
<br style="font-family: courier;">
<br style="font-family: courier;">
<span style="font-family: courier;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
00a7737d352eca7e4e7e7a7434bdc9d5 -&nbsp; - 1 match(es)</span><br
style="font-family: courier;">
<br style="font-family: courier;">
<br style="font-family: courier;">
<br style="font-family: courier;">
<span style="font-family: courier;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
canonical-path: /usr/bin/date</span><br style="font-family: courier;">
<span style="font-family: courier;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
package: SUNWcsu</span><br style="font-family: courier;">
<span style="font-family: courier;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
version: 11.10.0,REV=2005.01.21.15.53</span><br
style="font-family: courier;">
<span style="font-family: courier;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
architecture: sparc</span><br style="font-family: courier;">
<br style="font-family: courier;">
<span style="font-family: courier;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
source: Solaris 10/SPARC</span><br style="font-family: courier;">
<br style="font-family: courier;">
<span style="font-family: courier;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
patch: 107551-01</span><br style="font-family: courier;">
<br style="font-family: courier;">
<span style="font-family: courier;">...</span><br>
<br>
（以下省略）<br>
<br>
上記結果のように sfpDB にマッチ (match) していれば安全です。１つでも 0 match
などの表記が見つかったら、不正に置き換えられていることを示しますので注意が必要です。<br>]]>
   </content>
</entry>
<entry>
   <title>Sun N1 System Manager とは・・・</title>
   <link rel="alternate" type="text/html" href="http://solaris-user.com/n1grid/n1_system_manager_flash_demo.html" />
   <id>tag:solaris-user.com,2011://1.82</id>
   
   <published>2011-04-15T14:22:36Z</published>
   <updated>2011-04-15T14:24:39Z</updated>
   
   <summary></summary>
   <author>
      <name></name>
      
   </author>
         <category term="Sun N1 Software" scheme="http://www.sixapart.com/ns/types#category" />
   
   
   <content type="html" xml:lang="ja" xml:base="http://solaris-user.com/">
      
      <![CDATA[<p>Sun N1 System Managerというソフトウェアは、百台を超えるサーバーのインストール / パッチ適用 / ハードやＯＳの状態監視 / イベント検知といった手間のかかる管理業務を１台の端末から集中的に行うことを可能にするソフトウェアです。</p>

<p>最近ではビジネスアプリケーションでも Grid Computing 的にスケールアウトさせる事例が増えていますが、このようなシステムを従来の手法で管理しようとすると、膨大な時間と繰り返し作業によって管理コストが跳ね上がってしまいます。</p>

<p>N1 System Managerは、管理ネットワークに接続された多数の小型サーバーを、見た目にも分かりやすい Hybrid UI (GUIとCLIが連動する Web Browser Interface) によって集中管理し、この問題を解決します。</p>

<p>どんな感じのソフトウェアなのかは以下の Flash デモで見ると一目瞭然です。<br />
⇒ <a href="http://www.sun.com/software/media/flash/tour_n1systemmanager/index.html" target="_blank">N1 System Manager Flashデモ</a></p>

<p>【マニュアル】<br />
◆ <a href="http://docs.sun.com/app/docs/coll/436.4" target="_blank">Sun N1 System Manager 1.3.1 Collection - Japanese</a></p>

<p>【製品情報】<br />
◆ <a href="http://jp.sun.com/products/software/system_manager/" target="_blank">Sun N1 System Manager</a><br />
◆ <a href="http://jp.sun.com/products/software/provisioning/service_provisioning/" target="_blank">Sun N1 Service Provisioning System</a><br />
◆ <a href="http://jp.sun.com/products/software/gridware/" target="_blank">Sun Grid Engine</a><br />
◆ <a href="http://jp.sun.com/products/software/grid_console/" target="_blank">Solaris Container Manager</a></p>]]>
   </content>
</entry>
<entry>
   <title>OpenSolarisにrootユーザーでログインできるようにする</title>
   <link rel="alternate" type="text/html" href="http://solaris-user.com/opensolaris/root_login_change.html" />
   <id>tag:solaris-user.com,2011://1.81</id>
   
   <published>2011-04-14T15:08:36Z</published>
   <updated>2011-04-14T15:10:17Z</updated>
   
   <summary></summary>
   <author>
      <name></name>
      
   </author>
         <category term="OpenSolaris関連" scheme="http://www.sixapart.com/ns/types#category" />
   
   
   <content type="html" xml:lang="ja" xml:base="http://solaris-user.com/">
      
      <![CDATA[<p>
OpenSolarisのインストール時にrootのパスワードを設定しますが、同時に一般(管理)ユーザーも追加できるようになっております。一般ユーザーを追加しなかった場合には、rootがユーザーとして登録され、設定したパスワードで何事もなくログインできますが、ご丁寧に管理用の一般ユーザーを追加するとrootが役割として登録され、直接ログインすることができなくなります。このような環境では、管理用の一般ユーザーでpfexecコマンドを使用して管理コマンドを実行するかsuコマンドでroot役割になります。
</p>
<p>
セキュリティ上、この方が好ましいのですが、OpenSolarisに慣れていないバリバリのSolarisユーザーには「rootで直接ログインさせろよ！」と言われてしまうかもしれません。
</p>
<p>
ここでは設定の善し悪しは考慮せず、通常のSolaris10のデフォルト状態のようにrootで直接ログインできる環境にOpenSolarisを変更します。
</p>
<p>
RBACを知っていれば変更はいたって簡単で、/etc/user_attrファイルのrootエントリのtype=roleをtype=normalに修正して、user1のエントリを削除します。直接ファイルを編集してもいいですが、正式にはrolemodやusermodコマンドなどを使用します。
</p>
<pre>
user1@opensolaris:~$ <strong>su -</strong>
Password: <strong>******</strong>
Sun Microsystems Inc.   SunOS 5.11      snv_111b        November 2008
root@opensolaris:~# <strong>rolemod -K type=nomal root</strong>
root@opensolaris:~# <strong>grep root /etc/user_attr</strong>
root::::type=normal;auths=solaris.*,solaris.grant;profiles=All;lock_after_retries=no;clearance=admin_high;min_label=admin_low
user1:::::profiles=Primary Administrator;roles=root
root@opensolaris:~# <strong>usermod -P "" -R "" user1</strong>
UX: usermod: user1 is currently logged in, some changes may not take effect until next login.
</pre>
<p>
これで完了です。一般ユーザー(user1)をログアウトしてrootで直接ログインできるはずです。
</p>]]>
   </content>
</entry>
<entry>
   <title>OpenSolarisのネットワーク設定 (nwam)</title>
   <link rel="alternate" type="text/html" href="http://solaris-user.com/opensolaris/nwam.html" />
   <id>tag:solaris-user.com,2011://1.80</id>
   
   <published>2011-04-14T15:07:34Z</published>
   <updated>2011-04-14T15:09:22Z</updated>
   
   <summary></summary>
   <author>
      <name></name>
      
   </author>
         <category term="OpenSolaris関連" scheme="http://www.sixapart.com/ns/types#category" />
   
   <category term="44" label="nwamd" scheme="http://www.sixapart.com/ns/types#tag" />
   
   <content type="html" xml:lang="ja" xml:base="http://solaris-user.com/">
      
      <![CDATA[<p>
今さらですがOpenSolarisのネットワーク接続に関して説明します。
</p>
<p>
OpenSolarisのインストールは初心者にもわかりやすいように必要最低限の情報だけ設定すれば済むようになっております。通常のSolarisのインストールではインストール時にIPアドレスを指定するかDHCPを利用するか、ネームサービスを使用するかなどいろいろ聞いてきますが、OpenSolarisでは一切聞いてきません。
</p>
<p>
とりあえず、何も設定しなくても起動時に自動的に無線LAN→有線LANのように検索してくれ、デフォルトでDHCPを利用してネットワークが構成されるので、ノートPCなどにOpenSolarisをインストールして家庭内で使用するには何も問題はないはずです。
</p>
<p>
ただし、複数のNICを持つシステムやルーター構成などにしたい場合には、このようなデフォルトの動作を少々いじりたくなることもしばしばあります。特にSolarisをバリバリ使ってきた管理者にはOpenSolarisでまずはじめに気になるのがこのネットワークまわりの設定だと思います。
</p>
<p>
OpenSolarisでは以下のように2種類のnetwork/physicalサービスが用意されています。デフォルトではsvc:/network/physical:nwamが有効になっています。このサービスからnwamd(Network Auto-Magicデーモン)が起動し、前述のような自動構成を実現してくれています。しかし、既存のSolarisにはないデーモンなので、昔からのSolarisユーザーはここでビビってしまうかもしれません。
</p>
<pre>
root@opensolaris:~# <strong>svcs network/physical</strong>
STATE          STIME    FMRI
disabled       15:24:17 svc:/network/physical:default
online         15:50:25 svc:/network/physical:nwam
</pre>
<p>
サーバー機などで複雑なネットワーク構成を考えている場合や、今までのSolarisと同じ構成方法で設定したい場合はsvc:/network/physical:nwamサービスを無効にし、svc:/network/physical:defaultを有効にすることで対応できます。
</p>
<p>
単にDHCPから固定IPアドレスに変更したり、有線LANと無線LANの優先順位を変更したりしたいだけであれば、/etc/nwam/llpファイルを編集することで対応できます。
</p>
<p>
例えば無線LANインタフェースのないシステムで、デフォルトのDHCP設定を固定IPアドレスに変更するには以下のように修正します。
</p>
<pre>
root@opensolaris:~# <strong>cat /etc/nwam/llp</strong>
#e1000g0        dhcp
e1000g0 static 192.168.1.20/24
</pre>
<p>
また、ノートPCなどで有線LAN(iprb0)と無線LAN(iwi0)インタフェースがある場合は、/etc/nwam/llpファイルで上に記述されているエントリが優先されますので、必要に応じて入れ替えます。(デフォルトでは無線LANが優先されていました)
</p>
<pre>
root@opensolaris:~# <strong>cat /etc/nwam/llp</strong>
iwi0	dhcp
iprb0	dhcp
</pre>
<p>
ファイルを編集したら以下のようにnwamを再起動して反映させます。
</p>
<pre>
root@opensolaris:~# <strong>svcadm restart nwam</strong>
</pre>]]>
   </content>
</entry>
<entry>
   <title>beadmを使用したrootイメージのスナップショット</title>
   <link rel="alternate" type="text/html" href="http://solaris-user.com/opensolaris/grub_beadm.html" />
   <id>tag:solaris-user.com,2011://1.79</id>
   
   <published>2011-04-14T15:05:54Z</published>
   <updated>2011-04-14T15:08:04Z</updated>
   
   <summary></summary>
   <author>
      <name></name>
      
   </author>
         <category term="OpenSolaris関連" scheme="http://www.sixapart.com/ns/types#category" />
   
   <category term="43" label="beadm" scheme="http://www.sixapart.com/ns/types#tag" />
   
   <content type="html" xml:lang="ja" xml:base="http://solaris-user.com/">
      
      <![CDATA[<p>OpenSolarisにはZFSのsnapshotとclone機能を利用したBE(Boot
Environment)という概念があります。
運用中のOpenSolarisの要所要所でブート環境をBEとして保存しておけば、
トラブルが発生した時などに元の環境に簡単に戻すことができたり、
再インストールすることなく検証環境を効率よく切り替えたりすることが可能です。
</p>
<p>
例えば、テスト環境を構築するときなど、テスト前に初期状態のBE (例：opensolaris200906_initial)を作成しておき、
環境構築後に再び別のBE名(例: opensolaris200906_zone_test)で保存しておきます。
そうすることで、別のテスト環境を構築したい場合には初期状態のBE (opensolaris200906_initial)から
新しいテスト環境用のBEを作成して、GRUBメニューから新しいBEを選択することにより
初期状態から再び別のテスト環境の構築が可能です。
元のテスト環境に戻りたい場合は再びGRUBメニューから opensolaris2009_zone_test を選択するだけで済みます
</p>
<h2>実行例</h2>
<p>
以下のようにbeadmコマンドを使用してインストール直後のOpenSolarisで初期状態のBEを作成しておきます。
</p>
<pre>root@opensolaris:~# <span style="font-weight: bold;">beadm create opensolaris200906_initial</span><br></pre>
<p>
以下のようにbeadm listコマンドを実行して、新しくBEが作成されたことを確認します。
Activeのフラグでは、Nが現在のBEを表し、Rが次回のブート時に使用されるBEを表しています。
</p>
<pre>root@opensolaris:~# <span style="font-weight: bold;">beadm list</span><br>BE Active Mountpoint Space Policy Created<br>-- ------ ---------- ----- ------ -------<br>opensolaris NR / 3.19G static 2009-08-14 11:21<br>opensolaris200906_initial - - 87.0K static 2009-08-14 14:42<br></pre>
<p>
ついでにゾーン機能の検証用のBEも以下のように作ってしまいます。
-eオプションでBE名を指定することにより、アクティブでないBEから新しいBEを作成することもできます。
</p>
<pre>root@opensolaris:~# <span style="font-weight: bold;">beadm create -e opensolaris200906_initial opensolaris200906_zone_test</span><br>root@opensolaris:~# <span
style="font-weight: bold;">beadm list</span><br>BE Active Mountpoint Space Policy Created<br>-- ------ ---------- ----- ------ -------<br>opensolaris NR / 3.19G static 2009-08-14 11:21<br>opensolaris200906_initial - - 175.0K static 2009-08-14 14:42<br>opensolaris200906_zone_test - - 44.0K static 2009-08-14 14:54<br></pre>
<p>
次に以下のようにデフォルトのBEを切り替えます。
デフォルトのBEを切り替えなくても起動時にGRUBメニューから目的のBEを選べば済みますが、
主に使用するBEをデフォルトにしておいた方が使い勝手がいいと思います。
</p>
<pre>root@opensolaris:~# <span style="font-weight: bold;">beadm activate opensolaris200906_zone_test</span><br>root@opensolaris:~# <span
style="font-weight: bold;">beadm list</span><br>BE Active Mountpoint Space Policy Created<br>-- ------ ---------- ----- ------ -------<br>opensolaris N / 30.0K static 2009-08-14 11:21<br>opensolaris200906_initial - - 44.0K static 2009-08-14 14:42<br>opensolaris200906_zone_test R - 3.19G static 2009-08-14 14:54<br></pre>
<p>
上記のようにRフラグが指定のBEに設定されています。
</p>
<p>
ではゾーン環境用のBEにするために再起動します。
</p>
<pre>root@opensolaris:~# <span style="font-weight: bold;">init 6</span><br></pre>
<p>
以下のようにGRUBメニューではデフォルトのopensolaris200906_zone_testが選択されています。
</p>
<img src="/image/beadm/grub_beadm.jpg" width="100%">
<p>起動後にBEを確認すると以下のようになっているはずです。
</p>
<pre>root@opensolaris:~# <span style="font-weight: bold;">beadm list</span><br>BE Active Mountpoint Space Policy Created<br>-- ------ ---------- ----- ------ -------<br>opensolaris - - 10.00M static 2009-08-14 11:21<br>opensolaris200906_initial - - 44.0K static 2009-08-14 14:42<br>opensolaris200906_zone_test NR / 3.22G static 2009-08-14 14:54<br></pre>
<p>
では簡単にゾーンでも作成してみましょう。
せっかくOpenSolarisで検証しているのですからCrossbow技術を使用して
仮想NICをゾーンに割り当ててみます。<br>
vnic0：大域ゾーン(global)<br>
vnic1：zone1<br>
vnic2：zone2<br>
に対応していて、仮想スイッチvsw1で接続されているイメージです。<br>
また、各ゾーンが外部に出られるようにするため大域ゾーンをルーターとして構成し、
NATでアドレス変更をしています。
ちなみにnwamサービスは無効にして従来のネットワーク構成方法を有効にしています。
</p>
<pre>root@opensolaris:~# <span style="font-weight: bold;">svcadm disable physical:nwam</span><br>root@opensolaris:~# <span
style="font-weight: bold;">svcadm enable physical:default</span><br>root@opensolaris:~# <span
style="font-weight: bold;">dladm create-etherstub vsw1</span><br>root@opensolaris:~# <span
style="font-weight: bold;">dladm create-vnic -l vsw1 vnic0</span><br>root@opensolaris:~# <span
style="font-weight: bold;">dladm create-vnic -l vsw1 vnic1</span><br>root@opensolaris:~# <span
style="font-weight: bold;">dladm create-vnic -l vsw1 vnic2</span><br>root@opensolaris:~# <span
style="font-weight: bold;">dladm show-vnic</span><br>LINK OVER SPEED MACADDRESS MACADDRTYPE VID<br>vnic0 vsw1 0 2:8:20:78:64:49 random 0<br>vnic1 vsw1 0 2:8:20:96:2:a8 random 0<br>vnic2 vsw1 0 2:8:20:3d:8d:24 random 0<br><br>root@opensolaris:~# <span
style="font-weight: bold;">ifconfig vnic0 plumb</span><br>root@opensolaris:~# <span
style="font-weight: bold;">ifconfig vnic0 inet 10.1.0.254/24 up</span><br>root@opensolaris:~# <span
style="font-weight: bold;">ifconfig vnic0</span><br>vnic0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 3<br> inet 10.1.0.254 netmask ffffff00 broadcast 10.1.0.255<br> ether 2:8:20:f7:b9:b0<br>root@opensolaris:~# <span
style="font-weight: bold;">vi /etc/ipf/ipnat.conf</span><br>map e1000g0 10.1.0.0/24 -&gt; 0/32 portmap tcp/udp auto<br>map e1000g0 10.1.0.0/24 -&gt; 0/32<br>root@opensolaris:~# <span
style="font-weight: bold;">svcadm enable ipfilter</span><br>root@opensolaris:~# <span
style="font-weight: bold;">svcadm enable ipv4-forwarding</span><br><br>root@opensolaris:~# <span
style="font-weight: bold;">zonecfg -z zone1</span><br>zone1: No such zone configured<br>Use 'create' to begin configuring a new zone.<br>zonecfg:zone1&gt; <span
style="font-weight: bold;">create</span><br>zonecfg:zone1&gt; <span
style="font-weight: bold;">set zonepath=/export/zone1</span><br>zonecfg:zone1&gt; <span
style="font-weight: bold;">set autoboot=false</span><br>zonecfg:zone1&gt; <span
style="font-weight: bold;">set ip-type=exclusive</span><br>zonecfg:zone1&gt; <span
style="font-weight: bold;">add net</span><br>zonecfg:zone1:net&gt; <span
style="font-weight: bold;">set physical=vnic1</span><br>zonecfg:zone1:net&gt; <span
style="font-weight: bold;">end</span><br>zonecfg:zone1&gt; <span
style="font-weight: bold;">exit<br><br></span>root@opensolaris:~# <span
style="font-weight: bold;">zonecfg -z zone2</span><br>zone2: No such zone configured<br>Use 'create' to begin configuring a new zone.<br>zonecfg:zone2&gt; <span
style="font-weight: bold;">create</span><br>zonecfg:zone2&gt; <span
style="font-weight: bold;">set zonepath=/export/zone2</span><br>zonecfg:zone2&gt; <span
style="font-weight: bold;">set autoboot=false</span><br>zonecfg:zone2&gt; <span
style="font-weight: bold;">set ip-type=exclusive</span><br>zonecfg:zone2&gt; <span
style="font-weight: bold;">add net</span><br>zonecfg:zone2:net&gt; <span
style="font-weight: bold;">set physical=vnic2</span><br>zonecfg:zone2:net&gt; <span
style="font-weight: bold;">end</span><br>zonecfg:zone2&gt; <span
style="font-weight: bold;">exit</span><br>root@opensolaris:~#<br>root@opensolaris:~# <span
style="font-weight: bold;">zoneadm list -vc</span><br> ID NAME STATUS PATH BRAND IP<br> 0 global running / native shared<br> - zone1 configured /export/zone1 ipkg excl<br> - zone2 configured /export/zone2 ipkg excl<br><br>root@opensolaris:~# <span
style="font-weight: bold;">zoneadm -z zone1 install</span><br>A ZFS file system has been created for this zone.<br> Publisher: Using opensolaris.org (http://pkg.opensolaris.org/release/).<br> Image: Preparing at /export/zone1/root.<br>Sanity Check: Looking for 'entire' incorporation.<br> Installing: Core System (output follows)<br>DOWNLOAD PKGS FILES XFER (MB)<br>Completed 20/20 3021/3021 42.55/42.55<br><br>PHASE ACTIONS<br>Install Phase 5747/5747<br> Installing: Additional Packages (output follows)<br>DOWNLOAD PKGS FILES XFER (MB)<br>Completed 37/37 5598/5598 32.52/32.52<br><br>PHASE ACTIONS<br>Install Phase 7332/7332<br><br> Note: Man pages can be obtained by installing SUNWman<br> Postinstall: Copying SMF seed repository ... done.<br> Postinstall: Applying workarounds.<br> Done: Installation completed in 399.104 seconds.<br><br> Next Steps: Boot the zone, then log into the zone console<br> (zlogin -C) to complete the configuration process<br><br>root@opensolaris:~# <span
style="font-weight: bold;">zoneadm -z zone2 install</span><br>A ZFS file system has been created for this zone.<br> Publisher: Using opensolaris.org (http://pkg.opensolaris.org/release/).<br> Image: Preparing at /export/zone2/root.<br>Sanity Check: Looking for 'entire' incorporation.<br> Installing: Core System (output follows)<br>DOWNLOAD PKGS FILES XFER (MB)<br>Completed 20/20 3021/3021 42.55/42.55<br><br>PHASE ACTIONS<br>Install Phase 5747/5747<br> Installing: Additional Packages (output follows)<br>DOWNLOAD PKGS FILES XFER (MB)<br>Completed 37/37 5598/5598 32.52/32.52<br><br>PHASE ACTIONS<br>Install Phase 7332/7332<br><br> Note: Man pages can be obtained by installing SUNWman<br> Postinstall: Copying SMF seed repository ... done.<br> Postinstall: Applying workarounds.<br> Done: Installation completed in 397.446 seconds.<br><br> Next Steps: Boot the zone, then log into the zone console<br> (zlogin -C) to complete the configuration process<br><br>root@opensolaris:~# <span
style="font-weight: bold;">zoneadm -z zone1 boot</span><br>root@opensolaris:~# <span
style="font-weight: bold;">zoneadm -z zone2 boot</span><br>root@opensolaris:~# <span
style="font-weight: bold;">zlogin -C zone1</span><br>...(IPアドレスなどの設定)<br>root@opensolaris:~# <span
style="font-weight: bold;">zlogin -C zone2</span><br>...(IPアドレスなどの設定)<br></UP,BROADCAST, RUNNING,MULTICAST,IPv4></pre>
<p>
こんな感じで２つのゾーンを作成するとNICやゾーンの状態は以下のようになっているはずです。
</p>
<pre>root@dhcp-ctyo03-17-146:~# <span style="font-weight: bold;">dladm show-link</span><br>LINK CLASS MTU STATE OVER<br>e1000g0 phys 1500 up --<br>vsw1 etherstub 9000 unknown --<br>vnic0 vnic 9000 up vsw1<br>vnic1 vnic 9000 up vsw1<br>vnic2 vnic 9000 up vsw1<br><br>root@opensolaris:~# <span
style="font-weight: bold;">zoneadm list -vc</span><br> ID NAME STATUS PATH BRAND IP<br> 0 global running / native shared<br> 4 zone1 running /export/zone1 ipkg excl<br> 5 zone2 running /export/zone2 ipkg excl<br></pre>
<p>
そこで本題に戻り、元のBEに戻してみましょう。まずbeadm listで戻したいBEを確認します。
以下のようにデフォルトのBEを変更しても構いません。
</p>
<pre>root@opensolaris:~# <span style="font-weight: bold;">beadm list</span><br>BE Active Mountpoint Space Policy Created<br>-- ------ ---------- ----- ------ -------<br>opensolaris - - 10.00M static 2009-08-14 11:21<br>opensolaris200906_initial - - 44.0K static 2009-08-14 14:42<br>opensolaris200906_zone_test NR / 3.22G static 2009-08-14 14:54<br><br>root@opensolaris:~# <span
style="font-weight: bold;">beadm activate opensolaris</span><br>root@opensolaris:~# <span
style="font-weight: bold;">beadm list</span><br>BE Active Mountpoint Space Policy Created<br>-- ------ ---------- ----- ------ -------<br>opensolaris R - 3.21G static 2009-08-14 11:21<br>opensolaris200906_initial - - 44.0K static 2009-08-14 14:42<br>opensolaris200906_zone_test N / 31.32M static 2009-08-14 14:54<br></pre>
<p>
再起動します。（GRUBメニューで起動するBEを確認します）
</p>
<pre>root@opensolaris:~# <span style="font-weight: bold;">init 6</span><br></pre>
<p>
起動後、NICやゾーンの状態などを確認すると、予想通り何もありません。
</p>
<pre>root@opensolaris:~# <span style="font-weight: bold;">dladm show-link</span><br>LINK CLASS MTU STATE OVER<br>e1000g0 phys 1500 up --<br>root@opensolaris:~# <span
style="font-weight: bold;">zoneadm list -vc</span><br> ID NAME STATUS PATH BRAND IP<br> 0 global running / native shared<br></pre>
<p>
こんな感じで検証環境を効率的に用意したり、
パッチ適用やパッケージの更新前などにBEを保存しておくと万が一のトラブルにも迅速に対応できますね。
</p>]]>
   </content>
</entry>
<entry>
   <title>OpenSolaris2009.06 で Crossbow を使用して仮想ネットワーク環境を構築する</title>
   <link rel="alternate" type="text/html" href="http://solaris-user.com/opensolaris/crossbow_virtual_network.html" />
   <id>tag:solaris-user.com,2011://1.78</id>
   
   <published>2011-04-14T15:03:38Z</published>
   <updated>2011-04-14T15:06:26Z</updated>
   
   <summary></summary>
   <author>
      <name></name>
      
   </author>
         <category term="OpenSolaris関連" scheme="http://www.sixapart.com/ns/types#category" />
   
   <category term="42" label="dladm" scheme="http://www.sixapart.com/ns/types#tag" />
   
   <content type="html" xml:lang="ja" xml:base="http://solaris-user.com/">
      
      <![CDATA[<p>
Crossbowでは仮想NICや仮想スイッチといった機能が提供されるため、既存のコンテナ機能やVirtualBox、Xenなどのホストの仮想化機能と組み合わせることにより、１つの物理システム内に複数の仮想的なネットワーク環境を作成することが可能になります。
</p>
<p>
例えば以下のようなネットワーク構成があったとします。
</p>
<img src="/image/crossbow/crossbow1.gif" width="100%">
<p>
これをCrossbowとコンテナ(ゾーン)機能を使用して以下のように1つのシステムに集約してしまいます。
</p>
<img src="/image/crossbow/crossbow2.gif" width="100%">
<p>
今回は詳しく触れませんが、仮想ルーターをF/Wやロードバランサーにしたり、各仮想NICに帯域制限を設けたり、複数の物理NICを集約(aggregate)して、その上に仮想NICを構成したりと、まさに自由自在です。しかも各仮想NICごとにフロー制御やトラフィックの統計情報なども取ることが可能です。
</p>

<h2>事前準備</h2>
<p>
まずはOpenSolarisでデフォルトで有効になっているnwamサービスを停止して、従来のネットワーク構成方法に切り替えます。このシステムではe1000g0物理NICを認識しているので必要に応じて以下のようにファイルを構成しておきます。
</p>
<pre>
global# <strong>cat /etc/hostname.e1000g0</strong>
192.168.1.20
global# <strong>cat /etc/inet/netmasks</strong>
...(省略)
192.168.1.0     255.255.255.0
</pre>
<pre>
global# <strong>svcadm disable physical:nwam</strong>
global# <strong>svcadm enable physical:default</strong>
</pre>
<p>
OpenSolaris(大域ゾーン)のIP構成は以下のようになります。
</p>
<pre>
global# <strong>ifconfig -a</strong>
lo0: flags=2001000849&lt;UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL&gt; mtu 8232 index 1
        inet 127.0.0.1 netmask ff000000
e1000g0: flags=1104843&lt;UP,BROADCAST,RUNNING,MULTICAST,IPv4&gt; mtu 1500 index 2
        inet 192.168.1.20 netmask fffffe00 broadcast 192.168.1.255
        ether 8:0:27:a0:72:63
lo0: flags=2002000849&lt;UP,LOOPBACK,RUNNING,MULTICAST,IPv6,VIRTUAL&gt; mtu 8252 index 1
        inet6 ::1/128
</pre>

<h2>仮想スイッチと仮想NICの作成</h2>
<p>
仮想スイッチの作成は以下のように行うだけです。vsw1やvsw2が仮想スイッチの名前で任意の分りやすい名前にしてください。
</p>
<pre>
global# <strong>dladm create-etherstub vsw1</strong>
global# <strong>dladm create-etherstub vsw2</strong>
global# <strong>dladm show-etherstub</strong>
LINK
vsw1
vsw2
</pre>
<p>
仮想NICの作成も簡単です。各仮想スイッチに対応する(接続する)ように仮想NICを作成します。例えばvnic10,vnic11,vnic12は同じスイッチに接続されるため、これらの仮想NICを割り当てられたマシン(非大域ゾーン)は同一サブネットに配置されることになります。前述の図のように仮想ルーターvrouterには将来的にvnic10とvnic20を割り当て、２つの仮想ネットワークをつなぐように構成します。
</p>
<pre>
global# <strong>dladm create-vnic -l vsw1 vnic10</strong>
global# <strong>dladm create-vnic -l vsw1 vnic11</strong>
global# <strong>dladm create-vnic -l vsw1 vnic12</strong>
global# <strong>dladm create-vnic -l vsw2 vnic20</strong>
global# <strong>dladm create-vnic -l vsw2 vnic21</strong>
global# <strong>dladm create-vnic -l vsw2 vnic22</strong>
global# <strong>dladm show-vnic</strong>
LINK         OVER         SPEED  MACADDRESS           MACADDRTYPE         VID
vnic10       vsw1         0      2:8:20:31:dc:bb      random              0
vnic11       vsw1         0      2:8:20:68:f3:ff      random              0
vnic12       vsw1         0      2:8:20:7e:55:19      random              0
vnic20       vsw2         0      2:8:20:8f:ef:2e      random              0
vnic21       vsw2         0      2:8:20:e9:c4:ee      random              0
vnic22       vsw2         0      2:8:20:52:8c:89      random              0
</pre>
<p>
ちなみに、今回の例のようにシステム内に仮想ネットワーク環境を構築する必要がなければ仮想スイッチ(vsw1やvsw2)の作成は不要で、vsw1の部分をe1000g0のように物理NICにすれば、e1000g0上に仮想NICを複数作成することができます。(ゾーンごとに帯域制限などをしたい場合に便利ですね)
</p>
<p>
次に作成した仮想NICの１つ(vnic12)を大域ゾーンの追加NICとして認識させます。
</p>

<pre>
global# <strong>ifconfig vnic12 plumb</strong>
global# <strong>ifconfig vnic12 inet 10.1.0.12 netmask 255.255.255.0 up</strong>
global# <strong>ifconfig -a</strong>
lo0: flags=2001000849&lt;UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL&gt; mtu 8232 index 1
        inet 127.0.0.1 netmask ff000000
e1000g0: flags=1004843&lt;UP,BROADCAST,RUNNING,MULTICAST,IPv4&gt; mtu 1500 index 2
        inet 192.168.1.20 netmask fffffe00 broadcast 192.168.1.255
        ether 8:0:27:a0:72:63
vnic12: flags=1000843&lt;UP,BROADCAST,RUNNING,MULTICAST,IPv4&gt; mtu 9000 index 3
        inet 10.1.0.12 netmask ffffff00 broadcast 10.1.0.255
        ether 2:8:20:7e:55:19
lo0: flags=2002000849&lt;UP,LOOPBACK,RUNNING,MULTICAST,IPv6,VIRTUAL&gt; mtu 8252 index 1
        inet6 ::1/128
</pre>
<p>
再起動後も上記のような設定にするために、/etc/hostname.vnic12や/etc/inet/netmasksファイルを作成・編集しておきます。
</p>
<pre>
global# <strong>cat /etc/hostname.vnic12</strong>
10.1.0.12
global# <strong>cat /etc/inet/netmasks</strong>
...(省略)
192.168.1.0     255.255.255.0
10.1.0.0        255.255.255.0
</pre>
<p>
次に、非大域ゾーンで構成する仮想ネットワークから大域ゾーンのe1000g0を通って外部（インターネット）接続できるように大域ゾーンをルーターとして構成します。もちろん仮想ネットワークのIPアドレスは外部に公開するものではありませんので、NATの設定も以下のように行います。
</p>
<pre>
global# <strong>cat /etc/ipf/ipnat.conf</strong>
map e1000g0 10.1.0.0/24 -> 0/32 portmap tcp/udp auto
map e1000g0 10.1.0.0/24 -> 0/32
</pre>
<p>
上記のようにNATの構成ファイルを作成したらipfilterサービスを有効にします。またipv4-forwardingサービスを有効にしてIPv4転送（フォワーディング）を有効にします。
</p>
<pre>
global# <strong>svcadm enable ipfilter</strong>
global# <strong>svcadm enable ipv4-forwarding</strong>
</pre>
<p>
以下のようにipnatコマンドでNATが有効になっていることを確認できます。
</p>
<pre>
global# <strong>ipnat -l</strong>
List of active MAP/Redirect filters:
map e1000g0 10.1.0.0/24 -> 0.0.0.0/32 portmap tcp/udp auto
map e1000g0 10.1.0.0/24 -> 0.0.0.0/32

List of active sessions:
</pre>

<p>
routeadmコマンドでIPv4 フォワーディングが有効になっていることを確認します。
</p>

<pre>
global# <strong>routeadm</strong>
              Configuration   Current              Current
                     Option   Configuration        System State
---------------------------------------------------------------
               IPv4 routing   disabled             disabled
               IPv6 routing   disabled             disabled
            <strong>IPv4 forwarding   enabled              enabled</strong>
            IPv6 forwarding   disabled             disabled

           Routing services   "route:default ripng:default"

Routing daemons:

                      STATE   FMRI
                     online   svc:/network/routing/ndp:default
                   disabled   svc:/network/routing/legacy-routing:ipv4
                   disabled   svc:/network/routing/legacy-routing:ipv6
                   disabled   svc:/network/routing/rdisc:default
                   disabled   svc:/network/routing/route:default
                   disabled   svc:/network/routing/ripng:default
</pre>

<p>
次のようにifconfigコマンドを実行してe1000g0とvnic12インタフェースにROUTERフラグが付いていることを確認することもできます。
</p>

<pre>
global# <strong>ifconfig -a</strong>
lo0: flags=2001000849&lt;UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL&gt; mtu 8232 index 1
        inet 127.0.0.1 netmask ff000000
e1000g0: flags=1104843&lt;UP,BROADCAST,RUNNING,MULTICAST,<strong>ROUTER</strong>,IPv4&gt; mtu 1500 index 2
        inet 192.168.1.20 netmask fffffe00 broadcast 192.168.1.255
        ether 8:0:27:a0:72:63
vnic12: flags=1100843&lt;UP,BROADCAST,RUNNING,MULTICAST,<strong>ROUTER</strong>,IPv4&gt; mtu 9000 index 3
        inet 10.1.0.12 netmask ffffff00 broadcast 10.1.0.255
        ether 2:8:20:7e:55:19
lo0: flags=2002000849&lt;UP,LOOPBACK,RUNNING,MULTICAST,IPv6,VIRTUAL&gt; mtu 8252 index 1
        inet6 ::1/128
</pre>


<h2>非大域ゾーンの作成＆インストール</h2>
<p>
前の図にも示しているように、合計４つの非大域ゾーンを作成します。
</p>
<p>
ここではルーターとして動作させるvrouterというゾーンを作成する例を紹介します。
他の非大域ゾーンも使用する仮想NICなどを変更して同様に作成します。
ゾーンのインストール時には外部に存在するIPSパッケージサーバーにアクセスするので、大域ゾーンをインターネットアクセス可能にしておく必要があります。
（閉じたネットワークで検証している場合には少々面倒ですね・・・）
</p>
<p>
以下の構成のポイントはip-type=exclusiveという部分です。従来のゾーンの構成では物理NICが複数ある場合にのみ専用のNICを割り当てるために使用していました。Crossbowの実装により、仮想NICを物理NICと同様に割り当てることが可能になっています。
</p>
<p>
ちなみにip-type=exclusive設定の場合はIPアドレスの指定はゾーン構成で行わず、通常のホストと同様に非大域ゾーン内で行います。
</p>

<pre>
global# <strong>zonecfg -z vrouter</strong>
vrouter: No such zone confi gured
Use 'create' to begin confi guring a new zone.
zonecfg:vrouter> <strong>create</strong>
zonecfg:vrouter> <strong>set zonepath=/export/vrouter</strong>
zonecfg:vrouter> <strong>set autoboot=false</strong>
zonecfg:vrouter> <strong>set ip-type=exclusive</strong>
zonecfg:vrouter> <strong>add net</strong>
zonecfg:vrouter:net> <strong>set physical=vnic10</strong>
zonecfg:vrouter:net> <strong>end</strong>
zonecfg:vrouter> <strong>exit</strong>
global#
</pre>

<pre>
global# <strong>zoneadm -z vrouter install</strong>
A ZFS file system has been created for this zone.
   Publisher: Using opensolaris.org (http://pkg.opensolaris.org/release/).
       Image: Preparing at /export/vrouter/root.
Sanity Check: Looking for 'entire' incorporation.
  Installing: Core System (output follows)
DOWNLOAD                                    PKGS       FILES     XFER (MB)
Completed                                  20/20   3021/3021   42.55/42.55

PHASE                                        ACTIONS
Install Phase                              5747/5747
  Installing: Additional Packages (output follows)
DOWNLOAD                                    PKGS       FILES     XFER (MB)
Completed                                  37/37   5598/5598   32.52/32.52

PHASE                                        ACTIONS
Install Phase                              7332/7332

        Note: Man pages can be obtained by installing SUNWman
 Postinstall: Copying SMF seed repository ... done.
 Postinstall: Applying workarounds.
        Done: Installation completed in 417.576 seconds.

  Next Steps: Boot the zone, then log into the zone console
             (zlogin -C) to complete the configuration process
</pre>

<p>
非大域ゾーンのインストールが完了したら起動して、以下のようにzlogin -Cコマンドでアクセスします。初回起動時にIPアドレス等の設定を促されるので、前述の図のようにvnic10に10.1.0.10/24のIPアドレスを設定します。
</p>

<pre>
global# <strong>zoneadm -z vrouter boot</strong>
global# <strong>zlogin -C vrouter</strong>
...(省略)

System identification is completed.

vrouter console login:
</pre>

<p>
上記のようなメッセージが出たら非大域ゾーンvrouterへのログインが可能です。ここではまだログインせず大域ゾーンに戻ります。
zlogin -C でアクセスした場合は ~. でコンソール接続を切断します。
</p>

<pre>
vrouter console login: <strong>~.</strong>
[Connection to zone 'vrouter' console closed]
global#
</pre>


<p>
他の非大域ゾーンhost11, host21, host22もIPアドレスの構成等を終わらせて以下のように起動している状態にします。
</p>

<pre>
global# <strong>zoneadm list -vc</strong>
  ID NAME             STATUS     PATH                           BRAND    IP
   0 global           running    /                              native   shared
   2 vrouter          running    /export/vrouter                ipkg     excl
   3 host11           running    /export/host11                 ipkg     excl
   4 host21           running    /export/host21                 ipkg     excl
   5 host22           running    /export/host22                 ipkg     excl
</pre>

<p>
この時点ではvrouterをルーターの構成にしていないため、以下のように大域ゾーンで10.2.0.0/24への静的ルートを追加して、ルーティングテーブルを変更してもhost21(10.2.0.21)やhost22(10.2.0.22)にはpingが通らず、同一ネットワークのhost11(10.1.0.11)とvrouter(10.1.0.10)だけにpingが通ります。
</p>

<pre>
global# <strong>route -p add net 10.2.0.0/24 10.1.0.10</strong>
add net 10.2.0.0/24: gateway 10.1.0.10
add persistent net 10.2.0.0/24: gateway 10.1.0.10
global# <strong>netstat -nr</strong>

Routing Table: IPv4
  Destination           Gateway           Flags  Ref     Use     Interface
-------------------- -------------------- ----- ----- ---------- ---------
default              129.158.17.254       UG        1         36 e1000g0
10.1.0.0             10.1.0.12            U         1          2 vnic12
10.2.0.0             10.1.0.10            UG        1          0
129.158.16.0         129.158.16.200       U         1         17 e1000g0
127.0.0.1            127.0.0.1            UH        1         28 lo0

global# <strong>ping 10.1.0.10</strong>
10.1.0.10 is alive
global# <strong>ping 10.1.0.11</strong>
10.1.0.11 is alive
global# <strong>ping 10.2.0.21</strong>
no answer from 10.2.0.21
global# <strong>ping 10.2.0.22</strong>
no answer from 10.2.0.22
</pre>

<p>
また、以下のように大域ゾーンからzloginコマンドでhost21にアクセスし、host21からpingコマンドを実行すると、host22(10.2.0.22)にはpingが通ることが確認できます。ちなみにこの時点ではvrouterのvnic20はまだ有効にしていませんので、vrouterのvsw2側(10.2.0.20)にはアクセスできません。
</p>

<pre>
global# <strong>zlogin host21</strong>
[Connected to zone 'host21' pts/4]
Sun Microsystems Inc.   SunOS 5.11      snv_111b        November 2008
host21# <strong>ping 10.2.0.22</strong>
10.2.0.22 is alive
host21# <strong>ping 10.2.0.20</strong>
no answer from 10.2.0.20
</pre>

<h2>仮想ルーター(vrouter)の構成</h2>

<p>
ここではこのvrouterゾーンを仮想ルーターとして動作させるため、大域ゾーンからvrouterゾーンの構成を変更して仮想NIC(vnic20)を追加します。
以下のようにvrouterゾーンを停止して、zonecfgコマンドで仮想NICであるvnic20を追加し、再びvrouterゾーンを起動します。
</p>

<pre>
global# <strong>zoneadm -z  vrouter halt</strong>
global# <strong>zonecfg -z vrouter</strong>
zonecfg:vrouter> <strong>add net</strong>
zonecfg:vrouter:net> <strong>set physical=vnic20</strong>
zonecfg:vrouter:net> <strong>end</strong>
zonecfg:vrouter> <strong>exit</strong>

global# <strong>zoneadm -z vrouter boot</strong>
</pre>

<p>
vrouterゾーンが起動したら、以下のようにvnic20を構成します。
</p>

<pre>
global# <strong>zlogin vrouter</strong>
[Connected to zone 'vrouter' pts/4]
Last login: Thu Aug 13 17:08:05 on pts/4
Sun Microsystems Inc.   SunOS 5.11      snv_111b        November 2008
vrouter# <strong>ifconfig vnic20 plumb</strong>
vrouter# <strong>ifconfig vnic20 inet 10.2.0.20 netmask 255.255.255.0 up</strong>
vrouter# <strong>ifconfig -a</strong>
lo0: flags=2001000849&lt;UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL&gt; mtu 8232 index 1
        inet 127.0.0.1 netmask ff000000
vnic10: flags=1000843&lt;UP,BROADCAST,RUNNING,MULTICAST,IPv4&gt; mtu 9000 index 2
        inet 10.1.0.10 netmask ffffff00 broadcast 10.1.0.255
        ether 2:8:20:31:dc:bb
vnic20: flags=1000843&lt;UP,BROADCAST,RUNNING,MULTICAST,IPv4&gt; mtu 9000 index 3
        inet 10.2.0.20 netmask ffffff00 broadcast 10.2.0.255
        ether 2:8:20:8f:ef:2e
lo0: flags=2002000849&lt;UP,LOOPBACK,RUNNING,MULTICAST,IPv6,VIRTUAL&gt; mtu 8252 index 1
        inet6 ::1/128
</pre>

<p>
再起動後も有効になるように/etc/hostname.vnic20や/etc/inet/netmasksファイルを作成・編集しておきます。
</p>

<pre>
vrouter# <strong>cat /etc/hostname.vnic20</strong>
10.2.0.20
vrouter# <strong>cat /etc/inet/netmasks</strong>
...(省略)
10.1.0.0        255.255.255.0
10.2.0.0        255.255.255.0
</pre>

<p>
ルーターとして動作するようにipv4-forwardingサービスを有効にして、vnic10とvnic20にROUTERフラグが付いていることを確認します。
</p>

<pre>
vrouter# <strong>svcadm enable ipv4-forwarding</strong>
vrouter# <strong>ifconfig -a</strong>
lo0: flags=2001000849&lt;UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL&gt; mtu 8232 index 1
        inet 127.0.0.1 netmask ff000000
vnic10: flags=1100843&lt;UP,BROADCAST,RUNNING,MULTICAST,<strong>ROUTER</strong>,IPv4&gt; mtu 9000 index 2
        inet 10.1.0.10 netmask ffffff00 broadcast 10.1.0.255
        ether 2:8:20:31:dc:bb
vnic20: flags=1100843&lt;UP,BROADCAST,RUNNING,MULTICAST,<strong>ROUTER</strong>,IPv4&gt; mtu 9000 index 3
        inet 10.2.0.20 netmask ffffff00 broadcast 10.2.0.255
        ether 2:8:20:8f:ef:2e
lo0: flags=2002000849&lt;UP,LOOPBACK,RUNNING,MULTICAST,IPv6,VIRTUAL&gt; mtu 8252 index 1
        inet6 ::1/128
</pre>

<p>
デフォルトルーターを大域ゾーンのvnic12(10.1.0.12)に設定します。これで仮想スイッチvsw2に接続されている非大域ゾーンが、このvrouterを通って、大域ゾーンを経由して外部に接続することができます。（※大域ゾーンのNAT構成に10.2.0.0/24の変換も追加する必要あり！）
</p>

<pre>
vrouter# <strong>route add default 10.1.0.12</strong>
add net default: gateway 10.1.0.12
vrouter# <strong>vi /etc/defaultrouter</strong>
10.1.0.12
</pre>

<p>
再びhost21にzloginコマンドでアクセスし、他の非大域ゾーンとのネットワーク接続を確認します。デフォルトルートの追加を忘れないようにしてください。
</p>

<pre>
global# <strong>zlogin host21</strong>
[Connected to zone 'host21' pts/4]
Last login: Thu Aug 13 17:33:43 on pts/4
Sun Microsystems Inc.   SunOS 5.11      snv_111b        November 2008
host21# <strong>route add default 10.2.0.20</strong>
add net default: gateway 10.2.0.20
host21# <strong>netstat -nr</strong>

Routing Table: IPv4
  Destination           Gateway           Flags  Ref     Use     Interface
-------------------- -------------------- ----- ----- ---------- ---------
default              10.2.0.20            UG        1          2
10.2.0.0             10.2.0.21            U         1         22 vnic21
127.0.0.1            127.0.0.1            UH        1          2 lo0

host21# <strong>ping 10.2.0.22</strong>
10.2.0.22 is alive
host21# <strong>ping 10.2.0.20</strong>
10.2.0.20 is alive
host21# <strong>ping 10.1.0.12</strong>
10.1.0.12 is alive
host21# <strong>ping 192.168.1.100</strong> (外部ホスト)
192.168.1.100 is alive
host21# <strong>ping 10.1.0.11</strong>
no answer from 10.1.0.11
</pre>

<p>
上記結果でhost11(10.1.0.11)にpingが通らないのはhost11上のルーティング構成の問題です。以下のように10.2.0.0/24への静的ルートを登録してけば解決します。
</p>

<pre>
host11# <strong>route -p add net 10.2.0.0/24 10.1.0.10</strong>
add net 10.2.0.0/24: gateway 10.1.0.10
add persistent net 10.2.0.0/24: gateway 10.1.0.10
</pre>

<p>
これで構成完了です。性能面での検証はまだ済んでおりませんが、10ギガビットEthernetを持つ高性能なシステムであれば、ネットワークデバイスが不要で１台で仮想データセンターが構築できてしまいますね。Crossbowがさらに発展していくことを期待しています。
</p>]]>
   </content>
</entry>
<entry>
   <title>Solaris10でDNSサーバー(BIND)を構築する</title>
   <link rel="alternate" type="text/html" href="http://solaris-user.com/dns/solaris10_bind_setup.html" />
   <id>tag:solaris-user.com,2011://1.77</id>
   
   <published>2011-04-14T14:57:05Z</published>
   <updated>2011-04-14T15:00:19Z</updated>
   
   <summary></summary>
   <author>
      <name></name>
      
   </author>
         <category term="DNS関連" scheme="http://www.sixapart.com/ns/types#category" />
   
   <category term="41" label="named" scheme="http://www.sixapart.com/ns/types#tag" />
   
   <content type="html" xml:lang="ja" xml:base="http://solaris-user.com/">
      
      <![CDATA[Solaris 10 1/06 でDNSサーバー(BIND)を構築する。<br>
しかし所詮、BINDなのでゾーンファイルのレコードについての記述は省略する。<br>
<br>
【システム環境】<br>
bash-3.00# <span style="font-weight: bold;">more /etc/release</span><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Solaris 10 1/06 s10s_u1wos_19a SPARC<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Copyright
2005 Sun Microsystems, Inc.&nbsp; All Rights Reserved.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Use is subject to license terms.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Assembled 07 December 2005<br>
bash-3.00# <span style="font-weight: bold;">uname -v</span><br>
Generic_118833-02<br>
<br>
ちなみに Solaris 10 では以下に示すとおり BIND9.2.4 がインストールされている。<br>
<br>
bash-3.00# <span style="font-weight: bold;">named -v</span><br>
BIND 9.2.4<br>
<br>
■　/etc/named.conf ファイルと必要なゾーンファイルの準備<br>
<br>
以下のように /etc/dns に必要なゾーンファイルを作成した。<br>
<br>
bash-3.00# <span style="font-weight: bold;">cd /etc/dns</span><br>
bash-3.00# <span style="font-weight: bold;">ls</span><br>
db.192.168.0&nbsp;&nbsp;&nbsp; db.192.168.204&nbsp; db.hosts<br>
db.192.168.110&nbsp; db.cache&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
db.local<br>
<br>
/etc/named.conf ファイルの作成例は以下のようになる。<br>
今回はSolaris10で今まで通りの設定で動作することを確認することが目的なので全くアクセス制限をしていない。<br>
通常はaclなど定義し、クエリーを受け付けるクライアントを allow-query で制限したり、ゾーン転送を許可するスレーブサーバーを
allow-transfer で制限したり、DHCPなどによる動的更新を許可する場合には allow-update などを使用したりする。<br>
<br>
bash-3.00# <span style="font-weight: bold;">cat /etc/named.conf</span><br>
options {<br>
&nbsp;&nbsp; directory "/etc/dns";<br>
};<br>
<br>
zone "." in {<br>
&nbsp;&nbsp; type hint;<br>
&nbsp;&nbsp; file "db.cache";<br>
};<br>
<br>
zone "suned.sun.com" in {<br>
&nbsp;&nbsp; type master;<br>
&nbsp;&nbsp; file "db.hosts";<br>
};<br>
<br>
zone "0.168.192.in-addr.arpa" in {<br>
&nbsp;&nbsp; type master;<br>
&nbsp;&nbsp; file "db.192.168.0";<br>
};<br>
<br>
zone "110.168.192.in-addr.arpa" in {<br>
&nbsp;&nbsp; type master;<br>
&nbsp;&nbsp; file "db.192.168.110";<br>
};<br>
<br>
zone "204.168.192.in-addr.arpa" in {<br>
&nbsp;&nbsp; type master;<br>
&nbsp;&nbsp; file "db.192.168.204";<br>
};<br>
<br>
zone "0.0.127.in-addr.arpa" in {<br>
&nbsp;&nbsp; type master;<br>
&nbsp;&nbsp; file "db.local";<br>
};<br>
<br>
<br>
■ /etc/nsswitch.conf と /etc/resolv.conf ファイルの準備<br>
<br>
以下のようにネームサービスにDNSを使用するようにnsswitch.confファイルに追加し、resolv.confファイルを作成する。<br>
<br>
bash-3.00# <span style="font-weight: bold;">grep '^hosts'
/etc/nsswitch.conf</span><br>
hosts:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; files dns<br>
bash-3.00# <span style="font-weight: bold;">cat /etc/resolv.conf</span><br>
domain example.com<br>
nameserver 192.168.0.1<br>
<br>
<br>
■ dns/serverサービスの有効化と動作確認<br>
<br>
以下のように svcadm コマンドを使用してnamedデーモンを起動する。<br>
<br>
bash-3.00# <span style="font-weight: bold;">svcadm -v enable dns/server</span><br>
svc:/network/dns/server:default が有効になりました。<br>
bash-3.00# <span style="font-weight: bold;">svcs -p dns/server</span><br>
STATE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
STIME&nbsp;&nbsp;&nbsp; FMRI<br>
online&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 18:27:45
svc:/network/dns/server:default<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
18:27:45&nbsp;&nbsp;&nbsp;&nbsp; 7570 named<br>
<br>
上記のように named デーモンがプロセスID 7570 で稼働していることがわかる。<br>
あとは nslookup コマンドや dig コマンドで簡単に動作確認をしてみる。<br>
<br>
bash-3.00# <span style="font-weight: bold;">nslookup</span><br>
&gt; <span style="font-weight: bold;">s10test</span><br>
Server:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 192.168.0.1<br>
Address:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 192.168.0.1#53<br>
<br>
Name:&nbsp;&nbsp; s10test.example.com<br>
Address: 192.168.0.102<br>
&gt;<br>
<br>
<br>
========================================<br>
※詳しい情報は以下のトレーニングコース参照<br>
<a href="http://education.oracle.com/pls/web_prod-plq-dad/db_pages.getcoursedesc?dc=D66692JP10" target="_blank">Solaris 10 ネットワーク管理 II</a><br>
========================================<br>]]>
   </content>
</entry>
<entry>
   <title>reserved_procs ：プロセス規模調整パラメータ</title>
   <link rel="alternate" type="text/html" href="http://solaris-user.com/kernel_parameter/reserved_procs.html" />
   <id>tag:solaris-user.com,2011://1.76</id>
   
   <published>2011-04-14T14:53:49Z</published>
   <updated>2011-04-14T14:57:41Z</updated>
   
   <summary></summary>
   <author>
      <name></name>
      
   </author>
         <category term="カーネルパラメータ関連" scheme="http://www.sixapart.com/ns/types#category" />
   
   
   <content type="html" xml:lang="ja" xml:base="http://solaris-user.com/">
      
      <![CDATA[<dl>
  <dt><br>
  </dt>
  <dt><span style="font-weight: bold;">説明</span> </dt>
  <dd>
    <p><a name="indexterm-14"></a>UIDが root (0)
のプロセス用に、プロセステーブルで確保するシステムプロセススロット数を指定します。たとえば、<tt>fsflush</tt> には root
(0) の UID が与えられます。</p>
  </dd>
  <dt><span style="font-weight: bold;">データ型</span> </dt>
  <dd>
    <p>符号付き整数</p>
  </dd>
  <dt><span style="font-weight: bold;">デフォルト</span> </dt>
  <dd>
    <p>5</p>
  </dd>
  <dt><span style="font-weight: bold;">範囲</span> </dt>
  <dd>
    <p>5 から MAXINT</p>
  </dd>
  <dt><span style="font-weight: bold;">単位</span> </dt>
  <dd>
    <p>プロセス</p>
  </dd>
  <dt><span style="font-weight: bold;">動的か</span> </dt>
  <dd>
    <p>いいえ。最初のパラメータ計算の後は使用されません。</p>
  </dd>
  <dt><span style="font-weight: bold;">検査</span> </dt>
  <dd>
    <p>Solaris 8 以降のリリースでは、どのような <kbd>/etc/system</kbd> 設定でも有効です。</p>
  </dd>
  <dt><span style="font-weight: bold;">コミットレベル</span> </dt>
  <dd>
    <p>変更の可能性あり</p>
  </dd>
  <dt><span style="font-weight: bold;">どのような場合に変更するか</span> </dt>
  <dd>
    <p>たとえば、システムの UID 0 (root) のプロセスの数を、通常の値から 10
大きくした場合を考えてみてください。この設定をしないとユーザーレベルのプロセスを作れないような状況でも、この設定を行うことによって root
でシェルを起動するために必要な余裕が生まれます。</p>
  </dd>

</dl>]]>
   </content>
</entry>
<entry>
   <title>pidmax ：プロセス規模調整パラメータ</title>
   <link rel="alternate" type="text/html" href="http://solaris-user.com/kernel_parameter/pidmax.html" />
   <id>tag:solaris-user.com,2011://1.75</id>
   
   <published>2011-04-14T14:53:13Z</published>
   <updated>2011-04-14T14:54:58Z</updated>
   
   <summary></summary>
   <author>
      <name></name>
      
   </author>
         <category term="カーネルパラメータ関連" scheme="http://www.sixapart.com/ns/types#category" />
   
   
   <content type="html" xml:lang="ja" xml:base="http://solaris-user.com/">
      
      <![CDATA[<dl>
  <dt><br>
  </dt>
  <dt><span style="font-weight: bold;">説明</span> </dt>
  <dd>
    <p><a name="indexterm-15"></a>使用可能な最大プロセス ID の値を指定します。これは Solaris 8
以降のリリースで有効です。</p>
    <p><a name="indexterm-16"></a><tt>pidmax</tt> では <tt>maxpid</tt>
変数の値を設定します。したがって、<tt>maxpid</tt> がいったん設定されると、<tt>pidmax</tt> は無視されます。<tt>maxpid</tt>
は、カーネルの別のところで、最大のプロセス ID を判別したり、妥当性検査を行うために使用されます。</p>
    <p><kbd>/etc/system</kbd> ファイルに <tt>maxpid</tt>
エントリを追加して設定しようとしても、効果はありません。</p>
  </dd>
  <dt><span style="font-weight: bold;">データ型</span> </dt>
  <dd>
    <p>符号付き整数</p>
  </dd>
  <dt><span style="font-weight: bold;">デフォルト</span> </dt>
  <dd>
    <p>30,000</p>
  </dd>
  <dt><span style="font-weight: bold;">範囲</span> </dt>
  <dd>
    <p>266 から 999,999</p>
  </dd>
  <dt><span style="font-weight: bold;">単位</span> </dt>
  <dd>
    <p>プロセス</p>
  </dd>
  <dt><span style="font-weight: bold;">動的か</span> </dt>
  <dd>
    <p>いいえ。<tt>pidmax</tt> の値を設定するためにブート時だけ使用されます。</p>
  </dd>
  <dt><span style="font-weight: bold;">検査</span> </dt>
  <dd>
    <p>はい。<a href="http://solaris-user.com/kernel_parameter/reserved_procs.html"><tt>reserved_procs</tt></a> の値と 999,999 に対して値を比較します。<tt>reserved_procs</tt>
より小さい場合、または 999,999 より大きい場合、値は 999,999 に設定されます。</p>
  </dd>
  <dt><span style="font-weight: bold;">暗黙的制約</span> </dt>
  <dd>
    <p><a href="http://solaris-user.com/kernel_parameter/max_nprocs.html"><tt>max_nprocs</tt></a> に対して範囲の検査が行われ、<tt>max_nprocs</tt>
は常にこの値以下に保たれます。</p>
  </dd>
  <dt><span style="font-weight: bold;">どのような場合に変更するか</span> </dt>
  <dd>
    <p>システム上で 30,000 を超える数のプロセスをサポートできるようにするために必要です。</p>
  </dd>
  <dt><span style="font-weight: bold;">コミットレベル</span> </dt>
  <dd>
    <p>変更の可能性あり</p>
  </dd>

</dl>]]>
   </content>
</entry>
<entry>
   <title>ncsize ：一般的なファイルシステムパラメータ</title>
   <link rel="alternate" type="text/html" href="http://solaris-user.com/kernel_parameter/ncsize.html" />
   <id>tag:solaris-user.com,2011://1.74</id>
   
   <published>2011-04-14T14:51:22Z</published>
   <updated>2011-04-14T14:53:03Z</updated>
   
   <summary></summary>
   <author>
      <name></name>
      
   </author>
         <category term="カーネルパラメータ関連" scheme="http://www.sixapart.com/ns/types#category" />
   
   
   <content type="html" xml:lang="ja" xml:base="http://solaris-user.com/">
      
      <![CDATA[<dl>
  <dt><br>
  </dt>
  <dt><span style="font-weight: bold;">説明</span> </dt>
  <dd>
    <p><a name="indexterm-39"></a>ディレクトリ名検索キャッシュ (DNLC)
のエントリ数を指定します。このパラメータは、UFS や NFS が、解決されたパス名の要素をキャッシュするときに使用します。</p>
    <p>Solaris 8 6/00 リリース以降、DNLC
は否定的な検索情報もキャッシュします。つまり、キャッシュ内で検出されない名前がキャッシュされます。</p>
  </dd>
  <dt><span style="font-weight: bold;">データ型</span> </dt>
  <dd>
    <p>符号付き整数</p>
  </dd>
  <dt><span style="font-weight: bold;">デフォルト</span> </dt>
  <dd>
    <p>(4 x (<tt>v.v_proc</tt> + <a href="http://solaris-user.com/kernel_parameter/maxusers.html"><tt>maxusers</tt></a>) + 320) + (4 x (<tt>v.v_proc</tt>
+ <a href="http://solaris-user.com/kernel_parameter/maxusers.html"><tt>maxusers</tt></a>) + 320 / 100</p>
  </dd>
  <dt><span style="font-weight: bold;">範囲</span> </dt>
  <dd>
    <p>0 から <tt>MAXINT</tt> </p>
  </dd>
  <dt><span style="font-weight: bold;">単位</span> </dt>
  <dd>
    <p>DNLC のエントリ</p>
  </dd>
  <dt><span style="font-weight: bold;">動的か</span> </dt>
  <dd>
    <p>いいえ</p>
  </dd>
  <dt><span style="font-weight: bold;">検査</span> </dt>
  <dd>
    <p>なし。値を増やすと、ファイルシステムのアンマウントに必要な時間が増えます。これは、アンマウントプロセスでそのファイルシステムのエン
トリをキャッシュから削除する必要があるためです。</p>
  </dd>
  <dt><span style="font-weight: bold;">どのような場合に変更するか</span> </dt>
  <dd>
    <p>Solaris 8 6/00 より前のリリースでは、キャッシュが小さすぎるかどうかを判定するのは困難でした。これを推定するには、<tt>kstat
-n ncstats</tt>
が返したエントリ数に着目します。システムの負荷やファイルアクセスのパターンに較べこの値が大きいように思われる場合は、DNLC
のサイズに原因があるかもしれません。</p>
    <p>Solaris 8 6/00 リリース以降では、<tt>kstat -n dnlcstats</tt>
コマンドを使用して、DNLC が小さすぎるために DNLC からエントリが削除されたことを知ることができます。<tt>pick_heuristic</tt>
パラメータと <tt>pick_last</tt> パラメータの合計は、キャッシュが小さすぎるために再利用されたエントリ
(そうでなければ有効であったはずのエントリ) の数を表します。</p>
    <p><tt>ncsize</tt> の値が大きすぎると、システムに直接的な影響があります。システムは、<tt>ncsize</tt>
の値に基づいて DNLC の一連のデータ構造体を割り当てるからです。32 ビットカーネルが動作しているシステムは <tt>ncsize</tt>
に 36 バイトの構造体を、64 ビットカーネルが動作しているシステムは <tt>ncsize</tt> に 64
バイトの構造体をそれぞれ割り当てます。<tt>ufs_ninode</tt> と <tt>nfs:nrnode</tt>
が明示的に設定されていないと、この値は UFS と NFS にさらに影響を与えます。</p>
  </dd>
  <dt><span style="font-weight: bold;">コミットレベル</span> </dt>
  <dd>
    <p>変更の可能性あり</p>
  </dd>

</dl>]]>
   </content>
</entry>
<entry>
   <title>maxusers ：プロセス規模調整パラメータ</title>
   <link rel="alternate" type="text/html" href="http://solaris-user.com/kernel_parameter/maxusers.html" />
   <id>tag:solaris-user.com,2011://1.73</id>
   
   <published>2011-04-14T14:50:41Z</published>
   <updated>2011-04-14T14:53:04Z</updated>
   
   <summary></summary>
   <author>
      <name></name>
      
   </author>
         <category term="カーネルパラメータ関連" scheme="http://www.sixapart.com/ns/types#category" />
   
   
   <content type="html" xml:lang="ja" xml:base="http://solaris-user.com/">
      
      <![CDATA[<dl>
  <dt><span style="font-weight: bold;">説明</span> </dt>
  <dd>
    <p><a name="indexterm-13"></a><tt>maxusers</tt>
は、当初、システムがサポートできるログインユーザーの数を指定するものでした。カーネルの生成時に、この設定値に基づいて各種テーブルの大きさが決定さ
れました。現在の Solaris リリースでは、規模調節の大半をシステム上のメモリー容量に基づいて行います。したがって、<tt>maxusers</tt>
の使い方がこれまでとは大きく変わりました。引き続き、<tt>maxusers</tt>
に基づいて決定されるサブシステムには以下のものがあります。</p>
    <ul>
      <li>
        <p>システムで使用できるプロセスの最大数</p>
      </li>
      <li>
        <p>システムに保持される割り当て構造体の数</p>
      </li>
      <li>
        <p>ディレクトリ名検索キャッシュ (DNLC) の大きさ</p>
      </li>
    </ul>
  </dd>
  <dt><span style="font-weight: bold;">データ型</span> </dt>
  <dd>
    <p>符号付き整数</p>
  </dd>
  <dt><span style="font-weight: bold;">デフォルト</span> </dt>
  <dd>
    <p>M バイト単位のメモリー総量か 2048 (小さい方)</p>
  </dd>
  <dt><span style="font-weight: bold;">範囲</span> </dt>
  <dd>
    <p><kbd>/etc/system</kbd> ファイルに設定されていない場合は、物理メモリーに基づいて、1 から 2048。</p>
    <p><kbd>/etc/system</kbd> ファイルに設定されている場合は、1 から 4096。</p>
  </dd>
  <dt><span style="font-weight: bold;">単位</span> </dt>
  <dd>
    <p>ユーザー</p>
  </dd>
  <dt><span style="font-weight: bold;">動的か</span> </dt>
  <dd>
    <p>いいえ。このパラメータに依存する変数を計算した後に <tt>maxusers</tt> が再び参照されることはありません。</p>
  </dd>
  <dt><span style="font-weight: bold;">検査</span> </dt>
  <dd>
    <p>なし</p>
  </dd>
  <dt><span style="font-weight: bold;">どのような場合に変更するか</span> </dt>
  <dd>
    <p>システムによって計算されたデフォルトのユーザープロセス数が小さすぎる場合。このような状況は、システムコンソールに表示される次のメッ
セージでわかります</p>
    <table cellpadding="1" width="100%" border="1">
      <tbody>
        <tr>
          <td nowrap="nowrap">
          <pre>out of processes</pre>
          </td>
        </tr>
      </tbody>
    </table>
    <p>次の状況のように、デフォルトのプロセス数が多すぎる場合に、このパラメータを変更するかもしれません。</p>
    <ul>
      <li>
        <p>多量のメモリーがあり、動作しているプロセスの数が比較的少ないデータベースサーバーでは、<tt>maxusers</tt>
のデフォルト値を少なくすることによってシステムメモリーを節約できます。</p>
      </li>
      <li>
        <p>多量のメモリーがあり、動作しているプロセスがほとんどないファイルサーバーでは、この値を減らせる場合があります。しかし、その
場合、DNLCのサイズを明示的に設定する必要があります。<a href="http://solaris-user.com/kernel_parameter/ncsize.html"><tt>ncsize</tt></a> を参照してください。</p>
      </li>
      <li>
        <p>多量のメモリーがあり、動作しているプロセスがほとんどない計算サーバーでは、この値を減らせる場合があります。</p>
      </li>
    </ul>
  </dd>
  <dt><span style="font-weight: bold;">コミットレベル</span> </dt>
  <dd>
    <p>変更の可能性あり</p>
  </dd>
</dl>]]>
   </content>
</entry>
<entry>
   <title>maxuprc ：プロセス規模調整パラメータ</title>
   <link rel="alternate" type="text/html" href="http://solaris-user.com/kernel_parameter/maxuprc.html" />
   <id>tag:solaris-user.com,2011://1.72</id>
   
   <published>2011-04-14T14:49:20Z</published>
   <updated>2011-04-14T14:51:05Z</updated>
   
   <summary></summary>
   <author>
      <name></name>
      
   </author>
         <category term="カーネルパラメータ関連" scheme="http://www.sixapart.com/ns/types#category" />
   
   
   <content type="html" xml:lang="ja" xml:base="http://solaris-user.com/">
      
      <![CDATA[<dl>
  <dt><br>
  </dt>
  <dt><span style="font-weight: bold;">説明</span> </dt>
  <dd>
    <p><a name="indexterm-18"></a>個々のユーザーがシステム上に作成できるプロセスの最大数を指定します。</p>
  </dd>
  <dt><span style="font-weight: bold;">データ型</span> </dt>
  <dd>
    <p>符号付き整数</p>
  </dd>
  <dt><span style="font-weight: bold;">デフォルト</span> </dt>
  <dd>
    <p><a href="http://solaris-user.com/kernel_parameter/max_nprocs.html"><tt>max_nprocs</tt></a> - <a href="http://solaris-user.com/kernel_parameter/reserved_procs.html"><tt>reserved_procs</tt></a> </p>
  </dd>
  <dt><span style="font-weight: bold;">範囲</span> </dt>
  <dd>
    <p>1 から <a href="http://solaris-user.com/kernel_parameter/max_nprocs.html"><tt>max_nprocs</tt></a> - <a href="http://solaris-user.com/kernel_parameter/reserved_procs.html"><tt>reserved_procs</tt></a> </p>
  </dd>
  <dt><span style="font-weight: bold;">単位</span> </dt>
  <dd>
    <p>プロセス</p>
  </dd>
  <dt><span style="font-weight: bold;">動的か</span> </dt>
  <dd>
    <p>いいえ</p>
  </dd>
  <dt><span style="font-weight: bold;">検査</span> </dt>
  <dd>
    <p>はい。この値は <a href="http://solaris-user.com/kernel_parameter/max_nprocs.html"><tt>max_nprocs</tt></a> - <a href="http://solaris-user.com/kernel_parameter/reserved_procs.html"><tt>reserved_procs</tt></a> と比較され、2
つの値のうちの小さい方に設定されます。</p>
  </dd>
  <dt><span style="font-weight: bold;">どのような場合に変更するか</span> </dt>
  <dd>
    <p>1 ユーザーが作成できるプロセスの数を強く制限するために、デフォルト値より小さい値を指定したい場合
(システムが作成できるプロセスの数が多くても)。この限度を超えると、次の警告メッセージがコンソールかメッセージファイルに出力されます。</p>
    <table cellpadding="1" width="100%" border="1">
      <tbody>
        <tr>
          <td nowrap="nowrap">
          <pre>out of per-user processes for uid <var>N</var><br></pre>
          </td>
        </tr>
      </tbody>
    </table>
  </dd>
  <dt><span style="font-weight: bold;">コミットレベル</span> </dt>
  <dd>
    <p>変更の可能性あり</p>
  </dd>

</dl>]]>
   </content>
</entry>

</feed>

