Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reload multipath configuration file #10

Closed
wants to merge 5 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 13 additions & 7 deletions packet-block-storage-attach
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ function restart_iscsid {

# create the multipath config
cat <<- EOF_mpconf > /etc/multipath.conf
defaults {
defaults {

polling_interval 3
fast_io_fail_tmo 5
Expand All @@ -131,9 +131,9 @@ defaults {
no_path_retry $mpnpropt
user_friendly_names yes

}
}

blacklist {
blacklist {
devnode "^(ram|raw|loop|fd|md|dm-|sr|scd|st)[0-9]*"
devnode "^hd[a-z][[0-9]*]"
devnode "^vd[a-z]"
Expand All @@ -153,9 +153,9 @@ blacklist {
vendor "DELL"
product ".*"
}
}
}

devices {
devices {
device {
vendor "DATERA"
product "IBLOCK"
Expand All @@ -165,8 +165,9 @@ devices {
#prio_callout "/sbin/mpath_prio_alua /dev/%n"
hardware_handler "1 alua"
}
}
EOF_mpconf
}
EOF_mpconf


# Initiator check
if [ ! `grep $initiator\$ /etc/iscsi/initiatorname.iscsi` ]; then
Expand Down Expand Up @@ -270,6 +271,11 @@ fi
mpresult=`multipath -ll`
[ $_V -eq 1 ] && echo "$mpresult"

# Reload multipath's configuration to use user_friendly_names from the bindings file for CoreOS
if [ $(head -1 /etc/lsb-release) == "DISTRIB_ID=CoreOS" ]; then
multipathd reconfigure
fi

# Check for block device(s)
for (( volume=0; volume<$volumecnt; volume++ )); do
volname=`jq '.volumes['$volume'].name ' $LOCALMD | sed 's/"//g'`
Expand Down