Software RAID5 Failure Test
Software RAID5 Failure Test
v1.1, 2004-12-30
Software RAID5¿¡¼ °íÀÇ·Î ±¸¼º µð½ºÅ©¸¦ °íÀå³»°í º¹±¸ÇÏ´Â °úÁ¤À» ´ãÀº ¹®¼ÀÔ´Ï´Ù.
ÀÌ ¹®¼´Â ³× °³ÀÇ SCSIµð½ºÅ©·Î ±¸¼ºµÈ Software RAID5 ÀåÄ¡¿¡¼ °íÀÇ·Î µð½ºÅ© Àå¾Ö¸¦ ¹ß»ý½ÃÅ°°í On-line»óÅ¿¡¼ HotSwapÇÏ´Â ÀÛ¾÷¿¡ ´ëÇØ ¼³¸íÇÕ´Ï´Ù.
Software RAIDÀÇ ¼³Á¤ ¹× »ç¿ë¿¡ °üÇÑ ³»¿ëÀº
Software RAID HOWTO¸¦ Âü°íÇϽñ⠹ٶø´Ï´Ù.
ÀÌ ¹®¼ÀÇ ¿øº»À̳ª ÃÖ½ÅÆÇÀº
¿©±â¿¡¼ ±¸ÇÒ ¼ö ÀÖ½À´Ï´Ù.
º» ¹®¼ÀÇ ³»¿ëÀ¸·Î ÀÎÇØ ÀϾ ¼ö ÀÖ´Â ¾î¶°ÇÑ ÀÏ¿¡ ´ëÇؼµµ ÀúÀÚ ¹× ÇØ´ç ¼ÒÇÁÆ®¿þ¾î °³¹ßÀڴ åÀÓÀ» ÁöÁö ¾Ê½À´Ï´Ù.
º» ¹®¼ÀÇ ³»¿ëÀ» ½ÇÇàÇϱâ Àü¿¡ ±ÍÇÏÀÇ µ¥ÀÌÅ͸¦ ¹é¾÷ÇϽǰÍÀ» ±ÇÀåÇÕ´Ï´Ù.
dmesgÁß RAID°ü·Ã ºÎºÐÀÔ´Ï´Ù.
md: md driver 0.90.0 MAX_MD_DEVS=256, MD_SB_DISKS=27
md: raidstart(pid 493) used deprecated START_ARRAY ioctl. This will not be supported beyond 2.6
md: autorun ...
md: considering sde ...
md: adding sde ...
md: adding sdd ...
md: adding sdc ...
md: adding sdb ...
md: created md0
md: bind<sdb>
md: bind<sdc>
md: bind<sdd>
md: bind<sde>
md: running: <sde><sdd><sdc><sdb>
raid5: automatically using best checksumming function: pIII_sse
pIII_sse : 2044.000 MB/sec
raid5: using function: pIII_sse (2044.000 MB/sec)
md: raid5 personality registered as nr 4
raid5: device sdd operational as raid disk 2
raid5: device sdc operational as raid disk 1
raid5: device sdb operational as raid disk 0
raid5: allocated 3161kB for md0
raid5: raid level 5 set md0 active with 3 out of 3 devices, algorithm 2
RAID5 conf printout:
--- rd:3 wd:3 fd:0
disk 0, o:1, dev:sdb
disk 1, o:1, dev:sdc
disk 2, o:1, dev:sdd
md: ... autorun DONE.
RAID ÀåÄ¡ÀÇ ¼³Á¤ ³»¿ëÀ» ´ã°í ÀÖ´Â /etc/raidtab ÆÄÀÏÀÇ ³»¿ëÀÔ´Ï´Ù.
/dev/sde°¡ spare-disk·Î ¼³Á¤µÇ¾î Àֱ⶧¹®¿¡ Àå¾Ö°¡ ¹ß»ýÇϸé Áï½Ã ¹®Á¦ÀÇ µð½ºÅ©¸¦ ´ëüÇÏ°Ô µË´Ï´Ù.
[root@csdove /]# more /etc/raidtab
raiddev /dev/md0
raid-level 5
nr-raid-disks 3
nr-spare-disks 1
parity-algorithm left-symmetric
persistent-superblock 1
chunk-size 128
device /dev/sdb
raid-disk 0
device /dev/sdc
raid-disk 1
device /dev/sdd
raid-disk 2
device /dev/sde
spare-disk 0
Á¤»ó ÀÛµ¿ÁßÀÎ arrayÀÇ /proc/mdstatÀÇ ³»¿ëÀÔ´Ï´Ù.
[root@csdove /]# more /proc/mdstat
Personalities : [raid5]
md0 : active raid5 sde[3] sdd[2] sdc[1] sdb[0]
71687168 blocks level 5, 128k chunk, algorithm 2 [3/3] [UUU]
unused devices: <none>
arrayÀÇ ±¸¼º µð½ºÅ©Áß Çϳª(sdc)¸¦ °©ÀÚ±â Å»ÂøÇß½À´Ï´Ù.
Àá±ñÀÇ ½Ã°£ÀÌ È帥µÚ ½Ã½ºÅÛÀº ÀåÄ¡ÀÇ ÀÌ»óÀ» °¨ÁöÇÏ°í ¿¡·¯¸Þ¼¼Áö¸¦ Ãâ·ÂÇÕ´Ï´Ù.
SCSI error : <0 0 4 0> return code = 0x10000
end_request: I/O error, dev sdc, sector 71687168
md: write_disk_sb failed for device sdc
SCSI error : <0 0 4 0> return code = 0x10000
md: write_disk_sb failed for device sdc
end_request: I/O error, dev sdc, sector 71687168
SCSI error : <0 0 4 0> return code = 0x10000
end_request: I/O error, dev sdc, sector 71687168
md: write_disk_sb failed for device sdc
SCSI error : <0 0 4 0> return code = 0x10000
end_request: I/O error, dev sdc, sector 71687168
md: write_disk_sb failed for device sdc
SCSI error : <0 0 4 0> return code = 0x10000
end_request: I/O error, dev sdc, sector 71687168
md: write_disk_sb failed for device sdc
RAID¿¡¼µµ ÀÌ»óÀ» °¨ÁöÇÕ´Ï´Ù.
RAID5 conf printout:
--- rd:3 wd:2 fd:1
disk 0, o:1, dev:sdb
disk 1, o:0, dev:sdc
disk 2, o:1, dev:sdd
RAID5 conf printout:
--- rd:3 wd:2 fd:1
disk 0, o:1, dev:sdb
disk 2, o:1, dev:sdd
¿¹ºñ µð½ºÅ©·Î ¼³Á¤ÇØ µÎ¾ú´ø sde°¡ ÀÚµ¿À¸·Î sdb¸¦ ´ëüÇÑµÚ reconstructionÀ» ½ÃÀÛÇÕ´Ï´Ù.
RAID5¿¡¼´Â ´ç¿¬ÇÑ À̾߱âÁö¸¸ µð½ºÅ© Àå¾Ö¸¦ °¨ÁöÇÏ°í ÀÚµ¿ º¹±¸°¡ ¼öÇàµÇ´Â µ¿¾È¿¡µµ
arrayÀÇ µ¥ÀÌÅÍ´Â ¾Æ¹«·± ÀÌ»ó¾øÀÌ ¾×¼¼½º°¡ °¡´ÉÇÕ´Ï´Ù.
RAID5 conf printout:
--- rd:3 wd:2 fd:1
disk 0, o:1, dev:sdb
disk 1, o:1, dev:sde
disk 2, o:1, dev:sdd
md: syncing RAID array md0
md: minimum _guaranteed_ reconstruction speed: 1000 KB/sec/disc.
md: using maximum available idle IO bandwith (but not more than 200000 KB/sec) for reconstruction.
md: using 128k window, over a total of 35843584 blocks.
raidhotremove ¸í·ÉÀ¸·Î °íÀå³ ÀåÄ¡¸¦ array¿¡¼ Á¦°ÅÇÕ´Ï´Ù.
ÀÌ ÀÛ¾÷Àº º¹±¸°¡ ¼öÇàµÇ´Â Áß¿¡µµ ÇÒ ¼ö ÀÖ½À´Ï´Ù.
[root@csdove ~]# raidhotremove /dev/md0 /dev/sdc
md: trying to remove unknown-block(8,32) from md0 ...
md: unbind<sdc>
md: export_rdev(sdc)
À§ ¸í·É ¼öÇàÈÄÀÇ /proc/mdstat ÀÇ ³»¿ëÀÔ´Ï´Ù.
[root@csdove ~]# more /proc/mdstat
Personalities : [raid5]
md0 : active raid5 sde[1] sdd[2] sdb[0]
71687168 blocks level 5, 128k chunk, algorithm 2 [3/3] [UUU]
unused devices: <none>
°íÀå³ µð½ºÅ©¸¦ ±³Ã¼ÇÏ¿© ½Ã½ºÅÛ¿¡ ºÎÂøÇÏ¸é ½Ã½ºÅÛÀÌ À̸¦ °¨ÁöÇÏ°í ¸Þ¼¼Áö¸¦ Ãâ·ÂÇÕ´Ï´Ù.
scsi0: Someone reset channel A
scsi0: Someone reset channel A
scsi0: Someone reset channel A
scsi0: Someone reset channel A
scsi0: Someone reset channel A
raidhotadd ¸í·ÉÀ¸·Î »õÀåÄ¡¸¦ array¿¡ Ãß°¡ÇÕ´Ï´Ù.
[root@csdove ~]# raidhotadd /dev/md0 /dev/sdc
md: trying to hot-add unknown-block(8,32) to md0 ...
md: bind<sdc>
RAID5 conf printout:
--- rd:3 wd:3 fd:0
disk 0, o:1, dev:sdb
disk 1, o:1, dev:sde
disk 2, o:1, dev:sdd
Àå¾Ö°¡ ¹ß»ýÇÑ µð½ºÅ© sdc°¡ (F) - Fail ·Î Ç¥½ÃµÇ¾î ÀÖ´Â °ÍÀ» È®ÀÎÇÒ ¼ö ÀÖÀ¸¸ç
º¹±¸ÀÇ ÁøÇà»óȲµµ ¾Ë¾Æº¼ ¼ö ÀÖ½À´Ï´Ù.
[root@csdove ~]# more /proc/mdstat
Personalities : [raid5]
md0 : active raid5 sde[3] sdd[2] sdc[4](F) sdb[0]
71687168 blocks level 5, 128k chunk, algorithm 2 [3/2] [U_U]
[========>............] recovery = 44.8% (16076544/35843584) finish=14.2m
in speed=23114K/sec
unused devices: <none>
[root@csdove ~]# more /proc/mdstat
Personalities : [raid5]
md0 : active raid5 sde[3] sdd[2] sdc[4](F) sdb[0]
71687168 blocks level 5, 128k chunk, algorithm 2 [3/2] [U_U]
[============>........] recovery = 60.3% (21639168/35843584) finish=10.0m
in speed=23552K/sec
unused devices: <none>
[root@csdove ~]# more /proc/mdstat
Personalities : [raid5]
md0 : active raid5 sde[3] sdd[2] sdc[4](F) sdb[0]
71687168 blocks level 5, 128k chunk, algorithm 2 [3/2] [U_U]
[===================>.] recovery = 99.9% (35824896/35843584) finish=0.0mi
n speed=23019K/sec
unused devices: <none>
º¹±¸°¡ ¿Ï·áµÈ RAIDÀåÄ¡ÀÇ »óŸ¦ È®ÀÎÇÕ´Ï´Ù.
RAID¸¦ ±¸¼ºÇÏ´Â µð½ºÅ©ÀÇ ¼ø¼°¡ ¹Ù²î¾úÀ½À» ¾Ë ¼ö ÀÖ½À´Ï´Ù.
[root@csdove ~]# more /proc/mdstat
Personalities : [raid5]
md0 : active raid5 sdc[3] sde[1] sdd[2] sdb[0]
71687168 blocks level 5, 128k chunk, algorithm 2 [3/3] [UUU]
unused devices: <none>
ÀÌ ¹®¼¸¦ ¸¸µå´Âµ¥ µµ¿òÀ» ÁֽŠºÐµéÀÔ´Ï´Ù.
- ±èÁ¾º¹ Á¶±³´Ô - RAID¸¦ »ç¿ëÇÒ ¼ö ÀÖ´Â IBM x240 ½Ã½ºÅÛÀ» Á¦°øÇÏ¿© Áּ̽À´Ï´Ù.
- Mycluster´Ô - º» Å×½ºÆ®¸¦ ÇÏ°Ô²û ¿µ°¨À» Áּ̽À´Ï´Ù. ;-)
ÀÌ ¹®¼¿¡ ´ëÇÑ °³¼±»çÇ×À̳ª ¹®ÀÇÁ¡À» ÀúÀÚ¿¡°Ô º¸³»Áֽñ⠹ٶø´Ï´Ù.