Wired behaviour about the 'global_filter' configuration in `lvm.conf`

flying_tiantian

New Member
Jun 9, 2020
6
3
3
28
There is a tutorial about configuring the `global_filter` in `lvm.conf` to spin down some disks, please see Disk prevent from spinning down because of pvestatd.

But after adding `"r|/dev/sdb*|"` to the `global_filter`, it appears that `vgscan` does not scan `/dev/sda` neither, and causes problems.

Is this behaviour expected? If so, what is the proper way to only filter `/dev/sdb*` devices?
 
  • Like
Reactions: alois
Hi,

can you post the full global_filter line in use now?

Thanks for replay.

The default value is `global_filter = [ "r|/dev/zd.*|", "r|/dev/mapper/pve-.*|" "r|/dev/mapper/.*-(vm|base)--[0-9]+--disk--[0-9]+|" ] `.

I want to filter my HDD (/dev/sdb*) and change it to `global_filter = [ "r|/dev/sdb*|", "r|/dev/zd.*|", "r|/dev/mapper/pve-.*|" "r|/dev/mapper/.*-(vm|base)--[0-9]+--disk--[0-9]+|" ] `.

But under this configuration I find that `/dev/sda3` is also skipped by vgscan (`dstat -D sda` shows no data read) and vgscan cannot find any volume group (there is a volume group on sda3).

So I manually add `/dev/sda3` to the accept list by changing the configuration to `global_filter = [ "a|/dev/sda|", "r|/dev/sdb*|", "r|/dev/zd.*|", "r|/dev/mapper/pve-.*|" "r|/dev/mapper/.*-(vm|base)--[0-9]+--disk--[0-9]+|" ] `.

And this works fine, vgscan can find the volume group on sda3 and correctly skip /dev/sdb* .
 
The global filter is a list of regular expressions - '/dev/sdb*' matches '/dev/sd' as well and thus /dev/sda too.
try '/dev/sdb.*'
 
  • Like
Reactions: alois

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!