smartctl 命令查看硬盘序列号
这个一个用于控制和监控支持smart技术的硬盘的命令。通常配合 -a 选项我们可以查看到比较详尽的硬盘信息(比如序列号、硬盘容量、已运行时间、硬盘健康状况等)。用法如下:
#yum -y install smartmontools
root@linuxtechi:~# smartctl -i /dev/sdb
smartctl 6.2 2013-07-26 r3841 [x86_64-linux-3.13.0-32-generic] (local build)
Copyright (C) 2002-13, Bruce Allen, Christian Franke, www.smartmontools.org
=== START OF INFORMATION SECTION ===
Model Family: Seagate Momentus 5400.6
Device Model: ST9320325AS
Serial Number: 5VD2V59T
LU WWN Device Id: 5 000c50 020a37ec4
Firmware Version: 0002BSM1
User Capacity: 320,072,933,376 bytes [320 GB]
Sector Size: 512 bytes logical/physical
Rotation Rate: 5400 rpm
Device is: In smartctl database [for details use: -P show]
ATA Version is: ATA8-ACS T13/1699-D revision 4
SATA Version is: SATA 2.6, 1.5 Gb/s
Local Time is: Sun Nov 16 12:32:09 2014 IST
SMART support is: Available - device has SMART capability.
SMART support is: Enabled
systool 工具查看HBA卡WWN号
systool 是系统上一的个查看sys信息的工具,在redhat、suse发行版里都有该工具,其位于sysfsutils rpm包中:
# rpm -qf /usr/bin/systool
sysfsutils-2.1.0-7.el6.x86_64
查看HBA卡的信息,如下:
# systool -av -c fc_host
Class = "fc_host"
Class Device = "host1"
Class Device path = "/sys/class/fc_host/host1"
active_fc4s = "0x00 0x00 0x01 0x00 0x00 0x00 0x00 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 "
fabric_name = "0x100000051efabe32"
issue_lip = <store method only>
maxframe_size = "2048 bytes"
node_name = "0x2000286ed4233d6a"
port_id = "0x010900"
port_name = "0x2100286ed4233d6a"
port_state = "Online"
port_type = "NPort (fabric via point-to-point)"
speed = "2 Gbit"
supported_classes = "Class 3"
supported_fc4s = "0x00 0x00 0x01 0x00 0x00 0x00 0x00 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 "
supported_speeds = "1 Gbit, 2 Gbit, 4 Gbit"
symbolic_name = "Emulex FC3532 FV2.72A2 DV8.1.10.3"
tgtid_bind_type = "wwpn (World Wide Port Name)"
uevent = <store method only>
Device = "host1"
Device path = "/sys/devices/pci0000:00/0000:00:04.0/0000:0b:00.0/host1"
uevent = <store method only>