![check hard disk health linux command check hard disk health linux command](https://i2.wp.com/beebom.com/wp-content/uploads/2015/12/command-prompt-chkdsk.jpg)
If you observe the above output, we have ATA as the disk interface while the bus info is SCSI. Why the bus info is SCSI when the disk interface type is ATA Disk? ĭescription: Non-Volatile memory controllerīus info: is a sample output with ATA disk interface. Product: 82801HM/HEM (ICH8M/ICH8M-E) SATA Controller īus info: is a sample output from NVME disks. Here is a sample output with SCSI disk interface ~]# lshw -c storage -c diskīus info: is a sample output with SATA interface. It currently supports DMI (x86 and IA-64 only), OpenFirmware device tree (PowerPC only), PCI/AGP, CPUID (x86), IDE/ATA/ATAPI, PCMCIA (only tested on x86), SCSI and USB on DMI-capable x86 or IA-64 systems and on some PowerPC machines. It can report exact memory configuration, firmware version, mainboard configuration, CPU version and speed, cache configuration, bus speed, etc. Lshw is a small tool to extract detailed information on the hardware configuration of the machine. We can grep for the specific interface type from the output of lspci ~]# /usr/sbin/lspci | grep IDEĠ0:01.1 IDE interface: Intel Corporation 82371AB/EB/MB PIIX4 IDE (rev 01)Ġ0:0d.0 SATA controller: Intel Corporation 82801HM/HEM (ICH8M/ICH8M-E) SATA Controller (rev 02)Ġ4:00.2 Fibre Channel: Emulex Corporation OneConnect 10Gb FCoE Initiator (be3) (rev 01)Ġ4:00.3 Fibre Channel: Emulex Corporation OneConnect 10Gb FCoE Initiator (be3) (rev 01) Lspci is a utility for displaying information about PCI buses in the system and devices connected to them. The different types of available disk interface types are
![check hard disk health linux command check hard disk health linux command](https://cdn.ghacks.net/wp-content/uploads/2017/07/smartmontools-capabilities.png)
Now that you are familiar with the type of disk you are using, you should know the type of disk interface you are using in your environment. hpsa 0000:07:00.0: scsi 0:0:2:0: masked Direct-Access HP EG0900JETKB PHYS DRV SSDSmartPathCap- En- Exp=0 hpsa 0000:07:00.0: scsi 0:0:1:0: masked Direct-Access HP EG0900JETKB PHYS DRV SSDSmartPathCap- En- Exp=0
![check hard disk health linux command check hard disk health linux command](https://www.softwareok.com/img/faq/Dateisystem/Ueberpruefen_Sie_den_Festplattenzustand_mithilfe_von_WMIC_2020-10-05-18-52-11.png)
This can give you a long list of output but you can filter the model number from the output, sample below from my server: hpsa 0000:07:00.0: scsi 0:0:0:0: added RAID HP P244br controller SSDSmartPathCap- En- Exp=1 You can also use different commands to get the model number of the disks, such as # dmesg | grep -i -e scsi -e ata For example the above model number is for Smasung disk which as per their online specification guide is SSD Now that we have the model number of both our disk, we can search for the specification guide of these disks. Shingled Magnetic Recording Support: NoneĪs you see it gives us a bunch of information about the drive we are using along with the model number. Sanitize Estimated Max Erase Time: 4 hour(s), 14 minute(s) 1I:1:1, we can query the details for this PD: # ssacli ctrl slot=0 pd 1I:1:1 show detail Now that we have the Physical Drive location i.e. Physicaldrive 1I:1:2 (port 1I:box 1:bay 2, 900 GB): OK Physicaldrive 1I:1:1 (port 1I:box 1:bay 1, 900 GB): OK First we need the physical drive location, which can be collected using: # ssacli ctrl slot=0 pd all show status
![check hard disk health linux command check hard disk health linux command](https://ostechnix.com/wp-content/uploads/2020/05/Find-Hard-Disk-Drive-Details-In-Linux-Using-Smartctl-1024x463.png)
For example on my HPE Proliant Blades we are using hardware and software raid so on those servers I get following output: # lsblk -d -e 7 -o NAME,ROTA,DISC-MAX,MODELĪs you see instead of Model Number, I get " LOGICAL VOLUME" so here I rely on HPE third party software such as ssacli and HPE Array Configuration Utility (acu cli) to get the model number. In such case we have to rely on some third party tools. If you are using any kind of RAID such as hardware or software raid then it is possible you won't get the model number with above command. We can get the model number of the disk using lsblk command: # lsblk -d -e 7 -o NAME,ROTA,DISC-MAX,MODEL Here I have another setup with SSD disks: So all the identified disks have rotational value as 1 so this means they all are part of HDD. Although here we are using lsblk to list all the available connected disk types and their respective rotational values: # lsblk -d -o name,rota Here also we will use the concept of identifying the disks with rotational feature to check the disk type. Now we can check the rotational value of these individual disks: # cat /sys/block/ sda/queue/rotationalĪs the value for both the disks are 1, it means my both the disks are HDD. These are the available disks on my Linux server: # lsscsi If the value is 0, you're dealing with an SSD, and 1 means plain old HDD. You should check the value of /sys/block/sdX/queue/rotational, where sdX is the drive name. Method 1: Check if the disk is rotational