Quote:
Originally Posted by Claxton
Thank you this lssci command is probably what I need, will look into it!
|
As I understand it, lsscsi will only give you the model of the drive.
For example:
Code:
fukawi1 ~ # lsscsi
[2:0:0:0] cd/dvd TSSTcorp CDDVDW SH-S223C SB02 /dev/sr0
[2:0:1:0] disk ATA TOSHIBA THNS064G AGTA /dev/sda
[3:0:1:0] disk ATA SAMSUNG SP2504C VT10 /dev/sdb
Doesn't specifiy that /dev/sda is an SSD drive, and /dev/sdb is HDD.
This may be a hacky way of doing it via a script, but, perhaps using hdparm -t:
Code:
fukawi1 ~ # hdparm -t /dev/sda1
/dev/sda1:
Timing buffered disk reads: 128 MB in 0.69 seconds = 184.36 MB/sec
fukawi1 ~ # hdparm -t /dev/sdb1
/dev/sdb1:
Timing buffered disk reads: 218 MB in 3.02 seconds = 72.22 MB/sec
combined with grep + awk
Code:
fukawi1 ~ # hdparm -t /dev/sda | grep Timing | awk ' {print $11 }'
140.47
and then an if <= $fastestHDDspeed then its not ssd.
Thats probably not particularly accurate, since there may be a blurred line between HDD speeds, and older/slower SSD speeds, and Im sure there is an easier(better?) way to do it, but I am known for doing things the hard way