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

<channel>
	<title>MIRROR | 徒然なるままに</title>
	<atom:link href="https://www.seichan.org/tag/mirror/feed" rel="self" type="application/rss+xml" />
	<link>https://www.seichan.org</link>
	<description>徒然と日々の出来事(ネタ)を書いていこうかと．主に FreeBSD，Unix系の話題が中心ですが，その他の話題もあつかってみたり．</description>
	<lastBuildDate>Sun, 24 Mar 2024 00:43:02 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1.2</generator>
	<item>
		<title>GEOM MIRROR (ミラーリング/RAID1) を使ってみる (2)</title>
		<link>https://www.seichan.org/2023/12/geom-mirror-%e3%83%9f%e3%83%a9%e3%83%bc%e3%83%aa%e3%83%b3%e3%82%b0-raid1-%e3%82%92%e4%bd%bf%e3%81%a3%e3%81%a6%e3%81%bf%e3%82%8b-2.html</link>
					<comments>https://www.seichan.org/2023/12/geom-mirror-%e3%83%9f%e3%83%a9%e3%83%bc%e3%83%aa%e3%83%b3%e3%82%b0-raid1-%e3%82%92%e4%bd%bf%e3%81%a3%e3%81%a6%e3%81%bf%e3%82%8b-2.html#respond</comments>
		
		<dc:creator><![CDATA[seichan]]></dc:creator>
		<pubDate>Mon, 04 Dec 2023 13:00:00 +0000</pubDate>
				<category><![CDATA[GEOM]]></category>
		<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[MIRROR]]></category>
		<category><![CDATA[RAID]]></category>
		<guid isPermaLink="false">https://www.seichan.org/blog/?p=858</guid>

					<description><![CDATA[前回に引き続き GEOM によるディスクのミラーリング (RAID1) について纏めてみたいと思います．前回は作成・削除・拡張について説明しましたが，今回は主に拡張の別のアプローチや管理面の説明となります． 目次 GEO [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">前回に引き続き GEOM によるディスクのミラーリング (RAID1) について纏めてみたいと思います．<br>前回は作成・削除・拡張について説明しましたが，今回は主に拡張の別のアプローチや管理面の説明となります．</p>



<ul class="wp-block-list">
<li>GEOM に関するお話
<ul class="wp-block-list">
<li><a href="https://www.seichan.org/2023/11/freebsd-geom-%e5%86%8d%e3%80%85%e5%ad%a6%e7%bf%92.html" target="_blank">FreeBSD GEOM 再々学習</a></li>



<li><a href="https://www.seichan.org/2023/12/geom-concat-%e3%83%87%e3%82%a3%e3%82%b9%e3%82%af%e3%81%ae%e9%80%a3%e7%b5%90-%e3%82%92%e4%bd%bf%e3%81%a3%e3%81%a6%e3%81%bf%e3%82%8b.html" target="_blank">GEOM CONCAT (ディスクの連結) を使ってみる</a></li>



<li><a href="https://www.seichan.org/2023/12/geom-stripe-%e3%82%b9%e3%83%88%e3%83%a9%e3%82%a4%e3%83%97-raid0-%e3%82%92%e4%bd%bf%e3%81%a3%e3%81%a6%e3%81%bf%e3%82%8b.html" target="_blank">GEOM STRIPE (ストライプ/RAID0) を使ってみる</a></li>



<li><a href="https://www.seichan.org/2023/12/geom-mirror-%e3%83%9f%e3%83%a9%e3%83%bc%e3%83%aa%e3%83%b3%e3%82%b0-raid1-%e3%82%92%e4%bd%bf%e3%81%a3%e3%81%a6%e3%81%bf%e3%82%8b-1.html" target="_blank">GEOM MIRROR (ミラーリング/RAID1) を使ってみる (1)</a></li>



<li><a href="https://www.seichan.org/2023/12/geom-mirror-%e3%83%9f%e3%83%a9%e3%83%bc%e3%83%aa%e3%83%b3%e3%82%b0-raid1-%e3%82%92%e4%bd%bf%e3%81%a3%e3%81%a6%e3%81%bf%e3%82%8b-2.html" target="_blank">GEOM MIRROR (ミラーリング/RAID1) を使ってみる (2)</a></li>



<li><a href="https://www.seichan.org/2023/12/geom-stripe-mirror-%e3%81%a7-raid10-%e3%82%92%e6%a7%8b%e6%88%90%e3%81%97%e3%81%a6%e3%81%bf%e3%82%8b.html" target="_blank">GEOM STRIPE + MIRROR で RAID10 を構成してみる</a></li>



<li><a href="https://www.seichan.org/2023/12/geom-raid3%e3%82%92%e4%bd%bf%e3%81%a3%e3%81%a6%e3%81%bf%e3%82%8b.html" target="_blank">GEOM RAID3を使ってみる</a></li>



<li><a href="https://www.seichan.org/2023/12/geom-cache-%e3%82%92%e4%bd%bf%e3%81%a3%e3%81%a6%e3%81%bf%e3%82%8b.html" target="_blank">GEOM CACHE を使ってみる</a></li>



<li><a href="https://www.seichan.org/2023/12/geom-gvirstor%e3%82%92%e4%bd%bf%e3%81%a3%e3%81%a6%e3%81%bf%e3%82%8b.html" target="_blank">GEOM GVIRSTORを使ってみる</a></li>



<li><a href="https://www.seichan.org/2023/12/geom-gate-%e3%82%92%e4%bd%bf%e3%81%a3%e3%81%a6%e3%81%bf%e3%82%8b.html" target="_blank">GEOM GATE を使ってみる</a></li>



<li><a href="https://www.seichan.org/2023/12/geom-label-%e3%81%a7%e5%90%8d%e5%89%8d%e3%81%ab%e3%82%88%e3%82%8b%e7%ae%a1%e7%90%86%e3%82%92%e8%a1%8c%e3%81%86.html" target="_blank">GEOM LABEL で名前による管理を行う</a></li>



<li><a href="https://www.seichan.org/2023/12/geom-part-%e3%81%a7%e3%83%87%e3%82%a3%e3%82%b9%e3%82%af%e3%83%91%e3%83%bc%e3%83%86%e3%82%a3%e3%82%b7%e3%83%a7%e3%83%b3%e3%81%ae%e7%ae%a1%e7%90%86%e3%82%92%e8%a1%8c%e3%81%86.html" target="_blank">GEOM PART でディスクパーティションの管理を行う</a></li>



<li><a href="https://www.seichan.org/2023/12/geom-multipath-%e3%81%a7%e3%83%9e%e3%83%ab%e3%83%81%e3%83%91%e3%82%b9%e3%82%92%e6%a7%8b%e6%88%90%e3%81%99%e3%82%8b-1.html" target="_blank">GEOM MULTIPATH でマルチパスを構成する (1)</a></li>



<li><a href="https://www.seichan.org/2023/12/geom-multipath-%e3%81%a7%e3%83%9e%e3%83%ab%e3%83%81%e3%83%91%e3%82%b9%e3%82%92%e6%a7%8b%e6%88%90%e3%81%99%e3%82%8b-2.html" target="_blank">GEOM MULTIPATH でマルチパスを構成する (2)</a></li>
</ul>
</li>
</ul>


<div class=".for-sp">
<div class="table">
<span class="body">
<!-- imobile wiki_上部_SP_1 -->
<script type="text/javascript">
 imobile_tag_ver = "0.3"; 
 imobile_pid = "81546"; 
 imobile_asid = "1846007"; 
 imobile_type = "inline";
</script>
<script type="text/javascript" src="https://spad.i-mobile.co.jp/script/adssp.js?20110215"></script>
<!-- imobile wiki_上部_SP_1 -->
</span>
<span class="body">
<!-- imobile wiki_下部_SP_1 -->
<script type="text/javascript">
 imobile_tag_ver = "0.3"; 
 imobile_pid = "81546"; 
 imobile_asid = "1846017"; 
 imobile_type = "inline";
</script>
<script type="text/javascript" src="https://spad.i-mobile.co.jp/script/adssp.js?20110215"></script>
<!-- imobile wiki_下部_SP_1 -->
</span>
</div>
</div>

<div class=".for-pc">
<div class="table">
<span class="body">
<!-- imobile blog_seichan_記事中_1 -->
<script type="text/javascript">
 imobile_pid = "81546"; 
 imobile_asid = "1846028"; 
 imobile_width = 300; 
 imobile_height = 250;
</script>
<script type="text/javascript" src="https://spdeliver.i-mobile.co.jp/script/ads.js?20101001"></script>
<!-- imobile blog_seichan_記事中_1 -->
</span>
<span class="body">
<!-- imobile blog_seichan_記事中_2 -->
<script type="text/javascript">
 imobile_pid = "81546"; 
 imobile_asid = "1845876"; 
 imobile_width = 300; 
 imobile_height = 250;
</script>
<script type="text/javascript" src="https://spdeliver.i-mobile.co.jp/script/ads.js?20101001"></script>
<!-- imobile blog_seichan_記事中_2 -->
</span>
</div>
</div>




  <div id="toc" class="toc tnt-number toc-center tnt-number border-element"><input type="checkbox" class="toc-checkbox" id="toc-checkbox-2" checked><label class="toc-title" for="toc-checkbox-2">目次</label>
    <div class="toc-content">
    <ol class="toc-list open"><li><a href="#toc1" tabindex="0">GEOM CONCAT を併用してディスクを拡張する</a><ol><li><a href="#toc2" tabindex="0">mirror0 をコンカチデバイスの配下に組み入れる</a></li><li><a href="#toc3" tabindex="0">追加用の mirror ボリュームを作成する</a></li><li><a href="#toc4" tabindex="0">追加した mirror ボリュームをコンカチに組み入れる</a></li></ol></li><li><a href="#toc5" tabindex="0">GEOM MIRROR 管理</a></li><li><a href="#toc6" tabindex="0">読み出し方式の変更</a></li><li><a href="#toc7" tabindex="0">リビルド処理の自動化・手動化</a></li></ol>
    </div>
  </div>

<h2 class="wp-block-heading"><span id="toc1">GEOM CONCAT を併用してディスクを拡張する</span></h2>



<p class="wp-block-paragraph">前回は玉突きで大きなディスクに入れ替える．という手法を紹介しました．今回は別のアプローチとして，ミラーリング + コンカチ を紹介します．<br><strong>GEOM は重ね掛けでの利用が可能</strong>ですのでこういった方法も可能です．<br>拡張のイメージはこのような形です．</p>



<figure class="wp-block-image aligncenter size-large"><img fetchpriority="high" decoding="async" width="546" height="499" src="https://www.seichan.org/blog/wp-content/uploads/2023/12/image-9-546x499.png" alt="" class="wp-image-859" srcset="https://www.seichan.org/blog/wp-content/uploads/2023/12/image-9-546x499.png 546w, https://www.seichan.org/blog/wp-content/uploads/2023/12/image-9-300x274.png 300w, https://www.seichan.org/blog/wp-content/uploads/2023/12/image-9.png 691w" sizes="(max-width: 546px) 100vw, 546px" /></figure>



<p class="wp-block-paragraph">このような拡張を事前に考慮している場合は最初からコンカチまで GEOM でやっていればいいのですが，後から拡張したい場合もあると思います．<br>そのようなシチュエーションを考え，以下の流れでの拡張を紹介します．</p>



<figure class="wp-block-image aligncenter size-large is-resized"><img decoding="async" width="546" height="152" src="https://www.seichan.org/blog/wp-content/uploads/2023/12/image-10-546x152.png" alt="" class="wp-image-860" style="width:839px;height:auto" srcset="https://www.seichan.org/blog/wp-content/uploads/2023/12/image-10-546x152.png 546w, https://www.seichan.org/blog/wp-content/uploads/2023/12/image-10-300x84.png 300w, https://www.seichan.org/blog/wp-content/uploads/2023/12/image-10-768x214.png 768w, https://www.seichan.org/blog/wp-content/uploads/2023/12/image-10-1536x429.png 1536w, https://www.seichan.org/blog/wp-content/uploads/2023/12/image-10-2048x571.png 2048w" sizes="(max-width: 546px) 100vw, 546px" /></figure>



<p class="wp-block-paragraph">現状は上図の一番左の状態とします．</p>



<pre class="EnlighterJSRAW" data-enlighter-language="shell" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">gmirror status
          Name    Status  Components
mirror/mirror0  COMPLETE  da1 (ACTIVE)
                          da2 (ACTIVE)

# df
Filesystem          1K-blocks    Used    Avail Capacity  Mounted on
/dev/da0p2           19279260 2591092 15145828    15%    /
devfs                       1       1        0   100%    /dev
/dev/mirror/mirror0 101561752   62888 93373924     0%    /mnt</pre>



<h3 class="wp-block-heading"><span id="toc2">mirror0 をコンカチデバイスの配下に組み入れる</span></h3>



<p class="wp-block-paragraph">まずはこの mirror0 デバイスをコンカチデバイスとして取り扱います．<strong><em>gconcat label</em></strong> で実行しますが，マウントしている状態だとこれは出来ない為，一度マウントを解除の上コマンドを発行します．</p>



<pre class="EnlighterJSRAW" data-enlighter-language="shell" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group=""># umount /mnt

# gconcat label concat0 /dev/mirror/mirror0

# gconcat status
          Name  Status  Components
concat/concat0      UP  mirror/mirror0</pre>



<p class="wp-block-paragraph"><strong><em>status</em></strong> サブコマンドで UP の状態であれば，このデバイスをマウントする事が可能です．データは mirror0 の時の物がそのまま維持されています．</p>



<pre class="EnlighterJSRAW" data-enlighter-language="shell" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group=""># mount /dev/concat/concat0 /mnt

# ls /mnt
.snap           random.img</pre>



<h3 class="wp-block-heading"><span id="toc3">追加用の mirror ボリュームを作成する</span></h3>



<p class="wp-block-paragraph">続いて，拡張用の RAID1 ボリュームの mirror1 を作成します．<br><strong><em>label</em></strong> サブコマンドを用いて新しいミラーボリュームを作成，<strong><em>status</em></strong> サブコマンドで <strong>COMPLETE / ACTIVE</strong> を確認します．</p>



<pre class="EnlighterJSRAW" data-enlighter-language="shell" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group=""># gmirror label mirror1 da3 da4

# gmirror status
          Name    Status  Components
mirror/mirror0  COMPLETE  da1 (ACTIVE)
                          da2 (ACTIVE)
mirror/mirror1  COMPLETE  da3 (ACTIVE)
                          da4 (ACTIVE)</pre>



<h3 class="wp-block-heading"><span id="toc4">追加した mirror ボリュームをコンカチに組み入れる</span></h3>



<p class="wp-block-paragraph">続いて，作成した mirror1 を concat0 に追加を行います．「<a href="https://www.seichan.org/2023/12/geom-concat-%e3%83%87%e3%82%a3%e3%82%b9%e3%82%af%e3%81%ae%e9%80%a3%e7%b5%90-%e3%82%92%e4%bd%bf%e3%81%a3%e3%81%a6%e3%81%bf%e3%82%8b.html" target="_blank">GEOM CONCAT (ディスクの連結) を使ってみる</a>」の「<a href="https://www.seichan.org/2023/12/geom-concat-%e3%83%87%e3%82%a3%e3%82%b9%e3%82%af%e3%81%ae%e9%80%a3%e7%b5%90-%e3%82%92%e4%bd%bf%e3%81%a3%e3%81%a6%e3%81%bf%e3%82%8b.html#toc6" target="_blank">ディスクを拡張する</a>」でも触れていますが，オンラインのままではできません．<br>ですので実際は上記でマウントを行っていますが行わずに一気に拡張をやってしまった方が時間は節約できます．<br>ただ，オペレーションの都度確認を入れたほうが安全ではあります．</p>



<p class="wp-block-paragraph">以下一気に記載をしてしまっていますが，<br>アンマウントを行い，<strong><em>gconcat label</em></strong> で mirror1 の追加を行っています．<br>その後ステータスを確認してマウントを行っています．この状態だとまだ容量は増えていません．<br>最後に <strong><em>growfs</em></strong> でファイルシステムの拡張を行いました．<br>なお，<strong><em>growfs</em></strong> はオンライン/オフラインどちらでも実施が可能です．</p>



<pre class="EnlighterJSRAW" data-enlighter-language="shell" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group=""># umount /mnt

# gconcat label concat0 /dev/mirror/mirror0 /dev/mirror/mirror1

# gconcat status
          Name  Status  Components
concat/concat0      UP  mirror/mirror0
                        mirror/mirror1
# gconcat list
Geom name: concat0
State: UP
Status: Total=2, Online=2
Type: AUTOMATIC
ID: 945551655
Providers:
1. Name: concat/concat0
   Mediasize: 214748362752 (200G)
   Sectorsize: 512
   Mode: r0w0e0
Consumers:
1. Name: mirror/mirror0
   Mediasize: 107374181888 (100G)
   Sectorsize: 512
   Mode: r0w0e0
   Start: 0
   End: 107374181376
2. Name: mirror/mirror1
   Mediasize: 107374181888 (100G)
   Sectorsize: 512
   Mode: r0w0e0
   Start: 107374181376
   End: 214748362752

# mount /dev/concat/concat0 /mnt

# growfs /dev/concat/concat0
Device is mounted read-write; resizing will result in temporary write suspension for /mnt.
It's strongly recommended to make a backup before growing the file system.
OK to grow filesystem on /dev/concat/concat0, mounted on /mnt, from 100GB to 200GB? [yes/no] yes
super-block backups (for fsck_ffs -b #) at:
 209993664, 211274112, 212554560, 213835008, 215115456, 216395904, 217676352, 218956800, 220237248, 221517696, 222798144,
 224078592, 225359040, 226639488, 227919936, 229200384, 230480832, 231761280, 233041728, 234322176, 235602624, 236883072,
 238163520, 239443968, 240724416, 242004864, 243285312, 244565760, 245846208, 247126656, 248407104, 249687552, 250968000,
 252248448, 253528896, 254809344, 256089792, 257370240, 258650688, 259931136, 261211584, 262492032, 263772480, 265052928,

# df
Filesystem          1K-blocks    Used     Avail Capacity  Mounted on
/dev/da0p2           19279260 2591088  15145832    15%    /
devfs                       1       1         0   100%    /dev
/dev/concat/concat0 203123604   62888 186810828     0%    /mnt</pre>



<p class="wp-block-paragraph">一度オフラインにする必要がある．という制限はありますが，玉突きではなく純増で増やしていきたい場合の方法として，GEOM MIRROR + CONCAT という手法を紹介しました．</p>


<div class=".for-sp">
<div class="table">
<span class="body">
<!-- imobile wiki_上部_SP_1 -->
<script type="text/javascript">
 imobile_tag_ver = "0.3"; 
 imobile_pid = "81546"; 
 imobile_asid = "1846007"; 
 imobile_type = "inline";
</script>
<script type="text/javascript" src="https://spad.i-mobile.co.jp/script/adssp.js?20110215"></script>
<!-- imobile wiki_上部_SP_1 -->
</span>
<span class="body">
<!-- imobile wiki_下部_SP_1 -->
<script type="text/javascript">
 imobile_tag_ver = "0.3"; 
 imobile_pid = "81546"; 
 imobile_asid = "1846017"; 
 imobile_type = "inline";
</script>
<script type="text/javascript" src="https://spad.i-mobile.co.jp/script/adssp.js?20110215"></script>
<!-- imobile wiki_下部_SP_1 -->
</span>
</div>
</div>

<div class=".for-pc">
<div class="table">
<span class="body">
<!-- imobile blog_seichan_記事中_1 -->
<script type="text/javascript">
 imobile_pid = "81546"; 
 imobile_asid = "1846028"; 
 imobile_width = 300; 
 imobile_height = 250;
</script>
<script type="text/javascript" src="https://spdeliver.i-mobile.co.jp/script/ads.js?20101001"></script>
<!-- imobile blog_seichan_記事中_1 -->
</span>
<span class="body">
<!-- imobile blog_seichan_記事中_2 -->
<script type="text/javascript">
 imobile_pid = "81546"; 
 imobile_asid = "1845876"; 
 imobile_width = 300; 
 imobile_height = 250;
</script>
<script type="text/javascript" src="https://spdeliver.i-mobile.co.jp/script/ads.js?20101001"></script>
<!-- imobile blog_seichan_記事中_2 -->
</span>
</div>
</div>



<h2 class="wp-block-heading"><span id="toc5">GEOM MIRROR 管理</span></h2>



<p class="wp-block-paragraph">前回，作成・削除・拡張を特にオプション無しで実施していますが，GEOM MIRROR には GEOM STRIPE や CONCAT と違ってサブコマンドやオプションが豊富です．<br>ここで少し紹介したいと思います．</p>



<p class="wp-block-paragraph"><strong><em>gmirror list</em></strong> を実行すると先頭に Balance は Slice，Type 等の項目が表示されます．</p>



<pre class="EnlighterJSRAW" data-enlighter-language="shell" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group=""># gmirror list mirror0
Geom name: mirror0
State: COMPLETE
Components: 2
Balance: load
Slice: 4096
Flags: NONE
GenID: 0
SyncID: 1
ID: 3673431046
Type: AUTOMATIC
Providers:
1. Name: mirror/mirror0
   Mediasize: 107374181888 (100G)
   Sectorsize: 512
   Mode: r1w1e2</pre>



<h2 class="wp-block-heading"><span id="toc6">読み出し方式の変更</span></h2>



<p class="wp-block-paragraph">Balance は4つあり，ディスクの読み出しの際にどういったアクセスを行うか．を決定するものになります．</p>



<ul class="wp-block-list">
<li>load<br>IO負荷の低いディスクから読み出しを行います．label や create 時に指定しない場合これがデフォルトとして採用されます</li>



<li>prefer<br>mirror 内の Priority 値が大きいディスクから読み出しを行います</li>



<li>round-robin<br>ラウンドロビンで読み出しを行います</li>



<li>split<br>指定のバイト数毎に読み取るディスクを切り替えていく方式となります</li>
</ul>



<p class="wp-block-paragraph">基本的にはデフォルトの load でもよいと思いますが，読み出しの割合が多い環境でパフォーマンスを引き出したい場合は round-robin や split を選択するのは有効だと思います．</p>



<p class="wp-block-paragraph">変更する場合は <strong><em>configure</em></strong> サブコマンドで設定値を変更が可能です．round-robin にする場合はこのような形となります．</p>



<pre class="EnlighterJSRAW" data-enlighter-language="shell" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group=""># gmirror configure -b round-robin mirror0

# gmirror list mirror0
Geom name: mirror0
State: COMPLETE
Components: 2
Balance: round-robin
Slice: 4096
Flags: NONE
GenID: 0
SyncID: 1
ID: 3673431046
Type: AUTOMATIC
</pre>



<p class="wp-block-paragraph">split の場合は <strong><em>configure</em></strong> サブコマンドでオプションを2つ渡します．-s を指定しない場合は 4096 byte がデフォルト値として採用されます．</p>



<pre class="EnlighterJSRAW" data-enlighter-language="shell" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group=""># gmirror configure -b split -s 8192 mirror0

# gmirror list mirror0
Geom name: mirror0
State: COMPLETE
Components: 2
Balance: split
Slice: 8192
Flags: NONE
GenID: 0
SyncID: 1
ID: 3673431046
Type: AUTOMATIC
</pre>



<p class="wp-block-paragraph">prefer の場合も <strong><em>configure</em></strong> サブコマンドを使用します．<br>その後，デバイスの優先度を変更します．Consumers の Priority が変化している事を確認します．<br>(長くなるので Priority だけ記載しています)</p>



<pre class="EnlighterJSRAW" data-enlighter-language="shell" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group=""># gmirror configure -b prefer mirror0

# gmirror configure -p 10 mirror0 da1

# gmirror list mirror0
Geom name: mirror0
State: COMPLETE
Components: 2
Balance: prefer
Slice: 8192
Flags: NONE
GenID: 0
SyncID: 1
ID: 3673431046
Type: AUTOMATIC
Providers:
1. Name: mirror/mirror0
   Mediasize: 107374181888 (100G)
   Sectorsize: 512
   Mode: r1w1e2
Consumers:
1. Name: da1
   Priority: 10
2. Name: da2
   Priority: 1</pre>



<h2 class="wp-block-heading"><span id="toc7">リビルド処理の自動化・手動化</span></h2>



<p class="wp-block-paragraph">Type は AUTOMATIC と NOAUTOSYNC の2つがあります．自動で同期処理を行うのか，マニュアル制御で行うのか．という違いになります．<br>手動でオペレーションを行わないといけない．というシチュエーションは少ないと思いますが，方法を記載します．<br>こちらも <strong><em>configure</em></strong> サブコマンドを用いて設定します．</p>



<pre class="EnlighterJSRAW" data-enlighter-language="shell" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group=""># gmirror configure -n mirror0

# gmirror list mirror0
Geom name: mirror0
State: COMPLETE
Components: 2
Balance: round-robin
Slice: 4096
Flags: NOAUTOSYNC
GenID: 0
SyncID: 1
ID: 3673431046
Type: AUTOMATIC
</pre>



<p class="wp-block-paragraph">手動から自動に戻したい場合も同様に <strong><em>configure</em></strong> サブコマンドを用いて設定します．</p>



<pre class="EnlighterJSRAW" data-enlighter-language="shell" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group=""># gmirror configure -a mirror0

# gmirror list mirror0
Geom name: mirror0
State: COMPLETE
Components: 2
Balance: round-robin
Slice: 4096
Flags: NONE
GenID: 0
SyncID: 1
ID: 3673431046
Type: AUTOMATIC</pre>



<p class="wp-block-paragraph">以上で GEOM MIRROR によるミラーリングについての解説を終わります．</p>


<div class=".for-sp">
<div class="table">
<span class="body">
<!-- imobile wiki_上部_SP_1 -->
<script type="text/javascript">
 imobile_tag_ver = "0.3"; 
 imobile_pid = "81546"; 
 imobile_asid = "1846007"; 
 imobile_type = "inline";
</script>
<script type="text/javascript" src="https://spad.i-mobile.co.jp/script/adssp.js?20110215"></script>
<!-- imobile wiki_上部_SP_1 -->
</span>
<span class="body">
<!-- imobile wiki_下部_SP_1 -->
<script type="text/javascript">
 imobile_tag_ver = "0.3"; 
 imobile_pid = "81546"; 
 imobile_asid = "1846017"; 
 imobile_type = "inline";
</script>
<script type="text/javascript" src="https://spad.i-mobile.co.jp/script/adssp.js?20110215"></script>
<!-- imobile wiki_下部_SP_1 -->
</span>
</div>
</div>

<div class=".for-pc">
<div class="table">
<span class="body">
<!-- imobile blog_seichan_記事中_1 -->
<script type="text/javascript">
 imobile_pid = "81546"; 
 imobile_asid = "1846028"; 
 imobile_width = 300; 
 imobile_height = 250;
</script>
<script type="text/javascript" src="https://spdeliver.i-mobile.co.jp/script/ads.js?20101001"></script>
<!-- imobile blog_seichan_記事中_1 -->
</span>
<span class="body">
<!-- imobile blog_seichan_記事中_2 -->
<script type="text/javascript">
 imobile_pid = "81546"; 
 imobile_asid = "1845876"; 
 imobile_width = 300; 
 imobile_height = 250;
</script>
<script type="text/javascript" src="https://spdeliver.i-mobile.co.jp/script/ads.js?20101001"></script>
<!-- imobile blog_seichan_記事中_2 -->
</span>
</div>
</div>
]]></content:encoded>
					
					<wfw:commentRss>https://www.seichan.org/2023/12/geom-mirror-%e3%83%9f%e3%83%a9%e3%83%bc%e3%83%aa%e3%83%b3%e3%82%b0-raid1-%e3%82%92%e4%bd%bf%e3%81%a3%e3%81%a6%e3%81%bf%e3%82%8b-2.html/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
