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,099
13년 전 조회 1,216
13년 전 조회 1,571
13년 전 조회 685
13년 전 조회 742
13년 전 조회 669
13년 전 조회 613
13년 전 조회 915
13년 전 조회 960
13년 전 조회 647
13년 전 조회 892
13년 전 조회 1,468
13년 전 조회 702
13년 전 조회 1,520
13년 전 조회 583
13년 전 조회 817
13년 전 조회 596
13년 전 조회 821
13년 전 조회 674
13년 전 조회 1,017
13년 전 조회 1,068
13년 전 조회 957
13년 전 조회 2,804
13년 전 조회 588
13년 전 조회 841
13년 전 조회 738
13년 전 조회 1,225
13년 전 조회 960
13년 전 조회 1,607
13년 전 조회 1,959
13년 전 조회 1,306
13년 전 조회 3,168
13년 전 조회 1,462
13년 전 조회 818
13년 전 조회 2,257
13년 전 조회 2,694
13년 전 조회 557
13년 전 조회 677
13년 전 조회 595
13년 전 조회 682
13년 전 조회 607
13년 전 조회 825
13년 전 조회 2,075
13년 전 조회 557
13년 전 조회 544
13년 전 조회 695
13년 전 조회 654
13년 전 조회 548
13년 전 조회 869
13년 전 조회 804
13년 전 조회 560
13년 전 조회 568
13년 전 조회 1,552
13년 전 조회 805
13년 전 조회 1,196
13년 전 조회 559
13년 전 조회 1,154
13년 전 조회 699
13년 전 조회 558
13년 전 조회 830
13년 전 조회 2,351
13년 전 조회 994
13년 전 조회 1,676
13년 전 조회 595
13년 전 조회 624
13년 전 조회 871
13년 전 조회 617
13년 전 조회 1,539
13년 전 조회 524
13년 전 조회 574
13년 전 조회 883
13년 전 조회 677
13년 전 조회 600
13년 전 조회 737
13년 전 조회 752
13년 전 조회 594
13년 전 조회 2,403
13년 전 조회 1,498
13년 전 조회 1,395
13년 전 조회 599
13년 전 조회 558
13년 전 조회 647
13년 전 조회 880
13년 전 조회 681
13년 전 조회 1,241
13년 전 조회 1,334
13년 전 조회 923
13년 전 조회 1,031
13년 전 조회 2,078
13년 전 조회 2,392
13년 전 조회 5,671
13년 전 조회 573
13년 전 조회 1,022
13년 전 조회 584
13년 전 조회 794
13년 전 조회 1,431
13년 전 조회 997
13년 전 조회 641
13년 전 조회 740
13년 전 조회 578