目次

lvm の warning メッセージ

lvs vgs あたりのコマンドを打った際に、標準的な出力の前にこんな warning が出ます。

# lvs
  WARNING: Device for PV pv1RIG-ATqI-Mf1Q-tOk6-QUb4-rg62-3E78iR not found or rejected by a filter.
  WARNING: Device for PV lGYvY6-pjJf-GRyz-a6IU-2T3h-HIb4-hsfQyt not found or rejected by a filter.
  WARNING: Device for PV 5uY1fb-nzJp-m5qa-rLPG-wGRt-Vua0-uHmgbK not found or rejected by a filter.
  WARNING: Device for PV U7s4Rg-JHfv-PbSc-dKKn-yOEf-Ps08-VJCi1Y not found or rejected by a filter.
  WARNING: Device for PV vGg0c6-Lp5Y-x2Tt-X1fQ-Rh88-cLKW-NrX5Dr not found or rejected by a filter.
  WARNING: Device for PV 0yjmj1-fAsX-5wYP-1nn1-3ck0-nHVJ-pHFGwm not found or rejected by a filter.
  LV     VG     Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  _lv001 vg001 -wi-a-----  20.00g                                  
  _lv002 vg001 -wi-a-----  32.00g

'rejected by a filter' って……知ってるよその filter 作ったの俺だし……黙って reject してくれよ……というおはなし。

状況

うちの環境では lvm.conf にこんな設定を入れています。

filter = [ "r|/dev/sd*|", "a|/dev/md113|", "r|.*|" ]

r|...| で一部を除いてほとんど弾くような設定なので filter は効いています。効いているんですが、どうせならもう少し静かに効いてもらえませんか?

対策

環境によっては、この filter は適切に機能しないようです。

# Configuration option devices/global_filter.
# Limit the block devices that are used by LVM system components.
# Because devices/filter may be overridden from the command line, it is
# not suitable for system-wide device filtering, e.g. udev and lvmetad.
# Use global_filter to hide devices from these LVM system components.
# The syntax is the same as devices/filter. Devices rejected by
# global_filter are not opened by LVM.
# This configuration option has an automatic default value.
# global_filter = [ "a|.*/|" ]

なので filter とまったく同じ内容の global_filter を定義してあげると、この warning は止まるようです。

global_filter = [ "r|/dev/sd*|", "a|/dev/md113|", "r|.*|" ]