
ディスク:
/dev/sda
/dev/sdb
/dev/md127
リンク:https://coreos.com/ignition/docs/latest/examples.html#raid 対応データボリュームの作成
この構成では、2 つの別々のディスク間に RAID0 ext4 ボリューム (データ) が設定されます。
質問: 3 つのディスクに RAID10 を構成するにはどうすればよいでしょうか?
{
"ignition": { "version": "2.0.0" },
"storage": {
"disks": [
{
"device": "/dev/sda",
"wipeTable": true,
"partitions": [{
"label": "raid.1.1",
"number": 1,
"size": 20480,
"start": 0
}]
},
{
"device": "/dev/sdb",
"wipeTable": true,
"partitions": [{
"label": "raid.1.2",
"number": 1,
"size": 20480,
"start": 0
}]
}
],
"raid": [{
"devices": [
"/dev/disk/by-partlabel/raid.1.1",
"/dev/disk/by-partlabel/raid.1.2"
],
"level": "stripe",
"name": "data"
}],
"filesystems": [{
"mount": {
"device": "/dev/md/data",
"format": "ext4",
"create": { "options": [ "-L", "DATA" ] }
}
}]
},
"systemd": {
"units": [{
"name": "var-lib-data.mount",
"enable": true,
"contents": "[Mount]\nWhat=/dev/md/data\nWhere=/var/lib/data\nType=ext4\n\n[Install]\nWantedBy=local-fs.target"
}]
}
}
以下の設定を試してみました。OS は正常にインストールされましたが、最初の起動時に「ignition(disks) の起動ジョブが実行中です」で一時停止します。
{
"ignition": { "version": "2.0.0" },
"storage": {
"disks": [
{
"device": "/dev/sda",
"wipeTable": true,
"partitions": [{
"label": "raid.1.1",
"number": 1,
"start": 0
}]
},
{
"device": "/dev/sdb",
"wipeTable": true,
"partitions": [{
"label": "raid.1.2",
"number": 1,
"start": 0
}]
},
{
"device": "/dev/md127",
"wipeTable": true,
"partitions": [{
"label": "raid.1.3",
"number": 1,
"start": 0
}]
}
],
"raid": [{
"devices": [
"/dev/disk/by-partlabel/raid.1.1",
"/dev/disk/by-partlabel/raid.1.2",
"/dev/disk/by-partlabel/raid.1.3"
],
"level": "raid10",
"name": "data"
}],
"filesystems": [{
"mount": {
"device": "/dev/md/data",
"format": "ext4",
"create": { "options": [ "-L", "DATA" ] }
}
}]
},
"systemd": {
"units": [{
"name": "var-lib-data.mount",
"enable": true,
"contents": "[Mount]\nWhat=/dev/md/data\nWhere=/var/lib/data\nType=ext4\n\n[Install]\nWantedBy=local-fs.target"
}]
}
}
PS: PXEBOOTでCoreOSをインストールしています
coreos-install -V current -C beta -c cloud-config.yml -i ignition.yml