如何找出 Ubuntu 服务器中安装了哪些磁盘驱动器

use*_*889 11 hard-drive ubuntu

我可以远程访问(包括 root 访问)到 Ubuntu 9 服务器,但无法对其进行物理检查或重新启动它。

我想找出服务器中安装的硬盘的制造商和型号以及它们是如何连接的(SATA / IDE,哪个版本)。有没有命令行方式来做到这一点?(如有必要,我可以安装其他软件)

Jam*_*s T 17

如果您fdisk -l以 root 身份执行,它应该列出如下所示的驱动器和分区:

Disk /dev/sda: 8589 MB, 8589934592 bytes
255 heads, 63 sectors/track, 1044 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00044ff8

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1         994     7977984   83  Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2             994        1045      407553    5  Extended
/dev/sda5             994        1045      407552   82  Linux swap / Solaris
Run Code Online (Sandbox Code Playgroud)

/dev/sda 是驱动器,每个数字是一个分区。

因此,如果您看到 hda 或 sda 或 sdb ...这就是您在 smartctl 命令中使用的内容。

你可以得到 smartctl sudo apt-get install smartmontools

因为我的是sda...

sudo smartctl -i /dev/sda

=== START OF INFORMATION SECTION ===
Device Model:     VBOX HARDDISK
Serial Number:    VB3fd813ad-aa9ce411
Firmware Version: 1.0
User Capacity:    8,589,934,592 bytes
Device is:        Not in smartctl database [for details use: -P showall]
ATA Version is:   6
ATA Standard is:  ATA/ATAPI-6 published, ANSI INCITS 361-2002
Local Time is:    Mon Jun 28 22:16:37 2010 PDT
SMART support is: Unavailable - device lacks SMART capability.
A mandatory SMART command failed: exiting. To continue, add one or more '-T permissive' options.
Run Code Online (Sandbox Code Playgroud)