TEXT   48

MD raid

Guest on 12th June 2022 03:55:07 AM

  1.  
  2. # MD RAID
  3.  
  4. # no thanks to low end ide hardware raid maybe autodetected sooner or later
  5. yum remove dmraid && reboot
  6.  
  7. lsblk
  8. ls /dev/md*
  9.  
  10. ? mdadm --stop /dev/md...
  11. https://superuser.com/questions/603481/how-do-i-reactivate-my-mdadm-raid5-array
  12.  
  13. gdisk -> partitions to fd00
  14.  
  15. e.g.
  16.  
  17. for i in  /dew/sd{a..d} /dev/sd{f..i} ; do gdisk $i ; done
  18.  
  19. for i in /dev/sd{a..d}1 /dev/sd{f..i}1 ; do dd if=/dev/zero of=${i} bs=128k count=3200 status=progress; done
  20.  
  21. cat /proc/mdstat
  22. mdadm --stop /dev/md...
  23.  
  24. # for raid 5 (more space, less advanced level)
  25. mdadm -C /dev/md127 -c 16 -l 5 -n 8 /dew/sd{a..d}1 /dev/sd{f..i}1
  26.  
  27. # for raid 6 and one spare e.g.
  28. mdadm -C /dev/md127 -c 16 -l 6 -n 7 /dev/sd{b..h}1 --spare-devices=1 /dev/sdi
  29.  
  30. mdadm --examine --scan > /etc/mdadm.conf
  31.  
  32. # keep waiting
  33. while sleep 10; do awk '/%/{printf "  %s\r", $4}' /proc/mdstat; done
  34. # watch temperatures
  35. while : ; do echo $(for i in /dev/sd{a..i}; do echo -n "$i  "; smartctl -A $i | awk '/^194 /{print $10}'; done); sleep 60; done > /var/log/temperatures &
  36. tail -f /var/log/temperatures
  37.  
  38. # remember to format
  39. mkfs.ext4  /dev/md127
  40.  
  41. # update /etc/fstab -- e.g.
  42. /dev/md127    /srv   ext4  defaults  1  2
  43.  
  44. # avoid systemd mdadm.service error, add at least some e-mail address
  45. vim /etc/mdadm.conf
  46. -
  47. MAILADDR user@localhost
  48. -
  49.  
  50. # https://www.centos.org/forums/viewtopic.php?t=62007
  51.  
  52. # check config
  53. systemctl start mdmonitor
  54. systemctl status mdmonitor
  55.  
  56. # lsblk -f
  57. # smartctl -h
  58. for i in /dev/sd?; do printf "\n%9s\n" $i; smartctl -a $i | awk '/^M|^  5|^  9|^19[78]/{printf "%-25s %8s\n", $2, $NF}'; done
  59.  
  60. # lsblk -f -i | cut --complement -c 52-90
  61.  
  62. == ca 2 TB storage area ready for testing :) ===
  63.  
  64. # e.g. collection of 100 000 "images"
  65.  
  66. mkdir -p -v  {0..9}/{0..9}{0..9}
  67. for i in ?/??; do pushd $i; for j in {0..99}; do dd if=/dev/urandom of=$(printf "%02d.raw" $j) bs=1024k count=14 status=none; done; popd; done
  68.  
  69.  
  70. # system stability vs quietness vs overheating?
  71. while sleep 10; do
  72.   sensors | \grep ^[CM].*C\)$
  73.   for i in /dev/sd{a..i}; do
  74.     echo -n "$i "
  75.     smartctl -A $i | awk '/^194 /{print $10}'
  76.   done
  77.   echo
  78. done
  79.  
  80.  
  81. # NEXT WHAT?
  82.  
  83. add naive md5sum database for noticing changed bits
  84.  
  85. some test suites and custom test emulating lightroom / darktable image collection operations,
  86. save tests
  87.  
  88. rebuild and rerun with raid6
  89.  
  90. lvm raid with dm integrity
  91. https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/configuring_and_managing_logical_volumes/assembly_configure-mange-raid-configuring-and-managing-logical-volumes#using-dm-integrity-with-raid-lv_configure-manage-raid
  92.  
  93. add deduplicating and compressing
  94. https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/deduplicating_and_compressing_storage
  95.  
  96. then same tricks with btrfs
  97.  
  98. then ZFS 2.0
  99.  
  100. try ceph ? http://docs.ceph.com/docs/master/
  101.  
  102. try swift ? https://docs.openstack.org/swift/
  103.  
  104. save + study results
  105.  
  106. install open and free bsd, rerun everything, how much sloweri i/o?

Raw Paste


Login or Register to edit or fork this paste. It's free.