Update vm-tweaks.sh
- Add common devices to multipath blacklist
This commit is contained in:
parent
9818973e60
commit
cbc48620de
@ -6,12 +6,26 @@ if [[ $EUID -ne 0 ]]; then
|
||||
fi
|
||||
REALUSER=$(logname)
|
||||
|
||||
# Add floppy to modprobe blacklist
|
||||
# https://askubuntu.com/questions/719058/blk-update-request-i-o-error-dev-fd0-sector-0
|
||||
rmmod floppy > /dev/null 2>&1 && (
|
||||
echo "Adding floppy to modprobe blacklist"
|
||||
echo "blacklist floppy" | tee /etc/modprobe.d/blacklist-floppy.conf
|
||||
dpkg-reconfigure initramfs-tools
|
||||
)
|
||||
|
||||
# Add common devices to multipath blacklist
|
||||
# https://askubuntu.com/questions/1242731/ubuntu-20-04-multipath-configuration
|
||||
if [[ -f "/etc/multipath.conf" ]] && ! grep -q "blacklist" "/etc/multipath.conf"; then
|
||||
echo Updating /etc/multipath.conf
|
||||
cat <<EOT >> "/etc/multipath.conf"
|
||||
blacklist {
|
||||
devnode "^(ram|raw|loop|fd|md|dm-|sr|scd|st|sda)[0-9]*"
|
||||
}
|
||||
EOT
|
||||
/etc/init.d/multipath-tools restart
|
||||
fi
|
||||
|
||||
# Disable Cloud-init
|
||||
if [ ! -f "/etc/cloud/cloud-init.disabled" ]; then
|
||||
echo "Disabling cloud-init"
|
||||
|
Loading…
x
Reference in New Issue
Block a user