Is there any way of detecting if a drive is a SSD?
Finally a reliable solution! Two of them, actually! Check /sys/block/sdX/queue/rotational, where sdX is the drive name. If it’s 0, you’re dealing with an SSD, and 1 means plain old HDD. I can’t put my finger on the Linux version where it was introduced, but it’s present in Ubuntu’s Linux 3.2 and in vanilla Linux 3.6 … Read more