tid=26553&當linux系統裝有多顆硬碟且使用raid0組合成一顆磁碟,不幸其中一顆毀損時,整個磁碟就找不到了,且資料全部遺失,如果是重要資料的話,那就真的GG了.8 c7 m# T+ h+ G7 d
本篇重點是在說明"如何找出哪一顆出問題",那就是找出硬碟的型號及序號:" K5 B+ Z. y5 A; q- `, ^
3 K& ?& h0 l- i) Z3 L6 r9 Z
#hdparm -I /dev/sd?|grep -E "Number|/dev"
9 W2 P" b5 u7 d: l t, i/dev/sda:1 O8 ^0 C. M! T; j" x
Model Number: HDS722516VLSA80 4 i' I7 ^+ ?$ v2 p5 m
Serial Number: VN6D3ECDD7RG1D
# S6 Q& L& d6 m$ J/dev/sdb:
9 n9 Q: b7 V# v Model Number: WDC WD740GD-00FLA1 ) f! _2 M( g4 h& N
Serial Number: WD-WMAKE1690676, s8 k a& t& ~/ a( N
/dev/sdc:
9 E8 H! ^* K# e! y4 E# _ m Model Number: HDS722525VLSA80
. n) c0 o. D/ E- B' I+ C Serial Number: VN6J3ECFEALJRD
# b6 h; A) i* C2 X& U/dev/sdd:; q5 Q: {1 o6 C4 L: B' p! V$ g" L* k
Model Number: HDS722525VLSA80 - f5 R6 b1 N) `) ^7 N
Serial Number: VN6J3ECFEBSR1D) z4 C; V8 j6 x+ I' K5 o
( C; L8 ^7 d, ?& t" A" L
3 N+ z) `- l( o; k" H/ k
註:. Y: v g8 @7 ^, C# o2 g
hdparm並不一定可以適用所有硬碟,有些廠牌可能不支援此指令,可能會出現如下錯誤:4 }! s6 G% |! w( T
HDIO_DRIVE_CMD(identify) failed: Invalid argument
" Q8 Z: t! f0 q" E3 a5 j可以使用: 參考 http://70tw.spotlight.net.tw/?p=330( s3 j- W. u2 Q' o0 r+ y6 k1 i
smartctl -i -d ata /dev/sda # ata 是 sata, 假如無 smartctl ===> yum install smartmontools
( c% U8 S1 d' P+ U/ ?& u a9 B. G, ]& qsmartctl -i -d scsi /dev/sdb # scsi 硬碟
7 t# b1 h9 \6 f9 R" U[root@server ~]# smartctl -i -d scsi /dev/sdb- p# M5 \' ~! ]
smartctl 5.43 2012-06-30 r3573 [x86_64-linux-2.6.32-431.el6.x86_64] (local build)
8 s) u8 N+ ]: c4 H! l- c# JCopyright (C) 2002-12 by Bruce Allen, http://smartmontools.sourceforge.net
# w8 ~/ Z4 N! S7 i( J( N( S5 w0 v$ @, t, a) _! x4 l+ @/ I0 [
. w7 H d0 m m& V: U
Vendor: AMCC0 d/ r; q/ N3 t) S; ?+ |
Product: 9650SE-12M DISK& g( g2 i: d, P) `& I' A
Revision: 4.10
% K4 j; \9 [, e9 _4 D0 e* @User Capacity: 2,999,988,518,912 bytes [2.99 TB]. \9 {4 d6 J- m+ i
Logical block size: 512 bytes! Q( p& q1 z* w
Logical Unit id: 0x600050e09e18e100d23a0000d6b30000
: R# o2 R" V, n3 r4 j2 rSerial number: 56L4B0GS9E18E100D23A+ M m; N8 v0 D* S
Device type: disk7 c( I/ v( U* P
Local Time is: Mon Jan 25 09:05:11 2016 CST
4 g0 l. V! ~ |7 N1 T: UDevice supports SMART and is Disabled
! _* I$ q7 M+ Q) m/ {Temperature Warning Disabled or Not Supported/ W6 O: ^2 `% \& f8 \
[測試硬碟健康狀態]* k$ Y9 T# i1 s" r. w/ ~0 D- t
smartctl -H -d scsi /dev/sdb也可參考 http://www.av4u.info/forum.php?m ... ypeid%26typeid%3D43- G$ O$ |9 z/ h; y! D" Y- K4 @
% `9 `, s* H& ~. `
|