Arquivo

Posts Tagged ‘MPIO lspath AWK’

Ver os Paths

MPIO : Forma fácil de verificar se os paths estão ok

Sometimes on a server which had some fiber channel difficulties, I always check if there are some missing or failed paths by issuing this command (sometimes the numbers are not equal, and we have to reconfigure missing paths) :
root@lpar:/root# lspath | awk ‘{print $1,$NF}’ |sort |uniq -c
18 Enabled fscsi0
6 Enabled fscsi1
12 Failed fscsi1

If there are some failed paths, maybe you should try to re-enable them (quick and painless, can’t do no harm) with this one-liner :
root@lpar:/root# lspath|grep Failed | awk ‘{print “chpath -l “$2” -s enable -p “$3}’|ksh
paths Changed
paths Changed
paths Changed
paths Changed
paths Changed
paths Changed
paths Changed
paths Changed
paths Changed
paths Changed
paths Changed
paths Changed
root@lpar:/root# lspath | awk ‘{print $1″ ” $NF}’ |sort |uniq -c
18 Enabled fscsi0

18 Enabled fscsi1

 

You can also delete some paths before re-discovering them if you have some « missing » or « defined » paths :
lspath -F “name:connection:parent:path_status:status” | egrep “Defined|Missing” | awk -F : ‘{print “rmpath -l “$1” -p “$3” -w “$2″ -d”}’ | ksh

Fonte:  http://nixys.fr/blog/?tag=lspath

Anúncios
Categorias:AIX Tags: