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

by Vivek Gite on May 26, 2008 · 3 comments

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.

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

Featured Articles:

Share this with other sys admins!
Facebook it - Tweet it - Print it -

We're here to help you make the most of sysadmin work. So, subscribe!

{ 3 comments… read them below or add one }

1 Erik June 5, 2008

Unfortunately sdparm doesn’t work with cciss disks :-(

Reply

2 Rosy May 10, 2010

No, no funciona, envĂ­a este error.

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

Reply

3 Dude November 22, 2011

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

Reply

Leave a Comment

You can use these HTML tags and attributes for your code and commands: <strong> <em> <ol> <li> <u> <ul> <blockquote> <pre> <a href="" title="">




Previous post:

Next post: