Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
linux:raid [2013/07/15 20:44]
admin
linux:raid [2017/03/20 11:51] (current)
tomsa [Setting up RAID10 with tw_cli]
Line 27: Line 27:
   mdadm: ... critical section passed.   mdadm: ... critical section passed.
   #   #
 +</​code>​
 +
 +**Nekdy se muze hodit:**
 +
 +tags: 3ware tw_cli replace drive
 +
 +<​code>​
 +echo "0 0 0" > /​sys/​bus/​scsi/​devices/​0\:​0\:​4\:​0/​rescan
 </​code>​ </​code>​
 ===== Links ===== ===== Links =====
Line 115: Line 123:
        ​7 ​      ​8 ​     145        7      active sync   /​dev/​sdj1        ​7 ​      ​8 ​     145        7      active sync   /​dev/​sdj1
 </​code>​ </​code>​
 +
 +====== Speed Up ======
 +<​code>​
 + ​echo ​    6144 > /​sys/​block/​md3/​md/​stripe_cache_size  ​
 + ​echo ​  40000 > /​proc/​sys/​dev/​raid/​speed_limit_min
 + echo 256000 > /​proc/​sys/​dev/​raid/​speed_limit_max
 +</​code>​
 +
 ====== 3ware Utility ====== ====== 3ware Utility ======
   * http://​www.3ware.com/​support/​download.asp (the 900kB one!)   * http://​www.3ware.com/​support/​download.asp (the 900kB one!)
Line 139: Line 155:
   ctrl slot=0 create type=ld drives=1I:​1:​3 raid=0   ctrl slot=0 create type=ld drives=1I:​1:​3 raid=0
  </​code> ​  </​code> ​
 +
 +====== RAID10 performance ======
 +    mdadm -v --create /dev/md0 --level=raid10 --layout=f2 --raid-devices=4 ...
 +The trick is "​layout=f2"​ as the man page says>
 +'' ​ Finally, the layout options for RAID10 are one of '​n',​ '​o'​ or '​f'​ followed by a small number. ​ The default is '​n2'​. ​ The supported options are:
 +
 +              '​n'​ signals '​near'​ copies. ​ Multiple copies of one data block are at similar offsets in different devices.
 +
 +              '​o'​ signals '​offset'​ copies. ​ Rather than the chunks being duplicated within a stripe, whole stripes are duplicated but are rotated by  one  device ​ so
 +              duplicate blocks are on different devices. ​ Thus subsequent copies of a block are in the next drive, and are one chunk further down.
 +
 +              '​f'​ signals '​far'​ copies (multiple copies have very different offsets). ​ See md(4) for more detail about '​near',​ '​offset',​ and '​far'​.
 +
 +              The  number is the number of copies of each datablock. ​ 2 is normal, 3 can be useful. ​ This number can be at most equal to the number of devices in the
 +              array. ​ It does not need to divide evenly into that number (e.g. it is perfectly legal to have an '​n2'​ layout for  an  array  with  an  odd  number ​ of
 +              devices).
 +
 +''​
 +====== Setting up RAID10 with tw_cli ======
 +Generating the RAID10 field with disks in ports from 8 to 17:
 +  ./tw_cli /c0 add type=raid10 disk=8-17 noautoverify
 +Software way of removing a disk from port 14:
 +  ./tw_cli maint remove c0 p14
 +Taking a look of what has it done:
 +  ./tw_cli /c0/u0 show
 +"​Adding"​ a disk back to the file system (more like identifying it):
 +  ./tw_cli maint rescan c0
 +Starting the verification process (if the unit was not previously initialized,​ it will be):
 +  ./tw_cli /c0/u0 start verify
 +If you need to check which disk is connected to each port, you can use this command, it will light the external GUI light:
 +  ./tw_cli /c0/p16 set identify=on
 +
 +Add disk to raid:
 +   ​tw-cli /c0/u0 start rebuild disk=16
 +   
 +If the disk is in another unit (i.e. u1), just delete the unit
 +  tw-cli /c0/u1 del
 +
 +Problem: after physically removing a disk and installing it back, RAID started re-initializing by its own will without letting the master know. It's just bad.
 +
 +
 
linux/raid.1373913851.txt.gz · Last modified: 2013/07/15 20:44 by admin