麦地一芒 發表於 2017-1-18 11:59:44

CentOS下对SSD寿命的检查和健康判断详解

<p>整个网上只有 intel 的 SSD 查看硬盘寿命的资料,象我们这种穷人,只能使用的起 Crucial 和 OCZ 的用户来讲是太不公平了.象我要透过 RAID 卡就真没法子看其它商家的 SSD 的寿命了吗?</p>
<p>研究了一下,所有查看 SSD 的命令,只要要透过 RAID 的,都需要借助 MegaCli 和 smartCtl 获得 ssd 盘使用情况.认真研究了一下,目前我使用的</p>
<p>RAID 卡是LSI Logic / Symbios Logic MegaRAID SAS 1078&nbsp; 和 2108 这二种.使用通常的 MegaCli 来查询:</p>
<p><strong>这个是的下载地址:</strong></p>
<p>Centos5 的 MegaCli</p>
<p>Centos6 的 MegaCli</p>
<p>整个过程分二步,第一步是从过 RAID 卡来取得下面硬盘的信息.接下来使用 smartCtl 来进行硬盘详细信息的显示.</p>
使用 MegaCli&nbsp; 来取得 RAID 卡下硬盘的信息:
<p>然后使用下面的命令:</p>
<p>/opt/MegaRAID/MegaCli/MegaCli64 -PDList -aALL</p>
<p>这样可以查出 RAID 卡下面的内容.会显示如下:</p>
<p>Enclosure Device ID: 252</p>
<p>Slot Number: 7</p>
<p>Device Id: 28</p>
<p>Sequence Number: 2</p>
<p>Media Error Count: 0</p>
<p>Other Error Count: 1</p>
<p>Predictive Failure Count: 0</p>
<p>Last Predictive Failure Event Seq Number: 0</p>
<p>PD Type: SATA</p>
<p>Raw Size: 119.242 GB </p>
<p>Non Coerced Size: 118.742 GB </p>
<p>Coerced Size: 118.277 GB </p>
<p>Firmware state: Online, Spun Up</p>
<p>SAS Address(0): 0x1e394d57aa996b80</p>
<p>Connected Port Number: 7(path0)</p>
<p>Inquiry Data: 0000000011070303A99EC300-CTFDDAC128MAG&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0007&nbsp;&nbsp;&nbsp;</p>
<p>FDE Capable: Not Capable</p>
<p>FDE Enable: Disable</p>
<p>Secured: Unsecured</p>
<p>Locked: Unlocked</p>
<p>Needs EKM Attention: No</p>
<p>Foreign State: None</p>
<p>Device Speed: 6.0Gb/s</p>
<p>Link Speed: 1.5Gb/s</p>
<p>Media Type: Solid State Device</p>
<p>注意上面几个地方,上面会输出很多这样的信息,只有 Media Type: Solid State Device .表示这是 SSD .其中 Device Id: 28 这个需要记下来.这个过一会使用 smartctl 查询时会需要.我们可以见到上面都显示了硬盘的型号:Inquiry Data: 0000000011070303A99EC300-CTFDDAC128MAG&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0007.另外还有一个标志告诉你这个 SSD 是不是正常的 Firmware state: Online,Spun Up 这个选项,所以如果你做 SSD 的监控报警,直接监控这个参数基本就行了.</p>
<p>使用 smartctl 来取得 SSD 硬盘的详细信息 </p>
<p>要注意,不同厂商不同型号磁盘的信息不同.象 intel 的硬盘信息就不介绍了.下面是查询所使用的命令.其中 -a 是让显示所有的信息出来. -d 是用来设置硬盘的.这时需要注意不同的 RAID 卡所使用的接口可能不一样,所以可能会有小的不相同.</p>
<p>比如 intel 的硬盘,直接使用 -d megaraid,27 就能正常了.但我使用了上面的 raid 卡后,需要指定 sat 这个参数,就变成象下面这样了:</p>
<p>smartctl -a -d sat+megaraid,27 /dev/sdb1 -s on</p>
<p>上面这时的 sat 是指由 SCSI 转成 ATA 的设备,可以加象 scsi,ata 之类的参数.</p>
<p>这时,会显示如下的信息:</p>
<p>Model Family:&nbsp;&nbsp;&nbsp;&nbsp; Crucial/Micron RealSSD C300/C400</p>
<p>Device Model:&nbsp;&nbsp;&nbsp;&nbsp; C300-CTFDDAC128MAG</p>
<p>SMART Attributes Data Structure revision number: 16</p>
<p>Vendor Specific SMART Attributes with Thresholds:</p>
<p>ID# ATTRIBUTE_NAME&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FLAG&nbsp;&nbsp;&nbsp;&nbsp; VALUE WORST THRESH TYPE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; UPDATED&nbsp; WHEN_FAILED RAW_VALUE</p>
<p>1 Raw_Read_Error_Rate&nbsp;&nbsp;&nbsp;&nbsp; 0x002f&nbsp;&nbsp; 100&nbsp;&nbsp; 100&nbsp;&nbsp; 000&nbsp;&nbsp;&nbsp; Pre-fail&nbsp; Always&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0</p>
<p>5 Reallocated_Sector_Ct&nbsp;&nbsp; 0x0033&nbsp;&nbsp; 100&nbsp;&nbsp; 100&nbsp;&nbsp; 000&nbsp;&nbsp;&nbsp; Pre-fail&nbsp; Always&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0</p>
<p>9 Power_On_Hours&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x0032&nbsp;&nbsp; 100&nbsp;&nbsp; 100&nbsp;&nbsp; 000&nbsp;&nbsp;&nbsp; Old_age&nbsp;&nbsp; Always&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 5572</p>
<p>12 Power_Cycle_Count&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x0032&nbsp;&nbsp; 100&nbsp;&nbsp; 100&nbsp;&nbsp; 000&nbsp;&nbsp;&nbsp; Old_age&nbsp;&nbsp; Always&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 3</p>
<p>170 Grown_Failing_Block_Ct&nbsp; 0x0033&nbsp;&nbsp; 100&nbsp;&nbsp; 100&nbsp;&nbsp; 000&nbsp;&nbsp;&nbsp; Pre-fail&nbsp; Always&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0</p>
<p>171 Program_Fail_Count&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x0032&nbsp;&nbsp; 100&nbsp;&nbsp; 100&nbsp;&nbsp; 000&nbsp;&nbsp;&nbsp; Old_age&nbsp;&nbsp; Always&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0</p>
<p>172 Erase_Fail_Count&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x0032&nbsp;&nbsp; 100&nbsp;&nbsp; 100&nbsp;&nbsp; 000&nbsp;&nbsp;&nbsp; Old_age&nbsp;&nbsp; Always&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0</p>
<p>173 Wear_Levelling_Count&nbsp;&nbsp;&nbsp; 0x0033&nbsp;&nbsp; 090&nbsp;&nbsp; 090&nbsp;&nbsp; 000&nbsp;&nbsp;&nbsp; Pre-fail&nbsp; Always&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 536</p>
<p>174 Unexpect_Power_Loss_Ct&nbsp; 0x0032&nbsp;&nbsp; 100&nbsp;&nbsp; 100&nbsp;&nbsp; 000&nbsp;&nbsp;&nbsp; Old_age&nbsp;&nbsp; Always&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1</p>
<p>181 Non4k_Aligned_Access&nbsp;&nbsp;&nbsp; 0x0022&nbsp;&nbsp; 100&nbsp;&nbsp; 100&nbsp;&nbsp; 000&nbsp;&nbsp;&nbsp; Old_age&nbsp;&nbsp; Always&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0 0 0</p>
<p>183 SATA_Iface_Downshift&nbsp;&nbsp;&nbsp; 0x0032&nbsp;&nbsp; 100&nbsp;&nbsp; 100&nbsp;&nbsp; 000&nbsp;&nbsp;&nbsp; Old_age&nbsp;&nbsp; Always&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0</p>
<p>184 End-to-End_Error&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x0033&nbsp;&nbsp; 100&nbsp;&nbsp; 100&nbsp;&nbsp; 000&nbsp;&nbsp;&nbsp; Pre-fail&nbsp; Always&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0</p>
<p>187 Reported_Uncorrect&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x0032&nbsp;&nbsp; 100&nbsp;&nbsp; 100&nbsp;&nbsp; 000&nbsp;&nbsp;&nbsp; Old_age&nbsp;&nbsp; Always&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0</p>
<p>188 Command_Timeout&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x0032&nbsp;&nbsp; 100&nbsp;&nbsp; 100&nbsp;&nbsp; 000&nbsp;&nbsp;&nbsp; Old_age&nbsp;&nbsp; Always&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0</p>
<p>189 Factory_Bad_Block_Ct&nbsp;&nbsp;&nbsp; 0x000e&nbsp;&nbsp; 100&nbsp;&nbsp; 100&nbsp;&nbsp; 000&nbsp;&nbsp;&nbsp; Old_age&nbsp;&nbsp; Always&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 250</p>
<p>195 Hardware_ECC_Recovered&nbsp; 0x003a&nbsp;&nbsp; 100&nbsp;&nbsp; 100&nbsp;&nbsp; 000&nbsp;&nbsp;&nbsp; Old_age&nbsp;&nbsp; Always&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0</p>
<p>196 Reallocated_Event_Count 0x0032&nbsp;&nbsp; 100&nbsp;&nbsp; 100&nbsp;&nbsp; 000&nbsp;&nbsp;&nbsp; Old_age&nbsp;&nbsp; Always&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0</p>
<p>197 Current_Pending_Sector&nbsp; 0x0032&nbsp;&nbsp; 100&nbsp;&nbsp; 100&nbsp;&nbsp; 000&nbsp;&nbsp;&nbsp; Old_age&nbsp;&nbsp; Always&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0</p>
<p>198 Offline_Uncorrectable&nbsp;&nbsp; 0x0030&nbsp;&nbsp; 100&nbsp;&nbsp; 100&nbsp;&nbsp; 000&nbsp;&nbsp;&nbsp; Old_age&nbsp;&nbsp; Offline&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0</p>
<p>199 UDMA_CRC_Error_Count&nbsp;&nbsp;&nbsp; 0x0036&nbsp;&nbsp; 100&nbsp;&nbsp; 100&nbsp;&nbsp; 000&nbsp;&nbsp;&nbsp; Old_age&nbsp;&nbsp; Always&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0</p>
<p>202 Perc_Rated_Life_Used&nbsp;&nbsp;&nbsp; 0x0018&nbsp;&nbsp; 090&nbsp;&nbsp; 090&nbsp;&nbsp; 000&nbsp;&nbsp;&nbsp; Old_age&nbsp;&nbsp; Offline&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 10</p>
<p>206 Write_Error_Rate&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x000e&nbsp;&nbsp; 100&nbsp;&nbsp; 100&nbsp;&nbsp; 000&nbsp;&nbsp;&nbsp; Old_age&nbsp;&nbsp; Always&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0</p>
<p>如果是 OCZ 的:</p>
<p>Device Model:&nbsp;&nbsp;&nbsp;&nbsp; OCZ-AGILITY3</p>
<p>Serial Number:&nbsp;&nbsp;&nbsp; OCZ-1OX963Q8B5X2V684</p>
<p>SMART Attributes Data Structure revision number: 10</p>
<p>Vendor Specific SMART Attributes with Thresholds:</p>
<p>ID# ATTRIBUTE_NAME&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FLAG&nbsp;&nbsp;&nbsp;&nbsp; VALUE WORST THRESH TYPE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; UPDATED&nbsp; WHEN_FAILED RAW_VALUE</p>
<p>1 Raw_Read_Error_Rate&nbsp;&nbsp;&nbsp;&nbsp; 0x000f&nbsp;&nbsp; 086&nbsp;&nbsp; 086&nbsp;&nbsp; 050&nbsp;&nbsp;&nbsp; Pre-fail&nbsp; Always&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 135388659</p>
<p>5 Reallocated_Sector_Ct&nbsp;&nbsp; 0x0033&nbsp;&nbsp; 100&nbsp;&nbsp; 100&nbsp;&nbsp; 003&nbsp;&nbsp;&nbsp; Pre-fail&nbsp; Always&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 9</p>
<p>9 Power_On_Hours&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x0032&nbsp;&nbsp; 100&nbsp;&nbsp; 100&nbsp;&nbsp; 000&nbsp;&nbsp;&nbsp; Old_age&nbsp;&nbsp; Always&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 265772576277126</p>
<p>12 Power_Cycle_Count&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x0032&nbsp;&nbsp; 100&nbsp;&nbsp; 100&nbsp;&nbsp; 000&nbsp;&nbsp;&nbsp; Old_age&nbsp;&nbsp; Always&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 15</p>
<p>171 Unknown_Attribute&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x0032&nbsp;&nbsp; 000&nbsp;&nbsp; 000&nbsp;&nbsp; 000&nbsp;&nbsp;&nbsp; Old_age&nbsp;&nbsp; Always&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 9</p>
<p>172 Unknown_Attribute&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x0032&nbsp;&nbsp; 000&nbsp;&nbsp; 000&nbsp;&nbsp; 000&nbsp;&nbsp;&nbsp; Old_age&nbsp;&nbsp; Always&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0</p>
<p>174 Unknown_Attribute&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x0030&nbsp;&nbsp; 000&nbsp;&nbsp; 000&nbsp;&nbsp; 000&nbsp;&nbsp;&nbsp; Old_age&nbsp;&nbsp; Offline&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 13</p>
<p>177 Wear_Leveling_Count&nbsp;&nbsp;&nbsp;&nbsp; 0x0000&nbsp;&nbsp; 000&nbsp;&nbsp; 000&nbsp;&nbsp; 000&nbsp;&nbsp;&nbsp; Old_age&nbsp;&nbsp; Offline&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1</p>
<p>181 Program_Fail_Cnt_Total&nbsp; 0x0032&nbsp;&nbsp; 000&nbsp;&nbsp; 000&nbsp;&nbsp; 000&nbsp;&nbsp;&nbsp; Old_age&nbsp;&nbsp; Always&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 9</p>
<p>182 Erase_Fail_Count_Total&nbsp; 0x0032&nbsp;&nbsp; 000&nbsp;&nbsp; 000&nbsp;&nbsp; 000&nbsp;&nbsp;&nbsp; Old_age&nbsp;&nbsp; Always&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0</p>
<p>187 Reported_Uncorrect&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x0032&nbsp;&nbsp; 100&nbsp;&nbsp; 100&nbsp;&nbsp; 000&nbsp;&nbsp;&nbsp; Old_age&nbsp;&nbsp; Always&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0</p>
<p>194 Temperature_Celsius&nbsp;&nbsp;&nbsp;&nbsp; 0x0022&nbsp;&nbsp; 030&nbsp;&nbsp; 030&nbsp;&nbsp; 000&nbsp;&nbsp;&nbsp; Old_age&nbsp;&nbsp; Always&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 30 (Lifetime Min/Max 30/30)</p>
<p>195 Hardware_ECC_Recovered&nbsp; 0x001c&nbsp;&nbsp; 120&nbsp;&nbsp; 120&nbsp;&nbsp; 000&nbsp;&nbsp;&nbsp; Old_age&nbsp;&nbsp; Offline&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 135388659</p>
<p>196 Reallocated_Event_Count 0x0033&nbsp;&nbsp; 100&nbsp;&nbsp; 100&nbsp;&nbsp; 003&nbsp;&nbsp;&nbsp; Pre-fail&nbsp; Always&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 9</p>
<p>201 Soft_Read_Error_Rate&nbsp;&nbsp;&nbsp; 0x001c&nbsp;&nbsp; 120&nbsp;&nbsp; 120&nbsp;&nbsp; 000&nbsp;&nbsp;&nbsp; Old_age&nbsp;&nbsp; Offline&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 135388659</p>
<p>204 Soft_ECC_Correction&nbsp;&nbsp;&nbsp;&nbsp; 0x001c&nbsp;&nbsp; 120&nbsp;&nbsp; 120&nbsp;&nbsp; 000&nbsp;&nbsp;&nbsp; Old_age&nbsp;&nbsp; Offline&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 135388659</p>
<p>230 Head_Amplitude&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x0013&nbsp;&nbsp; 100&nbsp;&nbsp; 100&nbsp;&nbsp; 000&nbsp;&nbsp;&nbsp; Pre-fail&nbsp; Always&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 100</p>
<p>231 Temperature_Celsius&nbsp;&nbsp;&nbsp;&nbsp; 0x0013&nbsp;&nbsp; 100&nbsp;&nbsp; 100&nbsp;&nbsp; 010&nbsp;&nbsp;&nbsp; Pre-fail&nbsp; Always&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0</p>
<p>233 Media_Wearout_Indicator 0x0000&nbsp;&nbsp; 000&nbsp;&nbsp; 000&nbsp;&nbsp; 000&nbsp;&nbsp;&nbsp; Old_age&nbsp;&nbsp; Offline&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2531</p>
<p>234 Unknown_Attribute&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x0032&nbsp;&nbsp; 000&nbsp;&nbsp; 000&nbsp;&nbsp; 000&nbsp;&nbsp;&nbsp; Old_age&nbsp;&nbsp; Always&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 3465</p>
<p>241 Total_LBAs_Written&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x0032&nbsp;&nbsp; 000&nbsp;&nbsp; 000&nbsp;&nbsp; 000&nbsp;&nbsp;&nbsp; Old_age&nbsp;&nbsp; Always&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 3465</p>
<p>242 Total_LBAs_Read&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x0032&nbsp;&nbsp; 000&nbsp;&nbsp; 000&nbsp;&nbsp; 000&nbsp;&nbsp;&nbsp; Old_age&nbsp;&nbsp; Always&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2030</p>
<p><strong>SSD 是否健康的参数分析:</strong> </p>
<p>注意这时的使用寿命不在是象 intel ssd 的 Media_Wearout_Indicator 这个参数(当然 OCZ 也有,在 Crucial 就变成了Perc_Rated_Life_Used).但其实我们要看 SSD 是否健康,主要是要通过 Wear Leveling Count(颗粒平均擦写次数)这个参数和Grown Failling Block Ct这个参数.</p>
<p>注意看下面二行:</p>
<p>170 Grown_Failing_Block_Ct&nbsp; 0x0033&nbsp;&nbsp; 100&nbsp;&nbsp; 100&nbsp;&nbsp; 000&nbsp;&nbsp;&nbsp; Pre-fail&nbsp; Always&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0</p>
<p>173 Wear_Levelling_Count&nbsp;&nbsp;&nbsp; 0x0033&nbsp;&nbsp; 090&nbsp;&nbsp; 090&nbsp;&nbsp; 000&nbsp;&nbsp;&nbsp; Pre-fail&nbsp; Always&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 536</p>
<p>上面二个参数是关键:</p>
<p>Wear Levelling Count(颗粒平均擦写次数):&nbsp;先讲这个参数.更加重要.先声明这个硬盘是使用了一年的 SSD 硬盘.图中显示的数据为536,即这块128G的硬盘的全盘写入/擦除(P/E)数为536 次,显示还有 90% 的寿命.所以大约这个硬盘使用的闪存颗粒的寿命为 5000 多次的样子.536 约为 5000 的 10% ,所以此项值为90(CA). Grown Failing Block Count(使用中新增坏块数):&nbsp;此项代表 SSD 的闪存颗粒在使用时出现的坏块(类似于HDD的坏道)数量,此处数据为 0 即尚未有出现坏块,若你命不好.新购买回来 SSD 在正常使用时,很短的时间内这个数据产生较大变化,那代表盘可能有问题,早点找售后服务吧. </p>
<p><strong>MegaCli常用参数组合介绍:</strong></p>
<p>MegaCli -cfgdsply -aALL | grep &ldquo;Error&rdquo;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 【正常都是0】</p>
<p>MegaCli -LDGetProp -Cache -LALL -a0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 【写策略】</p>
<p>MegaCli -cfgdsply -aALL&nbsp;&nbsp; | grep &ldquo;Memory&rdquo;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 【内存大小】</p>
<p>MegaCli -LDInfo -Lall -aALL&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 【查RAID级别】</p>
<p>MegaCli -AdpAllInfo -aALL&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 【查RAID卡信息】</p>
<p>MegaCli -PDList -aALL&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 【查看硬盘信息】</p>
<p>MegaCli -AdpBbuCmd -aAll&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 【查看电池信息】</p>
<p>MegaCli -FwTermLog -Dsply -aALL&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 【查看RAID卡日志】</p>
<p>MegaCli -adpCount&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 【显示适配器个数】</p>
<p>MegaCli -AdpGetTime &ndash;aALL&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 【显示适配器时间】</p>
<p>MegaCli -AdpAllInfo -aAll&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 【显示所有适配器信息】</p>
<p>MegaCli -LDInfo -LALL -aAll&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 【显示所有逻辑磁盘组信息】</p>
<p>MegaCli -PDList -aAll&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 【显示所有的物理信息】</p>
<p>MegaCli -AdpBbuCmd -GetBbuStatus -aALL |grep &ldquo;Charger Status&rdquo; 【查看充电状态】</p>
<p>MegaCli -AdpBbuCmd -GetBbuStatus -aALL&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 【显示BBU状态信息】</p>
<p>MegaCli -AdpBbuCmd -GetBbuCapacityInfo -aALL&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 【显示BBU容量信息】</p>
<p>MegaCli -AdpBbuCmd -GetBbuDesignInfo -aALL&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 【显示BBU设计参数】</p>
<p>MegaCli -AdpBbuCmd -GetBbuProperties -aALL&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 【显示当前BBU属性】</p>
<p>MegaCli -cfgdsply -aALL&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 【显示RAID卡型号,RAID设置,DISK相关信息】</p>
<p>磁带状态的变化,从拔盘,到插盘的过程中:</p>
<p>Device&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; |Normal|Damage|Rebuild|Normal</p>
<p>Virtual Drive&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |Optimal|Degraded|Degraded|Optimal</p>
<p>Physical Drive&nbsp;&nbsp;&nbsp; |Online|Failed &ndash;&gt; Unconfigured|Rebuild|Online</p>
頁: [1]
查看完整版本: CentOS下对SSD寿命的检查和健康判断详解