2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-06-12 08:10:12 +00:00

Add the localdisk document also available diskless osimage (#3971)

* Not return directly for nodeset when hit one node failure

* Add document to enable localdisk option for diskless

* Revert "Not return directly for nodeset when hit one node failure"

This reverts commit e5d8857054.
This commit is contained in:
Bin Xu
2017-09-21 16:26:08 +08:00
committed by yangsong
parent 53dbeaf6b0
commit bb87df4f94
5 changed files with 94 additions and 85 deletions

View File

@ -0,0 +1,85 @@
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:
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.
The configuration file needs to be specified in the ``partitionfile`` attribute of the osimage definition. The configuration file includes several parts:
* 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.
An example localdisk configuration file: ::
enable=yes
enablepart=no
[disk]
dev=/dev/sdb
clear=yes
parts=100M-200M,1G-2G
[disk]
dev=/dev/sda
clear=yes
parts=10,20,30
[disk]
dev=/dev/sdc
clear=yes
parts=10,20,30
[localspace]
dev=/dev/sda1
fstype=ext3
[swapspace]
dev=/dev/sda2
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.
* 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.
The ``[localspace]`` section is used to specify which partition will be used as local storage for the node.
* dev: The path of the partition.
* fstype: The file system type on the partition.
the ``[swapspace]`` section is used to configure the swap space for the statelite node.
* 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: ::
chdef -t 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.
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: ::
"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.
Add an entry in policy table to permit the running of the ``getpartitioin`` command from the node ::
chtab priority=7.1 policy.commands=getpartition policy.rule=allow

View File

@ -15,3 +15,4 @@ Optional means all the subitems in this page are not necessary to finish an OS d
install_new_kernel.rst
acc_initrd_rootimg_gen_ppc64le.rst
trim_diskless_rootimg.rst
localdisk.rst

View File

@ -0,0 +1 @@
.. include:: ../../../common/deployment/enable_localdisk.rst

View File

@ -0,0 +1,6 @@
.. include:: ../../../common/deployment/enable_localdisk.rst
``Note``:
* `localdisk` feature won't syncronize the files/directories defined in `litefile` table from diskless image to local disk at the node boot time. It might casue issue to the application which depends on some of those directories. For example, the ``httpd`` service cannot be started if ``/var/log/`` is defined in `litefile` table. To work around this, you may copy the required contents to local disk and restart service manually at the first time.
* To keep the contents on local disk after you use ``enablepart=yes`` to do partitioin, make sure to set ``enablepart=no`` in partitioin configuration file after the node is booted.

View File

@ -162,91 +162,7 @@ Obtain you new kernel and kernel modules on the MN, for example here we have a n
uname -a
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:
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.
The configuration file needs to be specified in the ``partitionfile`` attribute of the osimage definition. The configuration file includes several parts:
* 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.
An example localdisk configuration file: ::
enable=yes
enablepart=no
[disk]
dev=/dev/sdb
clear=yes
parts=100M-200M,1G-2G
[disk]
dev=/dev/sda
clear=yes
parts=10,20,30
[disk]
dev=/dev/sdc
clear=yes
parts=10,20,30
[localspace]
dev=/dev/sda1
fstype=ext3
[swapspace]
dev=/dev/sda2
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.
* 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.
The ``[localspace]`` section is used to specify which partition will be used as local storage for the node.
* dev: The path of the partition.
* fstype: The file system type on the partition.
the ``[swapspace]`` section is used to configure the swap space for the statelite node.
* 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: ::
chdef -t 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.
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: ::
"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.
Add an entry in policy table to permit the running of the ``getpartitioin`` command from the node ::
chtab priority=7.1 policy.commands=getpartition policy.rule=allow
.. include:: ../../common/deployment/enable_localdisk.rst
If Using the RAMdisk-based Image
````````````````````````````````