2017-08-29 108 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|.*|"]}'