Show Table of Contents
5.4. 为节点定义 Root Disk
以下节点可能会使用多个磁盘。这意味着,director 需要可以区分在 provisioning 时被用作 root 磁盘的的磁盘。以下的几个属性可以被用来帮助 director 区分 root 磁盘:
model(字符串):设备 ID。vendor(字符串):设备厂商。serial(字符串):磁盘序列号。wwn(字符串):唯一的存储 ID。hctl(字符串):SCSI 的 Host:Channel:Target:Lun。size(整数):设备的大小(以 GB 为单位)。
在这个示例中,使用磁盘的序列号来指定 root 设备来部署 Overcloud 镜像。
首先,找到每个节点的 root 设备的序列号。为每个节点运行
ironic node-show 命令,从 extra 项中找到块设备。例如,使用以下命令列出所有节点以及它们的块设备:
$ for uuid in `ironic node-list | awk '{print $2}'`; do echo "Node ID: $uuid"; ironic node-show $uuid | grep 'properties\|extra ' -A3; done
在这个示例的输出中,一个 Controller 节点会包括以下磁盘:
...
Node ID: 1a4e30da-b6dc-499d-ba87-0bd8a3819bc0
| extra | {u'newly_discovered': u'true', u'block_devices': |
| | {u'serials': [u'100000000', u'100000001', |
| | u'100000002', u'100000003', u'100000004', |
| | u'100000005', u'100000006', u'100000007', |
--
| properties | {u'cpu_arch': u'x86_64', u'root_device': {u'serial': |
| | u'100000005'}, u'cpus': u'16', u'capabilities': |
| | u'profile:control,boot_option:local', |
| | u'memory_mb': u'65536', u'local_gb': u'3725'} |
...
这里显示了一系列以
block_devices 参数标识的块设备,以及每个设备的序列号。root_device 当前的序列号被设置为 100000005。在这个示例中,把序列号为 100000000 的磁盘设置为 root 设备。这需要对 root_device 磁盘进行修改:
$ ironic node-update 1a4e30da-b6dc-499d-ba87-0bd8a3819bc0 add properties/root_device='{"serial": "100000000"}'
这将帮助 director 区分特定的磁盘来作为 root 磁盘。当开始创建 Overcloud 时,director 会部署这个节点,把 Overcloud 镜像写入到这个磁盘。

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.