Debian/RAID
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
単語検索
|
最終更新
|
ヘルプ
|
ログイン
]
開始行:
RAIDをいじる。ソフトウェアRAIDだと、低価格で高度なRAID...
#contents
*よくある使い方 [#zed1a638]
**アレイの状態を確認 [#kb2c0131]
# mdadm --detail /dev/md0
**ディスク状態の確認 [#d3baeeb0]
# mdadm --examine /dev/sdz1
パーティションの全体サイズ、使用しているサイズ、構成状...
**スーパーブロックの初期化 [#dbea1313]
アレイに新品ではないHDDを使用するときは、スーパーブロッ...
# mdadm --zero-superblock /dev/sdz1
*ホットスワップ [#mfc106a4]
SATAでは、ハード的にホットスワップ(ホットプラグ)に対応...
ここでは、SATA0((マザーボードの印字での表記))にsdb、SAT...
**HDDを取り外す [#nfad6ae1]
sdaに故障フラグを追加してから、アレイから外す。
# mdadm /dev/md0 -f /dev/sda1
mdadm: set /dev/sda1 faulty in /dev/md0
# mdadm /dev/md0 -r /dev/sda1
mdadm: hot removed /dev/sda1
取り外したいHDDのSCSIデバイスを調べる。sdaは、1:0:0:0と...
# find /sys/devices -type l | grep block:
/sys/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0...
/sys/devices/pci0000:00/0000:00:1f.2/host1/target1:0:0/1...
カーネルから削除する。
# echo 1 > /sys/class/scsi_device/1\:0\:0\:0/device/delete
この時点で、以下のカーネルログが出力された。
[ 5071.848015] sd 1:0:0:0: [sda] Synchronizing SCSI cache
[ 5071.848015] sd 1:0:0:0: [sda] Stopping disk
[ 5071.850472] ata2.00: disabled
これで、物理的に取り外す準備ができた。取り外すと、以下...
[ 5222.018849] ata2: exception Emask 0x10 SAct 0x0 SErr ...
[ 5222.018849] ata2: irq_stat 0x00400000, PHY RDY changed
[ 5222.018849] ata2: SError: { PHYRdyChg }
[ 5222.018849] ata2: hard resetting link
[ 5222.742029] ata2: SATA link down (SStatus 0 SControl ...
[ 5222.742091] ata2: EH complete
**HDDを取り付ける [#v1d3d16c]
新しいHDDをSATA2に取り付ける。物理的に取り付けると、以...
[ 5288.848672] ata3: exception Emask 0x10 SAct 0x0 SErr ...
[ 5288.848672] ata3: irq_stat 0x00000040, connection sta...
[ 5288.848672] ata3: SError: { CommWake DevExch }
[ 5288.848672] ata3: hard resetting link
[ 5295.860598] ata3: link is slow to respond, please be ...
[ 5301.019978] ata3: COMRESET failed (errno=-16)
[ 5301.020036] ata3: hard resetting link
[ 5304.372117] ata3: SATA link up 1.5 Gbps (SStatus 113 ...
[ 5304.401347] ata3.00: ATA-8: ST31000340NS, SN06, max U...
[ 5304.401347] ata3.00: 1953525168 sectors, multi 0: LBA...
[ 5304.436102] ata3.00: configured for UDMA/133
[ 5304.436102] ata3: EH complete
[ 5304.448081] scsi 2:0:0:0: Direct-Access ATA ...
[ 5304.448081] sd 2:0:0:0: [sda] 1953525168 512-byte har...
[ 5304.448081] sd 2:0:0:0: [sda] Write Protect is off
[ 5304.448081] sd 2:0:0:0: [sda] Mode Sense: 00 3a 00 00
[ 5304.448081] sd 2:0:0:0: [sda] Write cache: enabled, r...
[ 5304.448081] sd 2:0:0:0: [sda] 1953525168 512-byte har...
[ 5304.448081] sd 2:0:0:0: [sda] Write Protect is off
[ 5304.448081] sd 2:0:0:0: [sda] Mode Sense: 00 3a 00 00
[ 5304.448081] sd 2:0:0:0: [sda] Write cache: enabled, r...
[ 5304.448081] sda: sda1
[ 5304.948410] sd 2:0:0:0: [sda] Attached SCSI disk
カーネルログに「Attached SCSI disk」と出たら、デバイス...
あとは、RAIDに追加するだけ。
# mdadm /dev/md0 -a /dev/sda1
*RAIDとして起動しない場合に強制的に起動させる [#x4f804f9]
RAID構成としての最低限のディスク(4台のRAID5のうち3台あ...
この場合、RAIDのステータスは以下のようになる(新しいディ...
# mdadm --detail /dev/md2
/dev/md2:
Version : 00.90.03
Creation Time : Sun Nov 21 20:38:58 2004
Raid Level : raid5
Device Size : 312568576 (298.09 GiB 320.07 GB)
Raid Devices : 4
Total Devices : 4
Preferred Minor : 2
Persistence : Superblock is persistent
Update Time : Sun Jun 17 14:35:29 2007
State : active, degraded, Not Started
Active Devices : 3
Working Devices : 4
Failed Devices : 0
Spare Devices : 1
Layout : left-asymmetric
Chunk Size : 128K
UUID : xxxxxxxx:xxxxxxxx:xxxxxxxx:xxxxxxxx
Events : 0.8396843
Number Major Minor RaidDevice State
0 22 65 0 active sync /d...
1 8 33 1 active sync /d...
2 3 1 2 active sync /d...
3 0 0 3 removed
4 8 49 - spare /dev/sdd1
ステータスが「active, degraded, Not Started」となってい...
また、dmesgには、以下のような情報もある。
md: md2 stopped.
md: bind<sdc1>
md: bind<hda1>
md: bind<sdd1>
md: bind<hdd1>
md: md2: raid array is not clean -- starting background ...
raid5: device hdd1 operational as raid disk 0
raid5: device hda1 operational as raid disk 2
raid5: device sdc1 operational as raid disk 1
raid5: cannot start dirty degraded array for md2
RAID5 conf printout:
--- rd:4 wd:3 fd:1
disk 0, o:1, dev:hdd1
disk 1, o:1, dev:sdc1
disk 2, o:1, dev:hda1
raid5: failed to run raid set md2
md: pers->run() failed ...
この状態だと、RAIDを起動しようとしてもエラーとなる。
# mdadm --run /dev/md2
mdadm: failed to run array /dev/md2: Input/output error
強制的に起動させるには、md_modのパラメータのstart_dirty...
# echo 1 > /sys/module/md_mod/parameters/start_dirty_deg...
設定後、再度RAIDを起動すると、今度は正常に起動した。~
RAIDのステータスも以下のようになった。
# mdadm --detail /dev/md2
/dev/md2:
Version : 00.90.03
Creation Time : Sun Nov 21 20:38:58 2004
Raid Level : raid5
Array Size : 937705728 (894.27 GiB 960.21 GB)
Device Size : 312568576 (298.09 GiB 320.07 GB)
Raid Devices : 4
Total Devices : 4
Preferred Minor : 2
Persistence : Superblock is persistent
Update Time : Sun Jun 17 14:35:29 2007
State : clean, degraded, recovering
Active Devices : 3
Working Devices : 4
Failed Devices : 0
Spare Devices : 1
Layout : left-asymmetric
Chunk Size : 128K
Rebuild Status : 1% complete
UUID : xxxxxxxx:xxxxxxxx:xxxxxxxx:xxxxxxxx
Events : 0.8396843
Number Major Minor RaidDevice State
0 22 65 0 active sync /d...
1 8 33 1 active sync /d...
2 3 1 2 active sync /d...
4 8 49 3 spare rebuilding...
ステータスが「clean, degraded, recovering」となっている...
その後、しばらくおいておくと、今度はチェックを行ってい...
# mdadm --detail /dev/md2
/dev/md2:
Version : 00.90.03
Creation Time : Sun Nov 21 20:38:58 2004
Raid Level : raid5
Array Size : 937705728 (894.27 GiB 960.21 GB)
Device Size : 312568576 (298.09 GiB 320.07 GB)
Raid Devices : 4
Total Devices : 4
Preferred Minor : 2
Persistence : Superblock is persistent
Update Time : Thu Jun 21 01:05:30 2007
State : clean, resyncing
Active Devices : 4
Working Devices : 4
Failed Devices : 0
Spare Devices : 0
Layout : left-asymmetric
Chunk Size : 128K
Rebuild Status : 11% complete
UUID : xxxxxxxx:xxxxxxxx:xxxxxxxx:xxxxxxxx
Events : 0.8396845
Number Major Minor RaidDevice State
0 22 65 0 active sync /d...
1 8 33 1 active sync /d...
2 3 1 2 active sync /d...
3 8 49 3 active sync /d...
ステータスが「clean, resyncing」となっている。
*RAID1で片肺でのブート [#l11f7ba1]
Debian 6(squeeze)以降の場合、以下のコマンドからメニュー...
# dpkg-reconfigure grub-pc
Debian 6(squeeze)より前の場合は、以下のようにする。~
RAID1でブートディスクを作っても、最初のHDDにしかGRUBが...
# grub-install /dev/sdb
上記で失敗する場合は、以下のように手動で設定する。
# grub
grub> device (hd0) /dev/sdb # (hd0) を /dev/sdb とする
grub> root (hd0,0) # /boot があるパーティショ...
grub> setup (hd0) # (hd0) の MBR に GRUB をイ...
*ディスク交換後の復旧 [#l2bd072c]
HDDを交換後、アレイを再構築するには以下のコマンドを実行...
mdadm /dev/md2 --add /dev/sdb1
/proc/mdstat でリビルド状況がわかるはずだ。
*アレイサイズ変更 [#r2da8839]
RAID6の場合、アレイサイズの変更前に、スーパーブロックの...
# mdadm --stop /dev/md2
# mdadm -A /dev/md2 --update=devicesize /dev/sd[abcd]2
# mdadm /dev/md2 --grow --size=max
こんなことをしなくても、OS再起動でもいけるかもしれない。
**小さくする [#p8c4732a]
***ext3 [#cebfb4c5]
ファイルシステムのサイズを減らし、続いてアレイのサイズ...
# umount /mnt/hoge
# e2fsck -f /dev/md0 (*1)
# resize2fs /dev/md0 100000 (*2)
# mdadm /dev/md0 --grow --size=400000 (*3)
# mount /mnt/hoge
(*1) サイズ変更前にやっておかないと、resize2fsに怒られる...
(*2) ここで指定する数値はアレイのブロック数を指定する。~
(*3) ここで指定する数値はデバイスのサイズを指定する。単位...
**大きくする [#s4b075f2]
アレイの全パーティションのサイズを増やしたのに拡張でき...
# mdadm --examine /dev/sdz1
''Avail Dev Size''が、パーティションサイズと同じことを...
***ext3、ext4 [#y409c9b4]
アレイのサイズを増やし、ファイルシステムのサイズを増や...
# umount /mnt/hoge
# mdadm /dev/md0 --grow --size=600000 (*1)
# e2fsck -f /dev/md0 (*2)
# resize2fs /dev/md0 (*3)
# mount /mnt/hoge
(*1) サイズに"max"を指定すると、指定できる最大値が設定さ...
(*2) サイズ変更前にやっておかないと、resize2fsに怒られる...
(*3) アレイのサイズに合わせる場合は、ブロック数を省略でき...
***jfs [#ud2ed804]
オンラインでリサイズできるのでアンマウントの必要がない。
# mdadm /dev/md0 --grow --size=max
# mount -o remount,resize /mnt/hoge (*1)
(*1) サイズの指定はできないようだ。~
1.5Tから3Tへの拡張時の応答時間は、7分程度だった。ただし...
squeeze(kernel 2.6.32)だと、3Tから6Tへの拡張の応答時間...
***xfs [#o1be22ca]
サイズを増やすのは簡単。xfs_growfsではサイズの指定も出...
# mdadm /dev/md0 --grow --size=max
# xfs_growfs /mnt/hoge
320Gから500Gへの拡張は、ほとんど一瞬で出来た。
*RAIDレベルの変更 [#ff608e82]
**RAID5→RAID6 [#n701ddd4]
まず、アレイにデバイスを追加しておく。
# mdadm /dev/md1 -a /dev/sdd5
RAIDレベルとデバイス数を変更する。
# mdadm -G -l6 -n5 /dev/md1 --backup-file=/root/md1.bak
# rm /tmp/md1.bak
ポイントは、'backup-file'オプションで、これがないと、以...
mdadm level of /dev/md1 changed to raid6
mdadm: /dev/md1: Cannot grow - need backup-file
mdadm: aborting level change
先にRAIDレベルを変更することも可能だが、RAIDレベル変更...
1TBx4のRAID5から、1TBx5のRAID6に変更するのに、92時間程...
*auto-read-onlyとなる [#qf557670]
あとからアレイを追加したときに、以下のようになることが...
md1 : active (auto-read-only) raid1 sda2[0] sdb2[1]
979840 blocks [2/2] [UU]
これは、そういう仕組みらしく、一度でも書き込めば戻るよ...
気になるなら、以下のコマンドを実行すると通常の状態にな...
# mdadm --readwrite /dev/md1
*参考 [#y723ae49]
http://lists.debian.or.jp/debian-users/200608/msg00173.ht...
http://lists.debian.or.jp/debian-users/200310/msg00188.ht...
http://sourceforge.jp/magazine/03/10/16/1431223~
http://forums.opensuse.org/archives/sf-archives/archives-...
http://forums.ubuntulinux.jp/viewtopic.php?id=3947&p=2~
http://blog.jojo.jp/?eid=1173352~
http://d.hatena.ne.jp/dayflower/20091218/1261113963~
終了行:
RAIDをいじる。ソフトウェアRAIDだと、低価格で高度なRAID...
#contents
*よくある使い方 [#zed1a638]
**アレイの状態を確認 [#kb2c0131]
# mdadm --detail /dev/md0
**ディスク状態の確認 [#d3baeeb0]
# mdadm --examine /dev/sdz1
パーティションの全体サイズ、使用しているサイズ、構成状...
**スーパーブロックの初期化 [#dbea1313]
アレイに新品ではないHDDを使用するときは、スーパーブロッ...
# mdadm --zero-superblock /dev/sdz1
*ホットスワップ [#mfc106a4]
SATAでは、ハード的にホットスワップ(ホットプラグ)に対応...
ここでは、SATA0((マザーボードの印字での表記))にsdb、SAT...
**HDDを取り外す [#nfad6ae1]
sdaに故障フラグを追加してから、アレイから外す。
# mdadm /dev/md0 -f /dev/sda1
mdadm: set /dev/sda1 faulty in /dev/md0
# mdadm /dev/md0 -r /dev/sda1
mdadm: hot removed /dev/sda1
取り外したいHDDのSCSIデバイスを調べる。sdaは、1:0:0:0と...
# find /sys/devices -type l | grep block:
/sys/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0...
/sys/devices/pci0000:00/0000:00:1f.2/host1/target1:0:0/1...
カーネルから削除する。
# echo 1 > /sys/class/scsi_device/1\:0\:0\:0/device/delete
この時点で、以下のカーネルログが出力された。
[ 5071.848015] sd 1:0:0:0: [sda] Synchronizing SCSI cache
[ 5071.848015] sd 1:0:0:0: [sda] Stopping disk
[ 5071.850472] ata2.00: disabled
これで、物理的に取り外す準備ができた。取り外すと、以下...
[ 5222.018849] ata2: exception Emask 0x10 SAct 0x0 SErr ...
[ 5222.018849] ata2: irq_stat 0x00400000, PHY RDY changed
[ 5222.018849] ata2: SError: { PHYRdyChg }
[ 5222.018849] ata2: hard resetting link
[ 5222.742029] ata2: SATA link down (SStatus 0 SControl ...
[ 5222.742091] ata2: EH complete
**HDDを取り付ける [#v1d3d16c]
新しいHDDをSATA2に取り付ける。物理的に取り付けると、以...
[ 5288.848672] ata3: exception Emask 0x10 SAct 0x0 SErr ...
[ 5288.848672] ata3: irq_stat 0x00000040, connection sta...
[ 5288.848672] ata3: SError: { CommWake DevExch }
[ 5288.848672] ata3: hard resetting link
[ 5295.860598] ata3: link is slow to respond, please be ...
[ 5301.019978] ata3: COMRESET failed (errno=-16)
[ 5301.020036] ata3: hard resetting link
[ 5304.372117] ata3: SATA link up 1.5 Gbps (SStatus 113 ...
[ 5304.401347] ata3.00: ATA-8: ST31000340NS, SN06, max U...
[ 5304.401347] ata3.00: 1953525168 sectors, multi 0: LBA...
[ 5304.436102] ata3.00: configured for UDMA/133
[ 5304.436102] ata3: EH complete
[ 5304.448081] scsi 2:0:0:0: Direct-Access ATA ...
[ 5304.448081] sd 2:0:0:0: [sda] 1953525168 512-byte har...
[ 5304.448081] sd 2:0:0:0: [sda] Write Protect is off
[ 5304.448081] sd 2:0:0:0: [sda] Mode Sense: 00 3a 00 00
[ 5304.448081] sd 2:0:0:0: [sda] Write cache: enabled, r...
[ 5304.448081] sd 2:0:0:0: [sda] 1953525168 512-byte har...
[ 5304.448081] sd 2:0:0:0: [sda] Write Protect is off
[ 5304.448081] sd 2:0:0:0: [sda] Mode Sense: 00 3a 00 00
[ 5304.448081] sd 2:0:0:0: [sda] Write cache: enabled, r...
[ 5304.448081] sda: sda1
[ 5304.948410] sd 2:0:0:0: [sda] Attached SCSI disk
カーネルログに「Attached SCSI disk」と出たら、デバイス...
あとは、RAIDに追加するだけ。
# mdadm /dev/md0 -a /dev/sda1
*RAIDとして起動しない場合に強制的に起動させる [#x4f804f9]
RAID構成としての最低限のディスク(4台のRAID5のうち3台あ...
この場合、RAIDのステータスは以下のようになる(新しいディ...
# mdadm --detail /dev/md2
/dev/md2:
Version : 00.90.03
Creation Time : Sun Nov 21 20:38:58 2004
Raid Level : raid5
Device Size : 312568576 (298.09 GiB 320.07 GB)
Raid Devices : 4
Total Devices : 4
Preferred Minor : 2
Persistence : Superblock is persistent
Update Time : Sun Jun 17 14:35:29 2007
State : active, degraded, Not Started
Active Devices : 3
Working Devices : 4
Failed Devices : 0
Spare Devices : 1
Layout : left-asymmetric
Chunk Size : 128K
UUID : xxxxxxxx:xxxxxxxx:xxxxxxxx:xxxxxxxx
Events : 0.8396843
Number Major Minor RaidDevice State
0 22 65 0 active sync /d...
1 8 33 1 active sync /d...
2 3 1 2 active sync /d...
3 0 0 3 removed
4 8 49 - spare /dev/sdd1
ステータスが「active, degraded, Not Started」となってい...
また、dmesgには、以下のような情報もある。
md: md2 stopped.
md: bind<sdc1>
md: bind<hda1>
md: bind<sdd1>
md: bind<hdd1>
md: md2: raid array is not clean -- starting background ...
raid5: device hdd1 operational as raid disk 0
raid5: device hda1 operational as raid disk 2
raid5: device sdc1 operational as raid disk 1
raid5: cannot start dirty degraded array for md2
RAID5 conf printout:
--- rd:4 wd:3 fd:1
disk 0, o:1, dev:hdd1
disk 1, o:1, dev:sdc1
disk 2, o:1, dev:hda1
raid5: failed to run raid set md2
md: pers->run() failed ...
この状態だと、RAIDを起動しようとしてもエラーとなる。
# mdadm --run /dev/md2
mdadm: failed to run array /dev/md2: Input/output error
強制的に起動させるには、md_modのパラメータのstart_dirty...
# echo 1 > /sys/module/md_mod/parameters/start_dirty_deg...
設定後、再度RAIDを起動すると、今度は正常に起動した。~
RAIDのステータスも以下のようになった。
# mdadm --detail /dev/md2
/dev/md2:
Version : 00.90.03
Creation Time : Sun Nov 21 20:38:58 2004
Raid Level : raid5
Array Size : 937705728 (894.27 GiB 960.21 GB)
Device Size : 312568576 (298.09 GiB 320.07 GB)
Raid Devices : 4
Total Devices : 4
Preferred Minor : 2
Persistence : Superblock is persistent
Update Time : Sun Jun 17 14:35:29 2007
State : clean, degraded, recovering
Active Devices : 3
Working Devices : 4
Failed Devices : 0
Spare Devices : 1
Layout : left-asymmetric
Chunk Size : 128K
Rebuild Status : 1% complete
UUID : xxxxxxxx:xxxxxxxx:xxxxxxxx:xxxxxxxx
Events : 0.8396843
Number Major Minor RaidDevice State
0 22 65 0 active sync /d...
1 8 33 1 active sync /d...
2 3 1 2 active sync /d...
4 8 49 3 spare rebuilding...
ステータスが「clean, degraded, recovering」となっている...
その後、しばらくおいておくと、今度はチェックを行ってい...
# mdadm --detail /dev/md2
/dev/md2:
Version : 00.90.03
Creation Time : Sun Nov 21 20:38:58 2004
Raid Level : raid5
Array Size : 937705728 (894.27 GiB 960.21 GB)
Device Size : 312568576 (298.09 GiB 320.07 GB)
Raid Devices : 4
Total Devices : 4
Preferred Minor : 2
Persistence : Superblock is persistent
Update Time : Thu Jun 21 01:05:30 2007
State : clean, resyncing
Active Devices : 4
Working Devices : 4
Failed Devices : 0
Spare Devices : 0
Layout : left-asymmetric
Chunk Size : 128K
Rebuild Status : 11% complete
UUID : xxxxxxxx:xxxxxxxx:xxxxxxxx:xxxxxxxx
Events : 0.8396845
Number Major Minor RaidDevice State
0 22 65 0 active sync /d...
1 8 33 1 active sync /d...
2 3 1 2 active sync /d...
3 8 49 3 active sync /d...
ステータスが「clean, resyncing」となっている。
*RAID1で片肺でのブート [#l11f7ba1]
Debian 6(squeeze)以降の場合、以下のコマンドからメニュー...
# dpkg-reconfigure grub-pc
Debian 6(squeeze)より前の場合は、以下のようにする。~
RAID1でブートディスクを作っても、最初のHDDにしかGRUBが...
# grub-install /dev/sdb
上記で失敗する場合は、以下のように手動で設定する。
# grub
grub> device (hd0) /dev/sdb # (hd0) を /dev/sdb とする
grub> root (hd0,0) # /boot があるパーティショ...
grub> setup (hd0) # (hd0) の MBR に GRUB をイ...
*ディスク交換後の復旧 [#l2bd072c]
HDDを交換後、アレイを再構築するには以下のコマンドを実行...
mdadm /dev/md2 --add /dev/sdb1
/proc/mdstat でリビルド状況がわかるはずだ。
*アレイサイズ変更 [#r2da8839]
RAID6の場合、アレイサイズの変更前に、スーパーブロックの...
# mdadm --stop /dev/md2
# mdadm -A /dev/md2 --update=devicesize /dev/sd[abcd]2
# mdadm /dev/md2 --grow --size=max
こんなことをしなくても、OS再起動でもいけるかもしれない。
**小さくする [#p8c4732a]
***ext3 [#cebfb4c5]
ファイルシステムのサイズを減らし、続いてアレイのサイズ...
# umount /mnt/hoge
# e2fsck -f /dev/md0 (*1)
# resize2fs /dev/md0 100000 (*2)
# mdadm /dev/md0 --grow --size=400000 (*3)
# mount /mnt/hoge
(*1) サイズ変更前にやっておかないと、resize2fsに怒られる...
(*2) ここで指定する数値はアレイのブロック数を指定する。~
(*3) ここで指定する数値はデバイスのサイズを指定する。単位...
**大きくする [#s4b075f2]
アレイの全パーティションのサイズを増やしたのに拡張でき...
# mdadm --examine /dev/sdz1
''Avail Dev Size''が、パーティションサイズと同じことを...
***ext3、ext4 [#y409c9b4]
アレイのサイズを増やし、ファイルシステムのサイズを増や...
# umount /mnt/hoge
# mdadm /dev/md0 --grow --size=600000 (*1)
# e2fsck -f /dev/md0 (*2)
# resize2fs /dev/md0 (*3)
# mount /mnt/hoge
(*1) サイズに"max"を指定すると、指定できる最大値が設定さ...
(*2) サイズ変更前にやっておかないと、resize2fsに怒られる...
(*3) アレイのサイズに合わせる場合は、ブロック数を省略でき...
***jfs [#ud2ed804]
オンラインでリサイズできるのでアンマウントの必要がない。
# mdadm /dev/md0 --grow --size=max
# mount -o remount,resize /mnt/hoge (*1)
(*1) サイズの指定はできないようだ。~
1.5Tから3Tへの拡張時の応答時間は、7分程度だった。ただし...
squeeze(kernel 2.6.32)だと、3Tから6Tへの拡張の応答時間...
***xfs [#o1be22ca]
サイズを増やすのは簡単。xfs_growfsではサイズの指定も出...
# mdadm /dev/md0 --grow --size=max
# xfs_growfs /mnt/hoge
320Gから500Gへの拡張は、ほとんど一瞬で出来た。
*RAIDレベルの変更 [#ff608e82]
**RAID5→RAID6 [#n701ddd4]
まず、アレイにデバイスを追加しておく。
# mdadm /dev/md1 -a /dev/sdd5
RAIDレベルとデバイス数を変更する。
# mdadm -G -l6 -n5 /dev/md1 --backup-file=/root/md1.bak
# rm /tmp/md1.bak
ポイントは、'backup-file'オプションで、これがないと、以...
mdadm level of /dev/md1 changed to raid6
mdadm: /dev/md1: Cannot grow - need backup-file
mdadm: aborting level change
先にRAIDレベルを変更することも可能だが、RAIDレベル変更...
1TBx4のRAID5から、1TBx5のRAID6に変更するのに、92時間程...
*auto-read-onlyとなる [#qf557670]
あとからアレイを追加したときに、以下のようになることが...
md1 : active (auto-read-only) raid1 sda2[0] sdb2[1]
979840 blocks [2/2] [UU]
これは、そういう仕組みらしく、一度でも書き込めば戻るよ...
気になるなら、以下のコマンドを実行すると通常の状態にな...
# mdadm --readwrite /dev/md1
*参考 [#y723ae49]
http://lists.debian.or.jp/debian-users/200608/msg00173.ht...
http://lists.debian.or.jp/debian-users/200310/msg00188.ht...
http://sourceforge.jp/magazine/03/10/16/1431223~
http://forums.opensuse.org/archives/sf-archives/archives-...
http://forums.ubuntulinux.jp/viewtopic.php?id=3947&p=2~
http://blog.jojo.jp/?eid=1173352~
http://d.hatena.ne.jp/dayflower/20091218/1261113963~
ページ名: