通用的获取磁盘序列号的方法(sg3utils)

本演示是在solaris环境下,linux下也可以同样处理:

admin@storage-01:/# sg_inq /dev/rdsk/c1t5000C50025E2DB7Fd0 | grep serial
Unit serial number: 9WM31YEM0000C0000JMK
admin@storage-01:/#

由于这个命令是用scsi协议直接和硬盘打交道,所以只要服务器可以直接访问到硬盘,就可以查询到硬盘的序列号。譬如某生产线上用DataON DNS1400的JBOD,你无法通过cfgadm,iostat -En,也无法通过format的inquery来查询到序列号,这种情况下可以通过sg3utils里面的sg_inq来查询到硬盘的序列号。

Advertisement

About Ding Honghui

I'm a linux fans
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s