Sungju's Slow Life

Personal journal


LVM filter generation

To limit unnecessary I/O, you might need to make a filter in /etc/lvm/lvm.conf and sometimes, it’s hard to find a proper filter configuration.

Here is a simple way you can get a good filter.

$ pvs -a --config 'devices { filter = [ "a|.*|" ] }' --noheadings -opv_name,fmt,vg_name | awk 'BEGIN { f = ""; } NF == 3 { n = "42a|"$1"|42, "; f = f n; } END { print "filter = [ "f""r|.*|" ]" }'

http://pagead2.googlesyndication.com/pagead/show_ads.js



Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

About Me

A software engineer who loves any technologies that makes life easier. That’s why I love Linux and Mac at the same time.

Newsletter

%d bloggers like this: