5.4.16.8.2. warn の RAID フォルトポリシー
以下の例では、
raid_fault_policy フィールドは lvm.conf ファイル内で warn にセットされています。RAID 論理ボリュームは以下のように配置されます。
# lvs -a -o name,copy_percent,devices my_vg
LV Copy% Devices
my_lv 100.00 my_lv_rimage_0(0),my_lv_rimage_1(0),my_lv_rimage_2(0)
[my_lv_rimage_0] /dev/sdh1(1)
[my_lv_rimage_1] /dev/sdf1(1)
[my_lv_rimage_2] /dev/sdg1(1)
[my_lv_rmeta_0] /dev/sdh1(0)
[my_lv_rmeta_1] /dev/sdf1(0)
[my_lv_rmeta_2] /dev/sdg1(0)
/dev/sdh デバイスに障害が発生すると、システムログはエラーメッセージを表示します。ただし、この場合、LVM はイメージの 1 つを置き換えて、RAID デバイスを自動的に修復しようとはしません。代わりに、デバイスに障害が発生したら、以下のように lvconvert コマンドの --repair 引数を使用してデバイスを置き換えることができます。
# lvconvert --repair my_vg/my_lv
/dev/sdh1: read failed after 0 of 2048 at 250994294784: Input/output error
/dev/sdh1: read failed after 0 of 2048 at 250994376704: Input/output error
/dev/sdh1: read failed after 0 of 2048 at 0: Input/output error
/dev/sdh1: read failed after 0 of 2048 at 4096: Input/output error
Couldn't find device with uuid fbI0YO-GX7x-firU-Vy5o-vzwx-vAKZ-feRxfF.
Attempt to replace failed RAID images (requires full device resync)? [y/n]: y
# lvs -a -o name,copy_percent,devices my_vg
Couldn't find device with uuid fbI0YO-GX7x-firU-Vy5o-vzwx-vAKZ-feRxfF.
LV Copy% Devices
my_lv 64.00 my_lv_rimage_0(0),my_lv_rimage_1(0),my_lv_rimage_2(0)
[my_lv_rimage_0] /dev/sde1(1)
[my_lv_rimage_1] /dev/sdf1(1)
[my_lv_rimage_2] /dev/sdg1(1)
[my_lv_rmeta_0] /dev/sde1(0)
[my_lv_rmeta_1] /dev/sdf1(0)
[my_lv_rmeta_2] /dev/sdg1(0)
障害が発生したデバイスが置き換わっても、LVM は障害が発生したデバイスを見つけることができなかったことを引き続き表示する点に注意してください。これは、障害が発生したデバイスは RAID 論理ボリュームから削除されていますが、ボリュームグループからはまだ削除されていないためです。障害が発生したデバイスをボリュームグループから削除するには、
vgreduce --removemissing VG を実行できます。
If the device failure is a transient failure or you are able to repair the device that failed, as of Red Hat Enterprise Linux release 6.5 you can initiate recovery of the failed device with the
--refresh option of the lvchange command. Previously it was necessary to deactivate and then activate the logical volume.
The following command refreshes a logical volume.
# lvchange --refresh my_vg/my_lv