Linux Find SCSI Hard Disk Model, Serial Number, Size, and Total Sectors Information

Simply use utility called sdparm to fetch SCSI / SATA device information. Inquiry data including Vital Product Data (VPD) pages can also be displayed. Commands associated with starting and stopping the medium; loading and unloading the medium; and other housekeeping functions may also be performed by this utility.

ADVERTISEMENTS

In short you can get or set SCSI hard disk parameters. If you are using ATA ( IDE ) hard disk use hdparm utility.

Install sdparm utility

Type the following command at shell prompt:
# apt-get install sdparm
Red Hat / CentOS user can grab sdparm rpm package here.

sdparm examples

To list common mode parameters of a disk, enter:
# sdparm /dev/sda
To list the designators within the device identification VPD page of a disk:
# sdparm --inquiry /dev/sdb
To see all parameters for the caching mode page:
# sdparm --page=ca /dev/sdc
To set the “Writeback Cache Enable” bit in the current values page:
# sdparm --set=WCE /dev/sda

Further readings:

  • sdparm man page
🐧 Get the latest tutorials on SysAdmin, Linux/Unix, Open Source & DevOps topics via:
CategoryList of Unix and Linux commands
File Managementcat
FirewallCentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network Utilitiesdig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg jobs killall kill pidof pstree pwdx time
Searchinggrep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNCentOS 8 Debian 10 Firewall Ubuntu 20.04

ADVERTISEMENTS
3 comments… add one
  • Erik Jun 5, 2008 @ 22:22

    Unfortunately sdparm doesn’t work with cciss disks 🙁

    • Rosy May 10, 2010 @ 19:06

      No, no funciona, envía este error.

      sdparm /dev/cciss/c0d0p1
      unable to access /dev/cciss/c0d0p1, ATA disk?

  • Dude Nov 22, 2011 @ 20:17

    I just yum installed the utility and though it worked, it took down the box when I ran with the list all option… code brown

Leave a Reply

Your email address will not be published. Required fields are marked *

Use HTML <pre>...</pre>, <code>...</code> and <kbd>...</kbd> for code samples.