Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Step 1: Create Partitions on both(all) devices, these partitions must be identical in size and of partition type "FD" (Linux raid autodetect)
- Step 2: Create arrays the following example is for creating raid1 on 2 drives (sda and sdb) with 4 partitions:
- mdadm --create --verbose /dev/md/md1 --level=1 --raid-devices=2 /dev/sd[ab]1
- mdadm --create --verbose /dev/md/md2 --level=1 --raid-devices=2 /dev/sd[ab]2
- mdadm --create --verbose /dev/md/md3 --level=1 --raid-devices=2 /dev/sd[ab]3
- mdadm --create --verbose /dev/md/md4 --level=1 --raid-devices=2 /dev/sd[ab]4
- 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)
- Step 3: Format the new devices to ext4:
- mkfs.ext4 /dev/md/md1
- mkfs.ext4 /dev/md/md2
- mkfs.ext4 /dev/md/md3
- mkfs.ext4 /dev/md/md4
- Step 4: Output updated mdadm.conf:
- mdadm -Es >> /etc/mdadm.conf
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement