SG_SCANSection: SG3_UTILS (8)Updated: January 2004 |
SG_SCANSection: SG3_UTILS (8)Updated: January 2004 |
If no <sam_dev> device names are given, sg_scan does a scan of the sg devices and outputs a line of information for each sg device that is currently bound to a SCSI device. Once any <sam_dev> is given only the given <sam_dev>s are scanned. Devices are opened with the O_NONBLOCK flag so that the scan will not "hang" on any device that another process holds an O_EXCL lock on.
Any given <sam_devs> device names are expected to comply with (to some extent) the Storage Architecture Model (SAM see www.t10.org). Any device names associated with the Linux SCSI subsystem (e.g. /dev/sda and /dev/st0m) are suitable. Devices names associated with ATAPI devices (e.g. most CD/DVD drives and ATAPI tape drives) are also suitable. If the device does not fall into the above categories then an ATA IDENTITY command is tried.