Saturday, January 8, 2011

硬盘, 接口, RAID

本文不想记录关于RAID的种类和它的安装之类的,只是想写关于RAID与它背后的硬盘的一些简单信息。
这样有利于SA了解自己管理的硬件的一些具体情况,及正确地使用相应的工具。

我之所以会去了解这些信息, 主要是因为:
 * 我无法正确了解到在RAID背后的硬盘的信息(如健康情况、容量、型号)
作为SA就基本要清楚自己管理的硬件情况。

接口

开始前, 也回顾一下硬件接口的变迁
我们平时常常会看到这样的一些名词:
* SCSI. SAS
* ATA. IDE. SATA. eSTAT
* iSCSI

发展过程: AT -> ATA -> IDE
The current Parallel ATA standard is the result of a long history of incremental technical development, which began with the original AT Attachment interface, developed for use in early PC AT equipment. The ATA interface itself evolved in several stages from Western Digital's original Integrated Drive Electronics (IDE) interface.

上面的ATA都是并口(parallel)的。然后发展为串口 serial ATA。 也就是SATA

至于SCSI, 和ATA的发展有很大的相似度。 SCSI (Small Computer System Interface)也是一种接口技术, 然后发现到了串口的SAS(Serial Attached SCSI).

上面是平时常使用的硬盘接口的两大类的历史。

在了解上面的接口历史好。 先来小试牛力: 使用smartctl的'-d'参数:
-d TYPE, --device=TYPE
              Specifies  the  type of the device.  The valid arguments to this option are ata, scsi, sat, marvell, 3ware,N, and hpt,L/M, cciss,N or hpt,L/M/N.

了解上面的接口,就可以大概知道怎么选择这个参数了。
 * 对于marvell接口, 我从来就接触过,所以不说它了。

但是,还有一个很有意思的类型: sat

关于 SAT描述如下 :
The ´sat´ device type is for ATA disks that have a SCSI to ATA Translation (SAT) Layer (SATL) between the disk and the operating  system.

为中间产物, 也就是可以让SATA接口硬盘接收SCSI的指令集。

至于为什么Linux会把SATA硬盘命名成sdx, 是不是因为这个原因我无法查询到相关信息。

RAID

在开始RAID硬件前, 还有几个名词要知道:
1. host adapter, 具体请见: http://en.wikipedia.org/wiki/Host_adapter
2. RAID controller, 具体请见: http://en.wikipedia.org/wiki/Disk_array_controller

上面的两个名词和平时所讲的“RAID card“是指同一种设备。

由于RAID把背后的硬盘情况隐藏了,所以SA要取得硬盘的信息就成问题。

从smartctl工具的文档:
http://sourceforge.net/apps/trac/smartmontools/wiki/Supported_RAID-Controllers
可以看出: 要得到RAID卡后面硬盘的情况,SA首先从众多的型号中找出满足自己的RAID

至于世界上还有多少还没有RAID卡(芯片)生产商是smartctl目前为止还没有支持的, 我也无法查询到

还是,可以肯定的是: SA可以借助生产商自己开发的RAID硬件支持工具。比如这个URL:
http://www.lsi.com/storage_home/products_home/internal_raid/megaraid_scsi/megaraid_scsi_3200/index.html#Miscellaneous

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.