Skip to content

Commit

Permalink
Fix lvm filter instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
electrocucaracha committed Aug 21, 2024
1 parent fe53565 commit 83ce5b3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion node.sh
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,11 @@ if [ -n "${cinder_volumes-}" ]; then
sudo pvdisplay

# Configure LVM to only scan devices that contain the cinder-volumes volume group
sudo sed -i -e '/# global_filter = \[.*\]/a\' -e "\tglobal_filter = [ \"a|$(sudo pvs --noheadings -o name | sed 's/ //g' | sed 's/\/dev\///g')|\", \"r|.*|\" ]" /etc/lvm/lvm.conf
filter_string=""
for pv_info in $(sudo pvs --noheadings -o name); do
filter_string+="\"a|${pv_info##*/}|\", "
done
sudo sed -i -e '/# global_filter = \[.*\]/a\' -e "\tglobal_filter = [ $filter_string|, \"r|.*|\" ]" /etc/lvm/lvm.conf

sudo modprobe dm_thin_pool
echo "dm_thin_pool" | sudo tee /etc/modules-load.d/dm_thin_pool.conf
Expand Down

0 comments on commit 83ce5b3

Please sign in to comment.