Advertisement
Guest User

Untitled

a guest
Jun 24th, 2017
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1. Step 1: Create Partitions on both(all) devices, these partitions must be identical in size and of partition type "FD" (Linux raid autodetect)
  2.  
  3. Step 2: Create arrays the following example is for creating raid1 on 2 drives (sda and sdb) with 4 partitions:
  4.  
  5. mdadm --create --verbose /dev/md/md1 --level=1 --raid-devices=2 /dev/sd[ab]1
  6. mdadm --create --verbose /dev/md/md2 --level=1 --raid-devices=2 /dev/sd[ab]2
  7. mdadm --create --verbose /dev/md/md3 --level=1 --raid-devices=2 /dev/sd[ab]3
  8. mdadm --create --verbose /dev/md/md4 --level=1 --raid-devices=2 /dev/sd[ab]4
  9.  
  10. Step 3: List the newly created devices with cat /proc/mdstat (if they are syncing wait for them to complete the syncing process on all devices before proceeding)
  11.  
  12. Step 3: Format the new devices to ext4:
  13.  
  14. mkfs.ext4 /dev/md/md1
  15. mkfs.ext4 /dev/md/md2
  16. mkfs.ext4 /dev/md/md3
  17. mkfs.ext4 /dev/md/md4
  18.  
  19. Step 4: Output updated mdadm.conf:
  20.  
  21. mdadm -Es >> /etc/mdadm.conf
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement