mdadm 소프트 레이드 raid1과 multipath 속도 테스트

 
/dev/md0 raid1로 구성
/dev/md1 multipath 로 구성
 
Personalities : [raid0] [multipath] [raid1] 
md1 : active multipath xvda8[0] xvda7[1]
      104320 blocks [2/2] [UU]
      
md0 : active raid1 xvda6[1] xvda5[0]
      104320 blocks [2/2] [UU]
 
 
 
hdparm 테스트
 
raid1 
 
1차: 
 
 Timing cached reads:   18036 MB in  1.99 seconds = 9048.53 MB/sec
 Timing buffered disk reads:  100 MB in  0.79 seconds = 126.93 MB/sec
 
2차:
 
 Timing cached reads:   15768 MB in  1.99 seconds = 7906.37 MB/sec
 Timing buffered disk reads:  100 MB in  0.92 seconds = 108.52 MB/sec
 
3차:
 
 Timing cached reads:   15724 MB in  1.99 seconds = 7885.65 MB/sec
 Timing buffered disk reads:  100 MB in  0.86 seconds = 116.37 MB/sec
 
 
multipath
 
1차:
 
 Timing cached reads:   17672 MB in  1.99 seconds = 8864.20 MB/sec
 Timing buffered disk reads:  100 MB in  0.47 seconds = 212.10 MB/sec
 
2차:
 
 Timing cached reads:   16460 MB in  1.99 seconds = 8256.26 MB/sec
 Timing buffered disk reads:  100 MB in  0.40 seconds = 248.29 MB/sec
 
3차:
 
 Timing cached reads:   16076 MB in  1.99 seconds = 8062.19 MB/sec
 Timing buffered disk reads:  100 MB in  0.44 seconds = 228.45 MB/sec
 
2. 데이터 복사 속도
 
 
20M 데이터
 
raid1 
real    0m3.290s
user    0m0.004s
sys     0m0.036s
 
multipath
real    0m0.305s
user    0m0.020s
sys     0m0.040s
 
 
3. 하드 fail 테스트
 
하드 1개씩 fail 상태로 만들기
 
초기상태 
 
[root@www local]# cat /proc/mdstat 
Personalities : [raid0] [multipath] [raid1] 
md1 : active multipath xvda8[0] xvda7[1]
      104320 blocks [2/2] [UU]
      
md0 : active raid1 xvda6[1] xvda5[0]
      104320 blocks [2/2] [UU]
      
unused devices: <none>
 
 
하드1개 fail 
 
[root@www local]# mdadm /dev/md0 -f /dev/xvda5
mdadm: set /dev/xvda5 faulty in /dev/md0
 
[root@www local]# mdadm /dev/md1 -f /dev/xvda7
mdadm: set /dev/xvda7 faulty in /dev/md1
 
 
Personalities : [raid0] [multipath] [raid1] 
md1 : active multipath xvda8[0] xvda7[2](F)
      104320 blocks [2/1] [U_]
      
md0 : active raid1 xvda6[1] xvda5[2](F)
      104320 blocks [2/1] [_U]
 
 
 
용량 및 파일 갯수
 
[root@www data1]# du -sh
20M     .
[root@www data1]# find ./ -name "*" | wc -l
593
 
[root@www data2]# du -sh
20M     .
[root@www data2]# find ./ -name "*" | wc -l
593
 
 
데이터 6M 복사
 
[root@www data2]# du -sh /data1
25M     /data1
[root@www data2]# du -sh /data2
25M     /data2
 
 
문제있는 하드 hot remove
 
[root@www data2]# mdadm /dev/md0 -r /dev/xvda5
mdadm: hot removed /dev/xvda5
[root@www data2]# mdadm /dev/md1 -r /dev/xvda7
mdadm: hot removed /dev/xvda7
 
md1 : active multipath xvda8[0]
      104320 blocks [2/1] [U_]
      
md0 : active raid1 xvda6[1]
      104320 blocks [2/1] [_U]
 
 
fail 되었던 하드 다시 포맷
 
 mkfs -j /dev/xvda5
 mkfs -j /dev/xvda7
 
새하드 hot add
 
[root@www data2]# mdadm /dev/md0 -a /dev/xvda5
mdadm: added /dev/xvda5
[root@www data2]# mdadm /dev/md1 -a /dev/xvda7
mdadm: added /dev/xvda7
 
 
하드 용량 및 파일 갯수 확인
 
[root@www data2]# du -sh /data1
25M     /data1
[root@www data2]# find /data1 -name "*" | wc -l
768
[root@www data2]# du -sh /data2
25M     /data2
[root@www data2]# find /data2 -name "*" | wc -l
768
 
 
결론: 
raid1 로 했을때 보다 multipath 로 했을때 속도도 더 잘 나옴.
자료 유실 없음.
 
차이점:
 
md1 : active multipath xvda7[2](S) xvda8[0]
      104320 blocks [2/1] [U_]
      
      --->  State : clean, degraded
 
md0 : active raid1 xvda5[0] xvda6[1]
      104320 blocks [2/2] [UU]
 
 
 
/dev/md1의 상태
 
    Number   Major   Minor   RaidDevice State
       0     202        8        0      active sync   /dev/xvda8
       1       0        0        1      removed
 
       2     202        7        -      spare   /dev/xvda7
 
리부팅후 mdadm -a /dev/md1 /dev/xvda7 하면 정상 상태로 됨.
 
[root@www data2]# cat /proc/mdstat 
Personalities : [raid1] [multipath] 
md1 : active multipath xvda7[2] xvda8[0]
      104320 blocks [2/2] [UU]
      
md0 : active raid1 xvda5[0] xvda6[1]
      104320 blocks [2/2] [UU]
 
 
[root@www data2]# du -sh /data1 ; find /data1 -name "*" | wc -l
25M     /data1
768
 
[root@www data2]# du -sh /data2 ; find /data1 -name "*" | wc -l
25M     /data2
768
|
댓글을 작성하시려면 로그인이 필요합니다.

프로그램

태그 필터 (최대 3개) 전체 개발자 소스 기타 mysql 팁자료실 javascript php linux flash 정규표현식 jquery node.js mobile 웹서버 os 프로그램 강좌 썸네일 이미지관련 도로명주소 그누보드5 기획자 견적서 계약서 기획서 마케팅 제안서 seo 통계 서식 통계자료 퍼블리셔 html css 반응형 웹접근성 퍼블리싱 표준화 반응형웹 홈페이지기초 부트스트랩 angularjs 포럼 스크린리더 센스리더 개발자톡 개발자팁 퍼블리셔톡 퍼블리셔팁 기획자톡 기획자팁 프로그램강좌 퍼블리싱강좌
+
제목 글쓴이 날짜 조회
13년 전 조회 2,234
13년 전 조회 1,278
13년 전 조회 1,713
13년 전 조회 767
13년 전 조회 819
13년 전 조회 741
13년 전 조회 683
13년 전 조회 976
13년 전 조회 1,049
13년 전 조회 729
13년 전 조회 960
13년 전 조회 1,523
13년 전 조회 760
13년 전 조회 1,587
13년 전 조회 657
13년 전 조회 885
13년 전 조회 674
13년 전 조회 912
13년 전 조회 753
13년 전 조회 1,081
13년 전 조회 1,133
13년 전 조회 1,040
13년 전 조회 2,880
13년 전 조회 642
13년 전 조회 902
13년 전 조회 804
13년 전 조회 1,302
13년 전 조회 1,013
13년 전 조회 1,691
13년 전 조회 2,036
13년 전 조회 1,396
13년 전 조회 3,271
13년 전 조회 1,525
13년 전 조회 906
13년 전 조회 2,350
13년 전 조회 2,793
13년 전 조회 627
13년 전 조회 728
13년 전 조회 660
13년 전 조회 744
13년 전 조회 660
13년 전 조회 882
13년 전 조회 2,132
13년 전 조회 606
13년 전 조회 600
13년 전 조회 751
13년 전 조회 709
13년 전 조회 602
13년 전 조회 914
13년 전 조회 855
13년 전 조회 614
13년 전 조회 621
13년 전 조회 1,647
13년 전 조회 864
13년 전 조회 1,250
13년 전 조회 598
13년 전 조회 1,236
13년 전 조회 749
13년 전 조회 601
13년 전 조회 915
13년 전 조회 2,437
13년 전 조회 1,064
13년 전 조회 1,747
13년 전 조회 638
13년 전 조회 669
13년 전 조회 921
13년 전 조회 678
13년 전 조회 1,579
13년 전 조회 576
13년 전 조회 625
13년 전 조회 963
13년 전 조회 720
13년 전 조회 644
13년 전 조회 783
13년 전 조회 801
13년 전 조회 654
13년 전 조회 2,462
13년 전 조회 1,607
13년 전 조회 1,438
13년 전 조회 664
13년 전 조회 610
13년 전 조회 704
13년 전 조회 947
13년 전 조회 747
13년 전 조회 1,323
13년 전 조회 1,387
13년 전 조회 981
13년 전 조회 1,105
13년 전 조회 2,134
13년 전 조회 2,457
13년 전 조회 5,709
13년 전 조회 620
13년 전 조회 1,078
13년 전 조회 631
13년 전 조회 850
13년 전 조회 1,506
13년 전 조회 1,062
13년 전 조회 687
13년 전 조회 789
13년 전 조회 635