![]() Hdparm provides a command line interface to various kernel interfaces supported by the Linux SATA/PATA/SAS "libata" subsystem and the older IDE driver sub-system. You can read more about this at Why do my SATA devices show up under /proc/scsi/scsi? Even PATA devices can appear as SCSI at that level (again, that depends on the kernel version and kernel compile-time configuration, as well as whether the ide-scsi module is used).ĪLSO READ: Tutorial: What is GlusterFS shared storage and types of volumes This isn't actually true of all SATA drivers on all kernel versions with all kernel compile-time configurations, but it's common. It basically means that even though the disk interface is ATA, the drivers interact to the next kernel layer (the generic disk driver) using SCSI. The bud info is SCSI because that is the subsystem that provides IO for these disks. ![]() 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. 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 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 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 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 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: 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 You can use the following methods to identify your disk type whether it is HDD or SSD There are different types of disk available out of which the most used are Hard Drive (HDD) and Solid State Drive (SSD). ![]() I have verified these commands on RHEL/CentOS Linux so if you are using a different distribution such as Ubuntu, Debian, etc then some of the commands may now work. In this article I will share different commands which can be used to check the hard drive (disk) type in your Linux environment. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |