From cb871d06107c0546299f9fc0b642034cfc7c2f70 Mon Sep 17 00:00:00 2001 From: Promaethius Date: Sun, 8 Jan 2017 00:52:43 -0800 Subject: [PATCH 1/5] reload multipath configuration file --- packet-block-storage-attach | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packet-block-storage-attach b/packet-block-storage-attach index d50370e..b3edd8c 100644 --- a/packet-block-storage-attach +++ b/packet-block-storage-attach @@ -270,6 +270,9 @@ fi mpresult=`multipath -ll` [ $_V -eq 1 ] && echo "$mpresult" +# Reload multipath's configuration to use user_friendly_names from the bindings file +multipathd reconfigure + # Check for block device(s) for (( volume=0; volume<$volumecnt; volume++ )); do volname=`jq '.volumes['$volume'].name ' $LOCALMD | sed 's/"//g'` From 7f629ac13916001955eeb295dcffd213d46adddb Mon Sep 17 00:00:00 2001 From: Promaethius Date: Sat, 21 Jan 2017 23:59:10 -0800 Subject: [PATCH 2/5] reloads multipath config according to dist --- packet-block-storage-attach | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/packet-block-storage-attach b/packet-block-storage-attach index b3edd8c..1b3d83c 100644 --- a/packet-block-storage-attach +++ b/packet-block-storage-attach @@ -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 @@ -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]" @@ -153,9 +153,9 @@ blacklist { vendor "DELL" product ".*" } -} + } -devices { + devices { device { vendor "DATERA" product "IBLOCK" @@ -165,8 +165,13 @@ devices { #prio_callout "/sbin/mpath_prio_alua /dev/%n" hardware_handler "1 alua" } -} -EOF_mpconf + } + EOF_mpconf + +# 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 # Initiator check if [ ! `grep $initiator\$ /etc/iscsi/initiatorname.iscsi` ]; then @@ -270,9 +275,6 @@ fi mpresult=`multipath -ll` [ $_V -eq 1 ] && echo "$mpresult" -# Reload multipath's configuration to use user_friendly_names from the bindings file -multipathd reconfigure - # Check for block device(s) for (( volume=0; volume<$volumecnt; volume++ )); do volname=`jq '.volumes['$volume'].name ' $LOCALMD | sed 's/"//g'` From 513e7c8d2ed2836c2c831cdb78ea3d10d69c77be Mon Sep 17 00:00:00 2001 From: Promaethius Date: Fri, 3 Feb 2017 10:28:44 -0800 Subject: [PATCH 3/5] Update README.md --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 7be783e..0ab4e21 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ This utility/helper script is made available to assist in the attachment and de **Using git:** sudo su - - git clone git@github.com:packethost/packet-block-storage.git + git clone git@github.com:promaethius/packet-block-storage.git cp ./packet-block-storage/packet-block-storage-* /usr/bin/ chmod u+x /usr/bin/packet-block-storage-* @@ -35,8 +35,8 @@ This utility/helper script is made available to assist in the attachment and de **Using wget** sudo su - - wget -O /usr/bin/packet-block-storage-attach https://raw.githubusercontent.com/packethost/packet-block-storage/master/packet-block-storage-attach - wget -O /usr/bin/packet-block-storage-detach https://raw.githubusercontent.com/packethost/packet-block-storage/master/packet-block-storage-detach + wget -O /usr/bin/packet-block-storage-attach https://raw.githubusercontent.com/promaethius/packet-block-storage/master/packet-block-storage-attach + wget -O /usr/bin/packet-block-storage-detach https://raw.githubusercontent.com/promaethius/packet-block-storage/master/packet-block-storage-detach chmod u+x /usr/bin/packet-block-storage-* ## Usage From 349a715b57451214e5a5ab9daacdca2d3a94c55d Mon Sep 17 00:00:00 2001 From: Promaethius Date: Fri, 3 Feb 2017 18:44:42 -0800 Subject: [PATCH 4/5] moved multipathd reconfigure further ahead --- packet-block-storage-attach | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/packet-block-storage-attach b/packet-block-storage-attach index 1b3d83c..5b71af4 100644 --- a/packet-block-storage-attach +++ b/packet-block-storage-attach @@ -168,10 +168,6 @@ cat <<- EOF_mpconf > /etc/multipath.conf } EOF_mpconf -# 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 # Initiator check if [ ! `grep $initiator\$ /etc/iscsi/initiatorname.iscsi` ]; then @@ -275,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'` From 8c0c35d803feae11bc817b778fd8dd1e9aaac691 Mon Sep 17 00:00:00 2001 From: Promaethius Date: Thu, 19 Oct 2017 00:01:47 -0700 Subject: [PATCH 5/5] Update README.md --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 0ab4e21..7be783e 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ This utility/helper script is made available to assist in the attachment and de **Using git:** sudo su - - git clone git@github.com:promaethius/packet-block-storage.git + git clone git@github.com:packethost/packet-block-storage.git cp ./packet-block-storage/packet-block-storage-* /usr/bin/ chmod u+x /usr/bin/packet-block-storage-* @@ -35,8 +35,8 @@ This utility/helper script is made available to assist in the attachment and de **Using wget** sudo su - - wget -O /usr/bin/packet-block-storage-attach https://raw.githubusercontent.com/promaethius/packet-block-storage/master/packet-block-storage-attach - wget -O /usr/bin/packet-block-storage-detach https://raw.githubusercontent.com/promaethius/packet-block-storage/master/packet-block-storage-detach + wget -O /usr/bin/packet-block-storage-attach https://raw.githubusercontent.com/packethost/packet-block-storage/master/packet-block-storage-attach + wget -O /usr/bin/packet-block-storage-detach https://raw.githubusercontent.com/packethost/packet-block-storage/master/packet-block-storage-detach chmod u+x /usr/bin/packet-block-storage-* ## Usage