Retrieve information about SCSI devices using lsscsi
authorMichael Prokop <mika@grml.org>
Thu, 20 Sep 2012 08:49:31 +0000 (10:49 +0200)
committerMichael Prokop <mika@grml.org>
Thu, 20 Sep 2012 08:49:31 +0000 (10:49 +0200)
Turns out to be very useful when trying to identify where a
specifc block device is coming from, e.g.:

| # lsscsi
| [0:0:0:0]    disk    OPNFILER VIRTUAL-DISK     0     /dev/sda

Thanks: Christian Hofstaedtler for the hint

debian/control
grml-hwinfo

index dd34ae4..9ff905f 100644 (file)
@@ -22,6 +22,7 @@ Recommends: acpi,
             hwinfo,
             iproute,
             laptop-detect,
+            lsscsi,
             lvm2,
             mdadm,
             net-tools,
index d2605f5..7643523 100755 (executable)
@@ -297,6 +297,8 @@ cd "${OUTDIR}" || exit 1
       iscsiadm -m discovery > iscsiadm_discovery 2>iscsiadm_discovery.error
     fi
 
+    exectest lsscsi && lsscsi > lsscsi 2>lsscsi.error
+
     for disk in $disklist; do
       if exectest smartctl ; then
         echo -e "smartctl -a /dev/${disk}:\n" >> smartctl