tid=26553&當linux系統裝有多顆硬碟且使用raid0組合成一顆磁碟,不幸其中一顆毀損時,整個磁碟就找不到了,且資料全部遺失,如果是重要資料的話,那就真的GG了." `3 f5 L/ K& L$ Q0 C0 }! g! r
本篇重點是在說明"如何找出哪一顆出問題",那就是找出硬碟的型號及序號:" ?0 A0 z0 u/ z, Z
7 J$ @) N9 m. w R#hdparm -I /dev/sd?|grep -E "Number|/dev"
+ U" }; }1 [" M( W" \7 g, i/dev/sda:- K- P' q: d9 K5 F
Model Number: HDS722516VLSA80
' s* b; C/ y" L; u+ {9 N5 z" ~7 X- }) m Serial Number: VN6D3ECDD7RG1D- [# _) \3 d% }) Q" M( ^* Q( y
/dev/sdb:# A v/ D; y( A- `) R
Model Number: WDC WD740GD-00FLA1 / O8 }( u! R$ F- A
Serial Number: WD-WMAKE1690676
9 L5 Z0 I0 n) B/dev/sdc:; ^8 K! Q7 E* W1 j- d$ m
Model Number: HDS722525VLSA80 2 j+ x8 F2 D, L, T
Serial Number: VN6J3ECFEALJRD
" {. b \7 G4 K' [/dev/sdd:
# p1 |% M& ^$ d. i Q/ z) z- H Model Number: HDS722525VLSA80
; _) K1 q) c, m) c( X8 C# r Serial Number: VN6J3ECFEBSR1D
% Y x$ D7 }: A
- J4 o, }+ ^, D- @2 @8 [+ s; B1 U4 P
註:
! p) b# _- N( u: i ^' Z hdparm並不一定可以適用所有硬碟,有些廠牌可能不支援此指令,可能會出現如下錯誤:. D& U: G5 `- q$ _6 V5 D4 Y
HDIO_DRIVE_CMD(identify) failed: Invalid argument
: {" W L& f: @- M2 Y3 ]可以使用: 參考 http://70tw.spotlight.net.tw/?p=330
) N- a+ T; u* ?5 L, [# y+ w) M7 F Rsmartctl -i -d ata /dev/sda # ata 是 sata, 假如無 smartctl ===> yum install smartmontools$ @; [0 S2 q( a9 z
smartctl -i -d scsi /dev/sdb # scsi 硬碟
8 K9 i' s) M4 T) U' A* t5 D, K[root@server ~]# smartctl -i -d scsi /dev/sdb
3 U4 u$ o: L; E) Psmartctl 5.43 2012-06-30 r3573 [x86_64-linux-2.6.32-431.el6.x86_64] (local build)
# O, Y# x8 q' {% zCopyright (C) 2002-12 by Bruce Allen, http://smartmontools.sourceforge.net
9 L7 W2 w: f: h& E* V2 B+ T: W6 ~% A s, h+ X/ I0 K8 S7 C
' p4 z% n0 N2 \# N1 e) R; j( EVendor: AMCC
4 x* K& @, C+ A. @Product: 9650SE-12M DISK
( ], B5 M! N# S8 Y5 j* S* b; uRevision: 4.10) ~% V8 b; F* }1 m- I' I
User Capacity: 2,999,988,518,912 bytes [2.99 TB]
( i- p1 m* @# w4 p" N9 {+ JLogical block size: 512 bytes% u' R; v( P- b
Logical Unit id: 0x600050e09e18e100d23a0000d6b30000
6 P% n6 q( i( `- t5 hSerial number: 56L4B0GS9E18E100D23A X& C0 G+ ?7 e! H
Device type: disk& s3 Z/ C+ R- l0 v+ K
Local Time is: Mon Jan 25 09:05:11 2016 CST; W( D4 K# e5 h: Y
Device supports SMART and is Disabled
% g* o6 ~+ [# a: e- `3 sTemperature Warning Disabled or Not Supported
7 k0 U. ^9 `2 ?4 U[測試硬碟健康狀態]2 t% H8 t1 Z! o
smartctl -H -d scsi /dev/sdb也可參考 http://www.av4u.info/forum.php?m ... ypeid%26typeid%3D43
- \& i9 r+ g4 v! q6 q
9 q( E& ?2 Z4 g; Z |