Lun Question
Peter P.
plpeter2006-/E1597aS9LQAvxtiuMwx3w at public.gmane.org
Wed Jan 24 20:23:10 UTC 2007
Maybe this will help ? :
#!/bin/sh
#
# determine scsi LUNs and device names etc
# exports SCSI_LUNS which contains SCSI device name and info, one per line
#
# plp 2007
#
## note: the sed code removes partitions from the listing
SCSI_LIST=""
for d in `ls /dev/sd* /dev/sc* /dev/st*|sed -e 's/\(.*sd.*[0-9]\+\)//g'|sort`;
do
t="`scsi_info $d 2>/dev/null`" \
&& SCSI_LIST="$SCSI_LIST\n$d `echo -n $t|tr '\n' ' '`"
done
[ "$1" == "--print" ] && echo -e "$SCSI_LIST"
## end
Peter P.
--
The Toronto Linux Users Group. Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists
More information about the Legacy
mailing list