アレイのライトインテントビットマップ(外部ビットマップ)を有効にするコマンドの例
アレイの「ライトインテントビットマップ」(外部ビットマップ)を有効にするコマンドの例です。ここでは例として「ライトインテントビットマップ」が無効になっている「RAID 1」アレイの「ライトインテントビットマップ」(外部ビットマップ)を有効にします。
環境について
物理ボリュームの情報や「RAID 1」アレイの作成方法については、以下を参考にしてください。1.論理ボリュームの確認
現状の論理ボリュームの情報を確認します。「ライトインテントビットマップ」が無効になっています。
ubuntu@ubuntu-vb-1404:~$ sudo mdadm --detail /dev/md/RAID1Array
/dev/md/RAID1Array:
Version : 1.2
Creation Time : Tue May 6 13:28:09 2014
Raid Level : raid1
Array Size : 102272 (99.89 MiB 104.73 MB)
Used Dev Size : 102272 (99.89 MiB 104.73 MB)
Raid Devices : 3
Total Devices : 3
Persistence : Superblock is persistent
Update Time : Tue May 6 13:28:13 2014
State : clean
Active Devices : 3
Working Devices : 3
Failed Devices : 0
Spare Devices : 0
Name : ubuntu-vb-1404:RAID1Array (local to host ubuntu-vb-1404)
UUID : 2d858c8e:d9066d48:31b5f822:68b30fd6
Events : 17
Number Major Minor RaidDevice State
0 8 50 0 active sync /dev/sdd2
1 8 66 1 active sync /dev/sde2
2 8 82 2 active sync /dev/sdf2
/dev/md/RAID1Array:
Version : 1.2
Creation Time : Tue May 6 13:28:09 2014
Raid Level : raid1
Array Size : 102272 (99.89 MiB 104.73 MB)
Used Dev Size : 102272 (99.89 MiB 104.73 MB)
Raid Devices : 3
Total Devices : 3
Persistence : Superblock is persistent
Update Time : Tue May 6 13:28:13 2014
State : clean
Active Devices : 3
Working Devices : 3
Failed Devices : 0
Spare Devices : 0
Name : ubuntu-vb-1404:RAID1Array (local to host ubuntu-vb-1404)
UUID : 2d858c8e:d9066d48:31b5f822:68b30fd6
Events : 17
Number Major Minor RaidDevice State
0 8 50 0 active sync /dev/sdd2
1 8 66 1 active sync /dev/sde2
2 8 82 2 active sync /dev/sdf2
2.物理ボリュームの確認
物理ボリュームの情報を確認します。「ライトインテントビットマップ」が無効になっています。
/dev/sdd2
ubuntu@ubuntu-vb-1404:~$ sudo mdadm --examine /dev/sdd2/dev/sdd2:
Magic : a92b4efc
Version : 1.2
Feature Map : 0x0
Array UUID : 2d858c8e:d9066d48:31b5f822:68b30fd6
Name : ubuntu-vb-1404:RAID1Array (local to host ubuntu-vb-1404)
Creation Time : Tue May 6 13:28:09 2014
Raid Level : raid1
Raid Devices : 3
Avail Dev Size : 204672 (99.95 MiB 104.79 MB)
Array Size : 102272 (99.89 MiB 104.73 MB)
Used Dev Size : 204544 (99.89 MiB 104.73 MB)
Data Offset : 128 sectors
Super Offset : 8 sectors
State : clean
Device UUID : 552f2c62:a107b6ff:33c5f89f:7e5d036d
Update Time : Tue May 6 13:28:13 2014
Checksum : 8c689bd8 - correct
Events : 17
Device Role : Active device 0
Array State : AAA ('A' == active, '.' == missing)
Magic : a92b4efc
Version : 1.2
Feature Map : 0x0
Array UUID : 2d858c8e:d9066d48:31b5f822:68b30fd6
Name : ubuntu-vb-1404:RAID1Array (local to host ubuntu-vb-1404)
Creation Time : Tue May 6 13:28:09 2014
Raid Level : raid1
Raid Devices : 3
Avail Dev Size : 204672 (99.95 MiB 104.79 MB)
Array Size : 102272 (99.89 MiB 104.73 MB)
Used Dev Size : 204544 (99.89 MiB 104.73 MB)
Data Offset : 128 sectors
Super Offset : 8 sectors
State : clean
Device UUID : 552f2c62:a107b6ff:33c5f89f:7e5d036d
Update Time : Tue May 6 13:28:13 2014
Checksum : 8c689bd8 - correct
Events : 17
Device Role : Active device 0
Array State : AAA ('A' == active, '.' == missing)
/dev/sde2
ubuntu@ubuntu-vb-1404:~$ sudo mdadm --examine /dev/sde2
/dev/sde2:
Magic : a92b4efc
Version : 1.2
Feature Map : 0x0
Array UUID : 2d858c8e:d9066d48:31b5f822:68b30fd6
Name : ubuntu-vb-1404:RAID1Array (local to host ubuntu-vb-1404)
Creation Time : Tue May 6 13:28:09 2014
Raid Level : raid1
Raid Devices : 3
Avail Dev Size : 204672 (99.95 MiB 104.79 MB)
Array Size : 102272 (99.89 MiB 104.73 MB)
Used Dev Size : 204544 (99.89 MiB 104.73 MB)
Data Offset : 128 sectors
Super Offset : 8 sectors
State : clean
Device UUID : bb565a90:8191c374:0adb39f1:39c12886
Update Time : Tue May 6 13:28:13 2014
Checksum : 9a0ac6b1 - correct
Events : 17
Device Role : Active device 1
Array State : AAA ('A' == active, '.' == missing)
/dev/sde2:
Magic : a92b4efc
Version : 1.2
Feature Map : 0x0
Array UUID : 2d858c8e:d9066d48:31b5f822:68b30fd6
Name : ubuntu-vb-1404:RAID1Array (local to host ubuntu-vb-1404)
Creation Time : Tue May 6 13:28:09 2014
Raid Level : raid1
Raid Devices : 3
Avail Dev Size : 204672 (99.95 MiB 104.79 MB)
Array Size : 102272 (99.89 MiB 104.73 MB)
Used Dev Size : 204544 (99.89 MiB 104.73 MB)
Data Offset : 128 sectors
Super Offset : 8 sectors
State : clean
Device UUID : bb565a90:8191c374:0adb39f1:39c12886
Update Time : Tue May 6 13:28:13 2014
Checksum : 9a0ac6b1 - correct
Events : 17
Device Role : Active device 1
Array State : AAA ('A' == active, '.' == missing)
/dev/sdf2
ubuntu@ubuntu-vb-1404:~$ sudo mdadm --examine /dev/sdf2
/dev/sdf2:
Magic : a92b4efc
Version : 1.2
Feature Map : 0x0
Array UUID : 2d858c8e:d9066d48:31b5f822:68b30fd6
Name : ubuntu-vb-1404:RAID1Array (local to host ubuntu-vb-1404)
Creation Time : Tue May 6 13:28:09 2014
Raid Level : raid1
Raid Devices : 3
Avail Dev Size : 204672 (99.95 MiB 104.79 MB)
Array Size : 102272 (99.89 MiB 104.73 MB)
Used Dev Size : 204544 (99.89 MiB 104.73 MB)
Data Offset : 128 sectors
Super Offset : 8 sectors
State : clean
Device UUID : b33d8878:1ff33add:c6714b37:17fe169f
Update Time : Tue May 6 13:28:13 2014
Checksum : 49afe2e2 - correct
Events : 17
Device Role : Active device 2
Array State : AAA ('A' == active, '.' == missing)
/dev/sdf2:
Magic : a92b4efc
Version : 1.2
Feature Map : 0x0
Array UUID : 2d858c8e:d9066d48:31b5f822:68b30fd6
Name : ubuntu-vb-1404:RAID1Array (local to host ubuntu-vb-1404)
Creation Time : Tue May 6 13:28:09 2014
Raid Level : raid1
Raid Devices : 3
Avail Dev Size : 204672 (99.95 MiB 104.79 MB)
Array Size : 102272 (99.89 MiB 104.73 MB)
Used Dev Size : 204544 (99.89 MiB 104.73 MB)
Data Offset : 128 sectors
Super Offset : 8 sectors
State : clean
Device UUID : b33d8878:1ff33add:c6714b37:17fe169f
Update Time : Tue May 6 13:28:13 2014
Checksum : 49afe2e2 - correct
Events : 17
Device Role : Active device 2
Array State : AAA ('A' == active, '.' == missing)
3.ライトインテントビットマップを有効にする
以下のコマンドを実行し、「ライトインテントビットマップ」を有効にします。コマンドやオプションの説明は「アレイのライトインテントビットマップの設定を変更するコマンドの説明」を参考にしてください。
sudo mdadm --grow /dev/md/RAID1Array --bitmap=/root/RAID1Array.bitmap
4.コマンドの実行結果
コマンドの実行結果は特に表示されません。
ubuntu@ubuntu-vb-1404:~$ sudo mdadm --grow /dev/md/RAID1Array --bitmap=/root/RAID1Array.bitmap
ubuntu@ubuntu-vb-1404:~$
ubuntu@ubuntu-vb-1404:~$
5.論理ボリュームの確認
論理ボリュームの情報を確認します。「ライトインテントビットマップ」が有効になっています。
ubuntu@ubuntu-vb-1404:~$ sudo mdadm --detail /dev/md/RAID1Array
/dev/md/RAID1Array:
Version : 1.2
Creation Time : Wed May 7 11:32:10 2014
Raid Level : raid1
Array Size : 102272 (99.89 MiB 104.73 MB)
Used Dev Size : 102272 (99.89 MiB 104.73 MB)
Raid Devices : 3
Total Devices : 3
Persistence : Superblock is persistent
Intent Bitmap : /root/RAID1Array.bitmap
Update Time : Wed May 7 11:32:14 2014
State : clean
Active Devices : 3
Working Devices : 3
Failed Devices : 0
Spare Devices : 0
Name : ubuntu-vb-1404:RAID1Array (local to host ubuntu-vb-1404)
UUID : a5e4c836:73aa1049:7c7e990c:8d18445f
Events : 17
Number Major Minor RaidDevice State
0 8 50 0 active sync /dev/sdd2
1 8 66 1 active sync /dev/sde2
2 8 82 2 active sync /dev/sdf2
/dev/md/RAID1Array:
Version : 1.2
Creation Time : Wed May 7 11:32:10 2014
Raid Level : raid1
Array Size : 102272 (99.89 MiB 104.73 MB)
Used Dev Size : 102272 (99.89 MiB 104.73 MB)
Raid Devices : 3
Total Devices : 3
Persistence : Superblock is persistent
Intent Bitmap : /root/RAID1Array.bitmap
Update Time : Wed May 7 11:32:14 2014
State : clean
Active Devices : 3
Working Devices : 3
Failed Devices : 0
Spare Devices : 0
Name : ubuntu-vb-1404:RAID1Array (local to host ubuntu-vb-1404)
UUID : a5e4c836:73aa1049:7c7e990c:8d18445f
Events : 17
Number Major Minor RaidDevice State
0 8 50 0 active sync /dev/sdd2
1 8 66 1 active sync /dev/sde2
2 8 82 2 active sync /dev/sdf2
6.物理ボリュームの確認
物理ボリュームの情報を確認します。「ライトインテントビットマップ」が有効になっていますが、外部ビットマップなので「ライトインテントビットマップ」の情報は表示されていません。
/dev/sdd2
ubuntu@ubuntu-vb-1404:~$ sudo mdadm --examine /dev/sdd2
/dev/sdd2:
Magic : a92b4efc
Version : 1.2
Feature Map : 0x0
Array UUID : a5e4c836:73aa1049:7c7e990c:8d18445f
Name : ubuntu-vb-1404:RAID1Array (local to host ubuntu-vb-1404)
Creation Time : Tue May 6 11:32:10 2014
Raid Level : raid1
Raid Devices : 3
Avail Dev Size : 204672 (99.95 MiB 104.79 MB)
Array Size : 102272 (99.89 MiB 104.73 MB)
Used Dev Size : 204544 (99.89 MiB 104.73 MB)
Data Offset : 128 sectors
Super Offset : 8 sectors
State : clean
Device UUID : ea60b861:3e2d7abb:634b662f:2395a641
Update Time : Tue May 6 11:32:14 2014
Checksum : c7814f01 - correct
Events : 17
Device Role : Active device 0
Array State : AAA ('A' == active, '.' == missing)
/dev/sdd2:
Magic : a92b4efc
Version : 1.2
Feature Map : 0x0
Array UUID : a5e4c836:73aa1049:7c7e990c:8d18445f
Name : ubuntu-vb-1404:RAID1Array (local to host ubuntu-vb-1404)
Creation Time : Tue May 6 11:32:10 2014
Raid Level : raid1
Raid Devices : 3
Avail Dev Size : 204672 (99.95 MiB 104.79 MB)
Array Size : 102272 (99.89 MiB 104.73 MB)
Used Dev Size : 204544 (99.89 MiB 104.73 MB)
Data Offset : 128 sectors
Super Offset : 8 sectors
State : clean
Device UUID : ea60b861:3e2d7abb:634b662f:2395a641
Update Time : Tue May 6 11:32:14 2014
Checksum : c7814f01 - correct
Events : 17
Device Role : Active device 0
Array State : AAA ('A' == active, '.' == missing)
/dev/sde2
ubuntu@ubuntu-vb-1404:~$ sudo mdadm --examine /dev/sde2
/dev/sde2:
Magic : a92b4efc
Version : 1.2
Feature Map : 0x0
Array UUID : a5e4c836:73aa1049:7c7e990c:8d18445f
Name : ubuntu-vb-1404:RAID1Array (local to host ubuntu-vb-1404)
Creation Time : Tue May 6 11:32:10 2014
Raid Level : raid1
Raid Devices : 3
Avail Dev Size : 204672 (99.95 MiB 104.79 MB)
Array Size : 102272 (99.89 MiB 104.73 MB)
Used Dev Size : 204544 (99.89 MiB 104.73 MB)
Data Offset : 128 sectors
Super Offset : 8 sectors
State : clean
Device UUID : 1a7be3c8:0833f63a:dc79265f:f5a50898
Update Time : Tue May 6 11:32:14 2014
Checksum : 344aae48 - correct
Events : 17
Device Role : Active device 1
Array State : AAA ('A' == active, '.' == missing)
/dev/sde2:
Magic : a92b4efc
Version : 1.2
Feature Map : 0x0
Array UUID : a5e4c836:73aa1049:7c7e990c:8d18445f
Name : ubuntu-vb-1404:RAID1Array (local to host ubuntu-vb-1404)
Creation Time : Tue May 6 11:32:10 2014
Raid Level : raid1
Raid Devices : 3
Avail Dev Size : 204672 (99.95 MiB 104.79 MB)
Array Size : 102272 (99.89 MiB 104.73 MB)
Used Dev Size : 204544 (99.89 MiB 104.73 MB)
Data Offset : 128 sectors
Super Offset : 8 sectors
State : clean
Device UUID : 1a7be3c8:0833f63a:dc79265f:f5a50898
Update Time : Tue May 6 11:32:14 2014
Checksum : 344aae48 - correct
Events : 17
Device Role : Active device 1
Array State : AAA ('A' == active, '.' == missing)
/dev/sdf2
ubuntu@ubuntu-vb-1404:~$ sudo mdadm --examine /dev/sdf2
/dev/sdf2:
Magic : a92b4efc
Version : 1.2
Feature Map : 0x0
Array UUID : a5e4c836:73aa1049:7c7e990c:8d18445f
Name : ubuntu-vb-1404:RAID1Array (local to host ubuntu-vb-1404)
Creation Time : Tue May 6 11:32:10 2014
Raid Level : raid1
Raid Devices : 3
Avail Dev Size : 204672 (99.95 MiB 104.79 MB)
Array Size : 102272 (99.89 MiB 104.73 MB)
Used Dev Size : 204544 (99.89 MiB 104.73 MB)
Data Offset : 128 sectors
Super Offset : 8 sectors
State : clean
Device UUID : c1fee272:f81eecf1:ce4f2beb:249f94e5
Update Time : Tue May 6 11:32:14 2014
Checksum : 6ed0ed02 - correct
Events : 17
Device Role : Active device 2
Array State : AAA ('A' == active, '.' == missing)
/dev/sdf2:
Magic : a92b4efc
Version : 1.2
Feature Map : 0x0
Array UUID : a5e4c836:73aa1049:7c7e990c:8d18445f
Name : ubuntu-vb-1404:RAID1Array (local to host ubuntu-vb-1404)
Creation Time : Tue May 6 11:32:10 2014
Raid Level : raid1
Raid Devices : 3
Avail Dev Size : 204672 (99.95 MiB 104.79 MB)
Array Size : 102272 (99.89 MiB 104.73 MB)
Used Dev Size : 204544 (99.89 MiB 104.73 MB)
Data Offset : 128 sectors
Super Offset : 8 sectors
State : clean
Device UUID : c1fee272:f81eecf1:ce4f2beb:249f94e5
Update Time : Tue May 6 11:32:14 2014
Checksum : 6ed0ed02 - correct
Events : 17
Device Role : Active device 2
Array State : AAA ('A' == active, '.' == missing)
7.物理ボリュームの確認(ライトインテントビットマップ)
「ライトインテントビットマップ」の情報を確認します。以下のようになります。
ubuntu@ubuntu-vb-1404:~$ sudo mdadm --examine-bitmap /root/RAID1Array.bitmap
Filename : /root/RAID1Array.bitmap
Magic : 6d746962
Version : 4
UUID : a5e4c836:73aa1049:7c7e990c:8d18445f
Events : 17
Events Cleared : 17
State : OK
Chunksize : 4 KB
Daemon : 5s flush period
Write Mode : Normal
Sync Size : 102272 (99.89 MiB 104.73 MB)
Bitmap : 25568 bits (chunks), 0 dirty (0.0%)
Filename : /root/RAID1Array.bitmap
Magic : 6d746962
Version : 4
UUID : a5e4c836:73aa1049:7c7e990c:8d18445f
Events : 17
Events Cleared : 17
State : OK
Chunksize : 4 KB
Daemon : 5s flush period
Write Mode : Normal
Sync Size : 102272 (99.89 MiB 104.73 MB)
Bitmap : 25568 bits (chunks), 0 dirty (0.0%)