我使用以下磁盘和命令创建了一个raid1:
$ls -l /dev/disk/by-id/ata-ST3000*
lrwxrwxrwx 1 root root 9 Sep 19 07:27 /dev/disk/by-id/ata-ST3000DM001-9YN166_Z1F04NR1 -> ../../sdc
lrwxrwxrwx 1 root root 9 Sep 19 07:27 /dev/disk/by-id/ata-ST3000DM001-9YN166_Z1F190E3 -> ../../sda
$mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/disk/by-id/ata-ST3000DM001-9YN166_Z1F190E3 /dev/disk/by-id/ata-ST3000DM001-9YN166_Z1F04NR1
我将相关信息添加到mdadm.conf中.我使用’mdadm –detail –scan>> /etc/mdadm.conf’为ARRAY行:
$cat /etc/mdadm.conf
DEVICE /dev/disk/by-id/ata-ST3000DM001-9YN166_Z1F190E3
DEVICE /dev/disk/by-id/ata-ST3000DM001-9YN166_Z1F04NR1
ARRAY /dev/md0 metadata=1.2 name=jaime.WORKGROUP:0 UUID=93f2cb73:2d124630:562f1dd9:bf189029
MAILADDR your@address
我创建并挂载了文件系统:
$mkfs -t xfs /dev/md0
$mount -t xfs /dev/md0 /data
<