Welcome, guest! Login / Register - Why register?
Psst.. new poll here.
[email protected] webmail now available. Want one? Go here.
Cannot use outlook/hotmail/live here to register as they blocking our mail servers. #microsoftdeez
Obey the Epel!

Paste

Pasted as Plain Text by rain ( 13 years ago )
root@mws64:~# lvcreate -L3G -nraid1 mws64system
  Logical volume "raid1" created
root@mws64:~# hdparm --direct -t /dev/sdb1 /dev/mws64system/raid1 

/dev/sdb1:
 Timing O_DIRECT disk reads: 190 MB in  3.03 seconds =  62.68 MB/sec

/dev/mws64system/raid1:
 Timing O_DIRECT disk reads: 190 MB in  3.00 seconds =  63.27 MB/sec
root@mws64:~# mdadm -C -l10 -p f2 -n2 /dev/md0 /dev/sdb1 /dev/mws64system/raid1
mdadm: /dev/mws64system/raid1 appears to be part of a raid array:
    level=raid10 devices=2 ctime=Mon Jan 17 19:48:40 2011
Continue creating array? y
mdadm: Defaulting to version 1.2 metadata
mdadm: array /dev/md0 started.
root@mws64:~# cat /proc/mdstat 
Personalities : [raid10] 
md0 : active raid10 dm-17[1] sdb1[0]
      3143680 blocks super 1.2 512K chunks 2 far-copies [2/2] [UU]
      [===>.................]  resync = 17.9% (563584/3143680) finish=0.8min speed=51234K/sec
      
unused devices: <none>
root@mws64:~# cat /proc/mdstat 
Personalities : [raid10] 
md0 : active raid10 dm-17[1] sdb1[0]
      3143680 blocks super 1.2 512K chunks 2 far-copies [2/2] [UU]
      
unused devices: <none>
root@mws64:~# hdparm --direct -t /dev/sdb1 /dev/mws64system/raid1 /dev/md0 

/dev/sdb1:
 Timing O_DIRECT disk reads: 190 MB in  3.01 seconds =  63.10 MB/sec

/dev/mws64system/raid1:
 Timing O_DIRECT disk reads: 192 MB in  3.03 seconds =  63.41 MB/sec

/dev/md0:
 Timing O_DIRECT disk reads: 372 MB in  3.01 seconds = 123.57 MB/sec
root@mws64:~# mkfs.xfs /dev/md0 
log stripe unit (524288 bytes) is too large (maximum is 256KiB)
log stripe unit adjusted to 32KiB
meta-data=/dev/md0               isize=256    agcount=8, agsize=98176 blks
         =                       sectsz=512   attr=2, projid32bit=0
data     =                       bsize=4096   blocks=785408, imaxpct=25
         =                       sunit=128    swidth=256 blks
naming   =version 2              bsize=4096   ascii-ci=0
log      =internal log           bsize=4096   blocks=2560, version=2
         =                       sectsz=512   sunit=8 blks, lazy-count=1
realtime =none                   extsz=4096   blocks=0, rtextents=0
root@mws64:~# mount /dev/md0 /tmp/1/
root@mws64:~# df -Th /tmp/1/
Ф. система    Тип     Разм  Исп  Дост  Исп% смонтирована на
/dev/md0       xfs    3,0G  4,3M  3,0G   1% /tmp/1
root@mws64:~# time { dd if=/dev/zero of=/tmp/1/file bs=10M ; sync ; }
dd: запись «/tmp/1/file»: На устройстве кончилось место
306+0 записей считано
305+0 записей написано
 скопировано 3202031616 байт (3,2 GB), 63,6545 c, 50,3 MB/c

real    1m3.806s
user    0m0.002s
sys     0m14.130s
root@mws64:~# calc 3202031616/63.8/1024/1024
47.8636
root@mws64:~# umount /tmp/1 
root@mws64:~# mount /dev/md0 /tmp/1/
root@mws64:~# dd of=/dev/zero if=/tmp/1/file bs=10M
305+1 записей считано
305+1 записей написано
 скопировано 3202031616 байт (3,2 GB), 24,7632 c, 129 MB/c
root@mws64:~# cd /tmp/1/
root@mws64:/tmp/1# md5sum file 
8b7ea8b9c948242cab976b7087bfc639  file
root@mws64:/tmp/1# mdadm /dev/md0 -f /dev/sdb1 
mdadm: set /dev/sdb1 faulty in /dev/md0
root@mws64:/tmp/1# mdadm /dev/md0 -r /dev/sdb1 
mdadm: hot removed /dev/sdb1 from /dev/md0
root@mws64:/tmp/1# md5sum file 
8b7ea8b9c948242cab976b7087bfc639  file
root@mws64:/tmp/1# echo 3 > /proc/sys/vm/drop_caches 
root@mws64:/tmp/1# dd of=/dev/zero if=/tmp/1/file bs=10M
305+1 записей считано
305+1 записей написано
 скопировано 3202031616 байт (3,2 GB), 66,3336 c, 48,3 MB/c
root@mws64:/tmp/1# rm file 
root@mws64:/tmp/1# time { dd if=/dev/zero of=/tmp/1/file bs=10M ; sync ; }
dd: запись «/tmp/1/file»: На устройстве кончилось место
306+0 записей считано
305+0 записей написано
 скопировано 3202031616 байт (3,2 GB), 57,8583 c, 55,3 MB/c

real    0m57.985s
user    0m0.003s
sys     0m11.792s
root@mws64:/tmp/1# calc 3202031616/58/1024/1024
52.6499
root@mws64:/tmp/1# cat /proc/mdstat 
Personalities : [raid10] 
md0 : active raid10 dm-17[1]
      3143680 blocks super 1.2 512K chunks 2 far-copies [2/1] [_U]
      
unused devices: <none>

 

Revise this Paste

Your Name: Code Language: