2

For example :

ls /sys/block/

loop0 loop2 loop4 loop6 ram0 ram10 ram12 ram14 ram2 ram4 ram6 ram8 sda sdc loop1 loop3 loop5 loop7 ram1 ram11 ram13 ram15 ram3 ram5 ram7 ram9 sdb sr0

try to detect if it is a mechanical hard-disk

cat /sys/block/sda/queue/rotational

1

ok.

cat /sys/block/ram1/queue/rotational

1

weird ...

( failing on kernel 3.0.0-12-server )

Is there another simple and most reliable test ?

1 Answer 1

1

You can try using smartctl (found in package smartmontools):

smartctl -a /dev/sda

Its output will include a line "Rotation Rate" which tells either the rotation rate of the device or if it is a Solid State Device.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.