Question: I have remote access (including root access) to a Ubuntu 9 server, but can’t inspect it physically or reboot it.

I want to find out the manufacturer and model of the hard disks installed in the server and how they are connected (SATA / IDE, which version). Is there a command line way of doing this? (I can install additional software if necessary)

Answer: If you do an fdisk -l as root it should list the drives and partitions like below:

Disk /dev/sda: 8589 MB, 8589934592 bytes255 heads, 63 sectors/track, 1044 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisk identifier: 0x00044ff8 ?Device Boot ?Start ?End ?Blocks ?Id ?System/dev/sda1 ?* ?1 ?994 ?7977984 ?83 ?LinuxPartition 1 does not end on cylinder boundary./dev/sda2 ?994 ?1045 ?407553 ?5 ?Extended/dev/sda5 ?994 ?1045 ?407552 ?82 ?Linux swap / Solaris

/dev/sda is the drive and each number is a partition.

So if you see hda or sda or sdb… this is what you use in the smartctl command.

you can get smartctl with sudo apt-get install smartmontools

Since mine is sda…

run sudo smartctl -i /dev/sda

=== START OF INFORMATION SECTION ===Device Model: ?VBOX HARDDISKSerial Number: ?VB3fd813ad-aa9ce411Firmware Version: 1.0User Capacity: ?8,589,934,592 bytesDevice is: ?Not in smartctl database [for details use: -P showall]ATA Version is: ?6ATA Standard is: ?ATA/ATAPI-6 published, ANSI INCITS 361-2002Local Time is: ?Mon Jun 28 22:16:37 2010 PDTSMART support is: Unavailable – device lacks SMART capability.A mandatory SMART command failed: exiting. To continue, add one or more ‘-T permissive’ options.