Tell me more ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

With sfdisk -s I can see the disk capacity as follows:

$ sfdisk -s
/dev/cciss/c0d0: 143338560
total: 143338560 blocks

How do I see disk details like disk manufacturer? I tried hdparm, but got an error:

$ hdparm -i  /dev/cciss/c0d0
/dev/cciss/c0d0:
HDIO_GET_IDENTITY failed: Inappropriate ioctl for device
share|improve this question

4 Answers

Try these commands:

lshw -class disk  

hwinfo --disk

You may have to install hwinfo.

Concerning hdparm:
hdparm(8) says:

Although this utility is intended primarily for use with SATA/IDE hard disk 
devices, several of the options are also valid (and permitted) for use with 
SCSI hard disk devices and MFM/RLL hard disks with XT interfaces.

and:

Some options (eg. -r for SCSI) may not work with old kernels as necessary 
ioctl()´s were not supported.
share|improve this answer
the command hwinfo & lshw are not installed in my linux – user3266 Dec 22 '10 at 13:36
can you provide some more information about your system? – wag Dec 22 '10 at 17:07
@jennifer: Install at least one of them! All the information they return is available elsewhere, but they have the advantage of collecting all that information from many different places. – Gilles Dec 22 '10 at 19:50

try running smartctl -a /dev/hda (could be sda in your case; cat /proc/partitions will show you the device type to use)

In your case it's behind a cciss controller, so the option should be -d cciss,0 or similar.

share|improve this answer

You could read the disk properties directly through sysfs, also check the other files/dirs in /sys/class/block/sda/device/ (replace sda with drive you need).

cat /sys/class/block/sda/device/{model,vendor} 
share|improve this answer
I dont have block directory – user3266 Dec 22 '10 at 13:36
Use a recent kernel maybe, what distro are you using? try dmesg | less, should see the disks get probed. – OneOfOne Dec 22 '10 at 14:20
@jennifer: cat /sys/block/sd?/device/{model,vendor} (/sys/class/block only appeared fairly recently, and your distribution is a little old). – Gilles Dec 22 '10 at 19:52

I know these answers are 3 years old, but for anyone looking around... In older versions you could find that under (? should be a number):

/sys/class/scsi_device/?:?:?:?/device/model

by doing this:

cat /sys/class/scsi_device/0\:0\:0\:0/device/{model,vendor}

(The backslashes next to zeros are for escaping special char :.)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.