12
[0:0:0:0] disk ATA INTEL SSDSCKKB48 1132 /dev/sda
[1:0:0:0] disk ATA Micron_5300_MTFD U001 /dev/sdb
[N:0:0:1] disk INTEL SSDPE2KX010T8__1 /dev/nvme0n1
In this example, the system disk letter is /dev/nvme0n1, and the drive letters used for RAID
creation is /dev/sda and /dev/sdb.
Creating a container
Perform this task to create a container for logical drive creation.
Syntax
mdadm –C container_id phy_id –n num –e imsm
Parameters
container_id: Specifies the container name.
phy_id: Specifies the physical drive letters.
num: Specifies the number of physical drives.
Examples
# Create a container named /dev/md0.
[root@localhost ~]# mdadm -C /dev/md0 /dev/sda /dev/sdb -n 2 -e imsm
mdadm: container /dev/md0 prepared.
Adding RAID arrays to a container
Perform this task to add RAID arrays to a container.
Syntax
mdadm –C RAID_id container_id –n num –l RAID_level
Parameters
RAID_id: Specifies the name of a RAID array.
container_id: Specifies the container name.
num: Specifies the number of physical drives.
RAID_level: Specifies the RAID level.
Examples
# Add RAID 1 array named /dev/md/R1 to container /dev/md0.
[root@localhost ~]# mdadm -C /dev/md/R1 /dev/md0 -n 2 -l 1
mdadm: array /dev/md/R1 started.
# Add RAID 0 array named /dev/md/R1 to container /dev/md0.
[root@localhost ~]# mdadm -C /dev/md/R1 /dev/md0 -n 2 -l 0
mdadm: array /dev/md/R1 started.
# Use two drives to create a RAID 0 array in container /dev/md0.
[root@localhost ~]# mdadm -C /dev/md0 /dev/sdc /dev/sdd -n 2 -e imsm
mdadm: /dev/sdc appears to contain an ext2fs file system
size=976762584K mtime=Wed Dec 31 19:00:00 1969
mdadm: /dev/sdd appears to contain an ext2fs file system
size=976762584K mtime=Wed Dec 31 19:00:00 1969