2017-08-29 150 views
0

我确切地知道滤波器在lvm.conf使用(从here),但我想指定命令过滤器,象下面这样:在命令中指定lvm过滤器?

lvs --filter [ "a/.*/" ] 

LVM的只是不支持,我有尝试commandprofile但它只是不支持部分devices

vgs --commandprofile test 
Configuration section "devices" is not customizable by a profile. 
Ignoring invalid command profile test. 
Failed to apply command profile test. 

所以我想知道的是反正有命令指定LVM过滤器?

回答

0

我发现LVM命令的参数--config,使用此参数可以在命令中指定过滤器,象下面这样:

lvdisplay --config 'devices{filter=["a|^/dev/sdj[0-9]*$|","r|.*|"]}'