RAID Creation
From Linux Raid Wiki
MD devices are created using the Create
mode of mdadm
.
You need to specify the raid device to create, the raid mode (raid0, raid1, raid10, raid5, raid6 etc) and the component devices.
You can also configure many aspects of your array:
- superblock format. --metadata=1.1 or --metadata=1.2 is recommended. 0.90 and 1.0 are at the end of the device and risk exposing desynced contents if the superblock is damaged.
- device name
- name or label
- RAID-level
- superblock
- chunk size
- rounding
- layout
- Write-intent bitmap
- write-mostly
- partitionable
One question that frequently comes up with linux raid is:
“Why does linux raid do 'resync' when I create a clean array? Can I skip that?”
The answer is usually "NO". For more details see Initial Array Creation
As of lvm2 2.02.87 and linux 2.6.32, LVM can be used to create MD-RAID volumes (lvcreate --type=raidN). This offers a strong guarantee that the component devices won't be exposed.