mai 24

Rescan tape drives

Tag: Scripts,UnixUggla @ 16 h 12 min

Last week we got an issue with VLS. We had to rescan hw to recover tape drives in CLAIMED status.
So I created this short script/command line to rescan HPUX 11.31.

for system in toto titi tata
echo "Processing $system"
ssh root@$system 'ioscan > /dev/null && for i in $(dmesg | grep "replace_wwid" | \
perl -ne '"'"'{(my $get) = $_ =~ m/instance = (.+)\) The/; print "$get\n"}'"'"'); \
do scsimgr -f replace_wwid -C tgtpath -I $i;done | sort -u && ioscan -fnkC tape'

Vous devez être connecté pour publier un commentaire.