2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-06-13 09:50:19 +00:00

Doc enhancements to localdisk instructions (#5654)

This commit is contained in:
Mark Gurevich
2018-09-27 22:52:43 -04:00
committed by Bin Xu
parent 68d102267e
commit d9df3762c4
3 changed files with 25 additions and 27 deletions

View File

@ -291,8 +291,7 @@ The following section explains how to accomplish this.
packimage rhels7.3-ppc64le-netboot-service
Note: ``enablepart=yes`` in partition file will make partition on the locak disk at every boot time. If you want to keep the contents
on local disk at next boot, remmber changing to ``enablepart=no`` after the first time provisioning.
.. note:: ``enablepart=yes`` in partition file will partition the local disk at every boot. If you want to preserve the contents on local disk at next boot, change to ``enablepart=no`` after the initial provision.
For more information on ``localdisk`` option, refer to :ref:`setup_localdisk_label`
@ -312,9 +311,9 @@ To update the xCAT software in the image at a later time:
packimage "<osimagename>"
rinstall service osimage="<osimagename>"
Note: The Service Nodes are set up as NFS-root servers for the compute nodes.
Any time changes are made to any compute image on the mgmt node it will be
necessary to sync all changes to all Service Nodes. In our case the
``/install`` directory is mounted on the servicenodes, so the update to the
compute node image is automatically available.
.. note:: The Service Nodes are set up as NFS-root servers for the compute nodes.
Any time changes are made to any compute image on the mgmt node it will be
necessary to sync all changes to all Service Nodes. In our case the
``/install`` directory is mounted on the servicenodes, so the update to the
compute node image is automatically available.

View File

@ -1,25 +1,23 @@
.. _setup_localdisk_label:
Enabling the localdisk Option
Enabling the localdisk option
-----------------------------
``Note``: You can skip this section if not using the ``localdisk`` option in your litefile table.
Several things need to be done to enable the 'localdisk' support:
.. note:: You can skip this section if not using the ``localdisk`` option in your ``litefile`` table.
Define how to partition the local disk
``````````````````````````````````````
When a node is deployed, the local hard disk needs to be partitioned and formatted before it can be used. This section explains how provide a configuration file that tells xCAT to partition a local disk and make it ready to use for the directories listed in the litefile table with the ``localdisk`` option.
When a node is deployed, the local hard disk needs to be partitioned and formatted before it can be used. This section explains how provide a configuration file that tells xCAT to partition a local disk and make it ready to use for the directories listed in the litefile table.
The configuration file needs to be specified in the ``partitionfile`` attribute of the osimage definition. The configuration file includes several parts:
The configuration file needs to be specified in the ``partitionfile`` attribute of the osimage definition. The configuration file includes several sections:
* Global parameters to control enabling or disabling the function
* [disk] part to control the partitioning of the disk
* [localspace] part to control which partition will be used to store the localdisk directories listed in the litefile table
* [swapspace] part to control the enablement of the swap space for the node.
* ``[disk]`` section to control the partitioning of the disk
* ``[localspace]`` section to control which partition will be used to store the ``localdisk`` directories listed in the ``litefile`` table
* ``[swapspace]`` section to control the enablement of the swap space for the node.
An example localdisk configuration file: ::
An example ``localdisk`` configuration file: ::
enable=yes
enablepart=no
@ -48,15 +46,15 @@ An example localdisk configuration file: ::
The two global parameters ``enable`` and ``enablepart`` can be used to control the enabling/disabling of the functions:
* enable: The localdisk feature only works when ``enable`` is set to *yes*. If it is set to *no*, the localdisk configuration will not be run.
* enable: The ``localdisk`` feature only works when ``enable`` is set to ``yes``. If it is set to ``no``, the ``localdisk`` configuration will not be run.
* enablepart: The partition action (refer to the ``[disk]`` section) will be run only when ``enablepart=yes``.
The ``[disk]`` section is used to configure how to partition a hard disk:
* dev: The path of the device file.
* clear: If set to ``yes`` it will clear all the existing partitions on this disk.
* fstype: The file system type for the new created partitions. ``ext3`` is the default value if not set.
* parts: A comma separated list of space ranges, one for each partition that will be created on the device. The valid format for each space range is ``<startpoint>-<endpoint>`` or ``<percentage of the disk>``. For example, you could set it to ``100M-10G`` or ``50``. If you set it to ``50``, that means 50% of the disk space will be assigned to that partition.
* fstype: The file system type for the new created partitions. ``ext3`` is the default.
* parts: A comma separated list of space ranges, one for each partition that will be created on the device. The valid format for each space range is ``<startpoint>-<endpoint>`` or ``<percentage of the disk>``. For example, you could set it to ``100M-10G`` or ``50``. If set to ``50``, 50% of the disk space will be assigned to that partition.
The ``[localspace]`` section is used to specify which partition will be used as local storage for the node.
@ -67,21 +65,23 @@ the ``[swapspace]`` section is used to configure the swap space for the statelit
* dev: The path of the partition file which will be used as the swap space.
To enable the local disk capability, create the configuration file (for example in ``/install/custom``) and set the path in the partitionfile attribute for the osimage: ::
To enable the local disk capability, create the configuration file (for example in ``/install/custom``) and set the path in the ``partitionfile`` attribute for the osimage: ::
chdef -t osimage partitionfile=/install/custom/cfglocaldisk
chdef -t osimage <osimage> partitionfile=/install/custom/cfglocaldisk
Now all nodes that use this osimage (i.e. have their provmethod attribute set to this osimage definition name), will have its local disk configured.
Now all nodes that use this osimage (i.e. have their ``provmethod`` attribute set to this osimage definition name), will have its local disk configured.
Configure the files in the litefile table
`````````````````````````````````````````
For the files/directories that you would like xCAT to store on the local disk, add an entry in the litefile table like this: ::
For the files/directories to store on the local disk, add an entry in the ``litefile`` table: ::
"ALL","/tmp/","localdisk",,
``Note``: you do not need to specify the swap space in the litefile table. Just putting it in the partitionfile config file is enough.
.. note:: you do not need to specify the swap space in the litefile table. Just putting it in the ``partitionfile`` config file is enough.
Add an entry in policy table to permit the running of the ``getpartition`` command from the node ::
chtab priority=7.1 policy.commands=getpartition policy.rule=allow
Run ``genimage`` and ``packimage`` for the osimage

View File

@ -1,4 +1,3 @@
.. include:: ../../../common/deployment/enable_localdisk.rst
``Note``:
* To keep the contents on local disk after you using ``enablepart=yes`` to do the disk partitioning, make sure to set ``enablepart=no`` in partition configuration file after the node is booted.
.. note:: ``enablepart=yes`` in partition file will partition the local disk at every boot. If you want to preserve the contents on local disk at next boot, change to ``enablepart=no`` after the initial provision. A log file ``/.sllocal/log/localdisk.log`` on the target node can be used for debugging.