Advertisement
shokti

centos 6.5 - RAID 1

Jun 11th, 2014
313
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.18 KB | None | 0 0
  1. partition first disk and select type fd - linux raid autodetect
  2. fdisk /dev/sdb
  3.  
  4. detect new partition
  5. partprobe /dev/sdb
  6.  
  7. partition second disk and select type fd - linux raid autodetect
  8. fdisk /dev/sdc
  9.  
  10. detect new partition
  11. partprobe /dev/sdc
  12.  
  13. create raid 1
  14. mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/sdb1 /dev/sdc1
  15.  
  16. watch the raid build progress
  17. watch cat /proc/mdstat
  18.  
  19. format new raid disk
  20. mkfs.ext4 /dev/md0
  21.  
  22. Your system doesn't automatically remember all the component partitions of your RAID set. This information has to be kept in the mdadm.conf
  23. mdadm --detail --scan > /etc/mdadm.conf
  24. (for ubuntu mdadm --detail --scan > /etc/mdadm/mdadm.conf)
  25.  
  26. mount raid1 disk
  27. mkdir /mnt/raid
  28. mount /dev/md0 /mnt/raid/
  29. df -H /mnt/raid/
  30.  
  31. add in fstab
  32. nano /etc/fstab
  33. -------------------------------------------------------------------
  34. /dev/md0 /mnt/raid ext4 defaults 1 2
  35. --------------------------------------------------------------------
  36.  
  37. mount all the devices in the /etc/fstab file that have automounting enabled (default) and that are also not already mounted.
  38. mount -a
  39.  
  40.  
  41. to get detailed info about the raid
  42. mdadm --query --detail /dev/md0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement