Created
August 17, 2012 07:26
-
-
Save malesch/3376712 to your computer and use it in GitHub Desktop.
Creation of RAID-1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> parted /dev/sda | |
> (parted) mklabel gpt | |
> (parted) mkpart primary 1 -1 | |
> (parted) p | |
> parted /dev/sdb | |
> (parted) mklabel gpt | |
> (parted) mkpart primary 1 -1 | |
> (parted) p | |
> mdadm --zero-superblock /dev/sda1 /dev/sdb1 | |
# add 'DEVICE /dev/sda1 /dev/sdb1' at the top of /etc/mdadm/mdadm.conf | |
> mdadm --create --verbose /dev/md0 --assume-clean --level=1 --raid-devices=2 /dev/sd[ab]1 | |
> mdadm --examine --scan >> /etc/mdadm/mdadm.conf | |
> mkfs.ext4 -b 4096 -O has_journal,dir_index -m .1 /dev/md0 | |
# add to /etc/fstab | |
# /dev/md0 /mnt/md0 ext4 defaults |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment