Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign up--disks option not properly-handling mutlipath output on rhel6.3? #48
Comments
ghost
assigned
ryran
Jan 17, 2013
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
ryran
Jan 20, 2013
Owner
So the disk code was written pretty early on and apparently I didn't test it on enough different sosreports -- turns out the multipath -v4 -ll output is quite a bit more variable than I originally thought.
In v0.1.5, I rewrote quite a bit of the disk code and added quite a lot of comments. While I didn't take the time to comb through dozens of sosreports and test it on the multipath output from tons of systems, it's much better now.
In the mean-time, I also wrote a little bash function to parse output from multipath -ll -v4 ... I might add that to xsos later as a new-style option.
Here it is, as a function to be dropped into a bash config file:
mll() {
local inputfile search_cmd
# If directory, assume sosreport and look for multipath output
if [[ -d $1 ]]; then
inputfile=$1/sos_commands/devicemapper/multipath_-v4_-ll
[[ -r $inputfile ]] || { echo -e "'$inputfile' unreadable\nRun with no args to see usage"; return 2; }
elif [[ -f $1 && -r $1 ]]; then
inputfile=$1
else
echo "Arg 1: must be file containing 'multipath -ll' output or dir-root of sosreport"
echo "Arg 2 (optional): should be a wwid, friendly name, or LUN identifier to search for"
return 1
fi
# If 1 arg only, use cat to process output
# Otherwise, search for second arg in output
[[ $# == 1 ]] && search_cmd=cat || search_cmd="awk -vRS=\n\n /$2/"
awk '
/^[[:graph:]]+ \([[:alnum:]]+\) *dm-/
/^[[:graph:]]+ *dm-/
/^\[?size=/
/(\\_|\|-|`-)/
' "$inputfile" | sed '1!s,^[[:alnum:]].*dm-,\n&,' | $search_cmd
}
And here's me using it against a particular extracted sosreport, along with a search string:
[rsaw:zarch]$ mll
Arg 1: must be file containing 'multipath -ll' output or dir-root of sosreport
Arg 2 (optional): should be a wwid, friendly name, or LUN identifier to search for
[rsaw:zarch]$ mll ram-multipathfun/ mpath9
mpath9 (xxxxxxxxxxxxxxxxxxxxxxxxxxxxxblahblahbxxxx) dm-11 IBM,2145
[size=50G][features=1 queue_if_no_path][hwhandler=0][rw]
\_ round-robin 0 [prio=50][active]
\_ 3:0:6:1 sdy 65:128 [active][ready]
\_ round-robin 0 [prio=20][enabled]
\_ 3:0:4:1 sdq 65:0 [active][ready]
\_ 3:0:5:1 sdu 65:64 [active][ready]
|
So the disk code was written pretty early on and apparently I didn't test it on enough different sosreports -- turns out the In v0.1.5, I rewrote quite a bit of the disk code and added quite a lot of comments. While I didn't take the time to comb through dozens of sosreports and test it on the In the mean-time, I also wrote a little bash function to parse output from Here it is, as a function to be dropped into a bash config file:
And here's me using it against a particular extracted sosreport, along with a search string:
|
ryran commentedJan 17, 2013
Turns out that xsos doesn't handle
multipathcommand output from rhel6. Whoops. Hadn't noticed. Thanks so much to Mr. Markovic for pointing it out!!After he brought it to my attention, this is what I noticed..
xsos could parse multipath from rhel5 just fine, at least when there were friendly names, e.g. this:
And there were a few allowances in there for the differences with rhel4 as well.
However, rhel6 output like this was not taken into account: