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,295
13년 전 조회 1,335
13년 전 조회 1,768
13년 전 조회 811
13년 전 조회 866
13년 전 조회 795
13년 전 조회 732
13년 전 조회 1,033
13년 전 조회 1,088
13년 전 조회 763
13년 전 조회 1,006
13년 전 조회 1,571
13년 전 조회 804
13년 전 조회 1,627
13년 전 조회 701
13년 전 조회 930
13년 전 조회 714
13년 전 조회 950
13년 전 조회 804
13년 전 조회 1,123
13년 전 조회 1,189
13년 전 조회 1,071
13년 전 조회 2,919
13년 전 조회 703
13년 전 조회 942
13년 전 조회 840
13년 전 조회 1,343
13년 전 조회 1,051
13년 전 조회 1,739
13년 전 조회 2,094
13년 전 조회 1,447
13년 전 조회 3,328
13년 전 조회 1,568
13년 전 조회 950
13년 전 조회 2,408
13년 전 조회 2,846
13년 전 조회 661
13년 전 조회 763
13년 전 조회 707
13년 전 조회 798
13년 전 조회 699
13년 전 조회 926
13년 전 조회 2,179
13년 전 조회 653
13년 전 조회 646
13년 전 조회 794
13년 전 조회 751
13년 전 조회 639
13년 전 조회 953
13년 전 조회 899
13년 전 조회 657
13년 전 조회 676
13년 전 조회 1,691
13년 전 조회 899
13년 전 조회 1,297
13년 전 조회 626
13년 전 조회 1,274
13년 전 조회 790
13년 전 조회 643
13년 전 조회 957
13년 전 조회 2,492
13년 전 조회 1,119
13년 전 조회 1,790
13년 전 조회 668
13년 전 조회 712
13년 전 조회 963
13년 전 조회 714
13년 전 조회 1,610
13년 전 조회 607
13년 전 조회 658
13년 전 조회 996
13년 전 조회 760
13년 전 조회 681
13년 전 조회 816
13년 전 조회 841
13년 전 조회 694
13년 전 조회 2,500
13년 전 조회 1,641
13년 전 조회 1,474
13년 전 조회 694
13년 전 조회 640
13년 전 조회 736
13년 전 조회 973
13년 전 조회 783
13년 전 조회 1,353
13년 전 조회 1,413
13년 전 조회 1,004
13년 전 조회 1,149
13년 전 조회 2,159
13년 전 조회 2,497
13년 전 조회 5,741
13년 전 조회 661
13년 전 조회 1,109
13년 전 조회 667
13년 전 조회 885
13년 전 조회 1,546
13년 전 조회 1,094
13년 전 조회 723
13년 전 조회 828
13년 전 조회 667