Tuesday, September 26, 2023

Commands to verify if the attached disk in spinning disk(hdd) or Solid state drive (ssd)

Use either of the commands provided below to determine if a disk is a spinning disk (HDD) or a solid-state drive (SSD). Both commands will provide the same information by checking the "rotational" property of the disk. If it returns 1, it's an HDD, and if it returns 0, it's an SSD.


$ lsblk -d -o name,rota

NAME ROTA

sda     0

sdb     0

sdc     0

(or) 

$ cat /sys/block/sd*/queue/rotational

0

0

0


Information: To find available storage you can do it with command "lsblk"


***

No comments:

Post a Comment