How to Find Out if a Drive is a SSD or an HDD

24x7CSM

New member
in order to check if you have received SSD or HDD try the below method

On the latest kernels the SSD disks are automatically detected.

To fine Hard drive path

use

fdisk -l

Replace sda with your hard drive path.

$ cat /sys/block/sda/queue/rotational

The result of the command will be a number

1 means you have a HDD
0 means you have a SSD

Enjoy!!!
 
Last edited:
Hmm...Any word on if the server is using hardware raid? Because its coming back false positive with the code above.
 
Hi,

You can also test the below commands:

#lsblk -d -o name,rota
--> output will be as "1 if SSD, 0 if HDD"

# lsblk -t

For Hardware RAID, try something as below. May be based on the model you can find information:
# tw_cli show
# tw_cli /c2 show
 
For Hardware RAID, try something as below. May be based on the model you can find information:
# tw_cli show
# tw_cli /c2 show

This will only work a) if this is a 3ware/lsi controller, and b) you have the CLI installed. You can use smartctl to read individual disks off of a controller if you know the right arguments.
 
I'm not sure this would actually work on a VPS anyway, because they are all "Virtual Disks".

I think if you did something like dd=/dev/zero of=/somefilesomewhere bs=1024k count=1024 to write approx a GB of data, you would be able to tell from the throughput.
 
I'm not sure this would actually work on a VPS anyway, because they are all "Virtual Disks".

I think if you did something like dd=/dev/zero of=/somefilesomewhere bs=1024k count=1024 to write approx a GB of data, you would be able to tell from the throughput.

And that would only work if the provider wasn't overloading their servers otherwise; the speeds may be that of SATA.

If I had any doubt a provider was lying about which type of drive they were using, then I wouldn't sign up with them. The only time I would test is to check speed.
 
in order to check if you have received SSD or HDD try the below method

On the latest kernels the SSD disks are automatically detected.

To fine Hard drive path

use

fdisk -l

Replace sda with your hard drive path.

$ cat /sys/block/sda/queue/rotational

The result of the command will be a number

1 means you have a HDD
0 means you have a SSD

Enjoy!!!

Is these commands also work in VPS or these are only works with dedicated server. I mean how people can check if their vps are on ssd or HDD. Also Is there any method to check on cpanel account?
 
If you do not have the smartctl tool, you have to install it, like this:

# sudo apt-get install smartmontools

Find out if you have a SSD or a normal HDD:

# sudo smartctl -a /dev/sda

If you get this output, it means you have an SSD, else, it is an HDD:
 
I was not know that we can even check that disk is HDD or SSD but your command is really useful.

Thank you. Good for me to check it who claim that they provide SSD ;)
 

Forum statistics

Threads
80,898
Messages
248,406
Members
20,678
Latest member
hostys
Top