Tape library and drives related commands for AIX

get lists ww_name's of rmt (tape drives) and smc (tape medium changer) devices quickly
# written by Mehmet DEMİR, http://make-possible.blogspot.com
# you can copy and paste it to the terminal for quick run.

for i in `lsdev -Cc tape -F 'name'`; do
 echo -n -e $i"\t"; lsattr -El $i|awk '/ww_name/ { print $1" "$2 }';
done

# output
rmt0    ww_name 0x500507630f9e4112
rmt1    ww_name 0x500507630f9e4114
rmt2    ww_name 0x500507630f9e4124
rmt3    ww_name 0x500507630f9e4115

0 comments:

Post a Comment