mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-05-31 01:56:39 +00:00
commit
bc22c522af
@ -1,91 +1,66 @@
|
||||
Configure RAID before Deploy OS
|
||||
===============================
|
||||
Configure RAID before deploying the OS
|
||||
======================================
|
||||
|
||||
Overview
|
||||
--------
|
||||
|
||||
This section describes how to use xCAT to deploy diskful nodes with RAID1 setup, and the procedure for RAID1 maintainence activities such as replacing a failed disk.
|
||||
xCAT provides an user interface :doc:`linuximage.partitionfile </guides/admin-guides/references/man5/linuximage.5>` to specify the customized partition script for diskful provision, and provides some default partition scripts.
|
||||
|
||||
All the examples in this section are based on three configuration scenarios:
|
||||
|
||||
#. RHEL6 on a system p machine with two SCSI disks sda and sdb
|
||||
|
||||
#. RHEL6 on a system p machine with two SAS disks and multipath configuration.
|
||||
|
||||
#. SLES 11 SP1 on a system p machine with two SCSI disks sda and sdb
|
||||
|
||||
If you are not using the configuration scenarios listed above, you may need to modify some of the steps in this documentation to make it work in your environment.
|
||||
|
||||
Deploy Diskful Nodes with RAID1 Setup on RedHat
|
||||
-----------------------------------------------
|
||||
|
||||
xCAT provides two sample kickstart template files with the RAID1 settings, ``/opt/xcat/share/xcat/install/rh/service.raid1.rhel6.ppc64.tmpl`` is for the configuration scenario **1** listed above and ``/opt/xcat/share/xcat/install/rh/service.raid1.multipath.rhel6.ppc64.tmpl`` is for the configuration scenario **2** listed above. You can customize the template file and put it under ``/install/custom/install/<platform>/`` if the default one does not match your requirements.
|
||||
xCAT provides a partition script `raid1_rh.sh <https://raw.githubusercontent.com/xcat2/xcat-extensions/master/partition/raid1_rh.sh>`_ which configures RAID1 across 2 disks on RHEL 7.x operating systems.
|
||||
|
||||
Here is the RAID1 partitioning section in ``service.raid1.rhel6.ppc64.tmpl``: ::
|
||||
In most scenarios, the sample partitioning script is sufficient to create a basic RAID1 across two disks and is provided as a sample to build upon.
|
||||
|
||||
#Full RAID 1 Sample
|
||||
part None --fstype "PPC PReP Boot" --size 8 --ondisk sda --asprimary
|
||||
part None --fstype "PPC PReP Boot" --size 8 --ondisk sdb --asprimary
|
||||
1. Obtain the partition script: ::
|
||||
|
||||
part raid.01 --size 200 --fstype ext4 --ondisk sda
|
||||
part raid.02 --size 200 --fstype ext4 --ondisk sdb
|
||||
raid /boot --level 1 --device md0 raid.01 raid.02
|
||||
mkdir -p /install/custom/partition/
|
||||
wget https://raw.githubusercontent.com/xcat2/xcat-extensions/master/partition/raid1_rh.sh \
|
||||
-O /install/custom/partition/raid1_rh.sh
|
||||
|
||||
part raid.11 --size 1024 --ondisk sda
|
||||
part raid.12 --size 1024 --ondisk sdb
|
||||
raid swap --level 1 --device md1 raid.11 raid.12
|
||||
2. Associate the partition script to the osimage: ::
|
||||
|
||||
part raid.21 --size 1 --fstype ext4 --grow --ondisk sda
|
||||
part raid.22 --size 1 --fstype ext4 --grow --ondisk sdb
|
||||
raid / --level 1 --device md2 raid.21 raid.22
|
||||
chdef -t osimage -o rhels7.3-ppc64le-install-compute \
|
||||
partitionfile="s:/install/custom/partition/raid1_rh.sh"
|
||||
|
||||
Here is the RAID1 partitioning section in ``service.raid1.multipath.rhel6.ppc64.tmpl``: ::
|
||||
3. Provision the node: ::
|
||||
|
||||
#Full RAID 1 Sample
|
||||
part None --fstype "PPC PReP Boot" --size 8 --ondisk mpatha --asprimary
|
||||
part None --fstype "PPC PReP Boot" --size 8 --ondisk mpathb --asprimary
|
||||
rinstall cn1 osimage=rhels7.3-ppc64le-install-compute
|
||||
|
||||
After the diskful nodes are up and running, you can check the RAID1 settings with the following process:
|
||||
|
||||
part raid.01 --size 200 --fstype ext4 --ondisk mpatha
|
||||
part raid.02 --size 200 --fstype ext4 --ondisk mpathb
|
||||
raid /boot --level 1 --device md0 raid.01 raid.02
|
||||
|
||||
part raid.11 --size 1024 --ondisk mpatha
|
||||
part raid.12 --size 1024 --ondisk mpathb
|
||||
raid swap --level 1 --device md1 raid.11 raid.12
|
||||
|
||||
part raid.21 --size 1 --fstype ext4 --grow --ondisk mpatha
|
||||
part raid.22 --size 1 --fstype ext4 --grow --ondisk mpathb
|
||||
raid / --level 1 --device md2 raid.21 raid.22
|
||||
|
||||
The samples above created one PReP partition, one 200MB ``/boot`` partition and one ``/`` partition on ``sda/sdb`` and ``mpatha/mpathb``. If you want to use different partitioning scheme in your cluster, modify this RAID1 section in the kickstart template file accordingly.
|
||||
|
||||
After the diskful nodes are up and running, you can check the RAID1 settings with the following commands:
|
||||
|
||||
Mount command shows the ``/dev/mdx`` devices are mounted to various file systems, the ``/dev/mdx`` indicates that the RAID is being used on this node. ::
|
||||
``mount`` command shows the ``/dev/mdx`` devices are mounted to various file systems, the ``/dev/mdx`` indicates that the RAID is being used on this node. ::
|
||||
|
||||
# mount
|
||||
/dev/md2 on / type ext4 (rw)
|
||||
proc on /proc type proc (rw)
|
||||
sysfs on /sys type sysfs (rw)
|
||||
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
|
||||
tmpfs on /dev/shm type tmpfs (rw)
|
||||
/dev/md0 on /boot type ext4 (rw)
|
||||
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
|
||||
...
|
||||
/dev/md1 on / type xfs (rw,relatime,attr2,inode64,noquota)
|
||||
/dev/md0 on /boot type xfs (rw,relatime,attr2,inode64,noquota)
|
||||
/dev/md2 on /var type xfs (rw,relatime,attr2,inode64,noquota)
|
||||
|
||||
The file ``/proc/mdstat`` includes the RAID devices status on the system, here is an example of ``/proc/mdstat`` in the non-multipath environment: ::
|
||||
|
||||
# cat /proc/mdstat
|
||||
Personalities : [raid1]
|
||||
md2 : active raid1 sda5[0] sdb5[1]
|
||||
19706812 blocks super 1.1 [2/2] [UU]
|
||||
md2 : active raid1 sdk2[0] sdj2[1]
|
||||
1047552 blocks super 1.2 [2/2] [UU]
|
||||
resync=DELAYED
|
||||
bitmap: 1/1 pages [64KB], 65536KB chunk
|
||||
|
||||
md1 : active raid1 sda2[0] sdb2[1]
|
||||
1048568 blocks super 1.1 [2/2] [UU]
|
||||
|
||||
md0 : active raid1 sda3[0] sdb3[1]
|
||||
204788 blocks super 1.0 [2/2] [UU]
|
||||
|
||||
|
||||
md3 : active raid1 sdk3[0] sdj3[1]
|
||||
1047552 blocks super 1.2 [2/2] [UU]
|
||||
resync=DELAYED
|
||||
|
||||
md0 : active raid1 sdk5[0] sdj5[1]
|
||||
524224 blocks super 1.0 [2/2] [UU]
|
||||
bitmap: 0/1 pages [0KB], 65536KB chunk
|
||||
|
||||
md1 : active raid1 sdk6[0] sdj6[1]
|
||||
973998080 blocks super 1.2 [2/2] [UU]
|
||||
[==>..................] resync = 12.8% (125356224/973998080) finish=138.1min speed=102389K/sec
|
||||
bitmap: 1/1 pages [64KB], 65536KB chunk
|
||||
|
||||
unused devices: <none>
|
||||
|
||||
On the system with multipath configuration, the ``/proc/mdstat`` looks like: ::
|
||||
|
@ -173,7 +173,14 @@ linuximage Attributes:
|
||||
|
||||
\ **partitionfile**\
|
||||
|
||||
The path of the configuration file which will be used to partition the disk for the node. For stateful osimages,two types of files are supported: "<partition file absolute path>" which contains a partitioning definition that will be inserted directly into the generated autoinst configuration file and must be formatted for the corresponding OS installer (e.g. kickstart for RedHat, autoyast for SLES, pressed for Ubuntu). "s:<partitioning script absolute path>" which specifies a shell script that will be run from the OS installer configuration file %pre section; the script must write the correct partitioning definition into the file /tmp/partitionfile on the node which will be included into the configuration file during the install process. For statelite osimages, partitionfile should specify "<partition file absolute path>"; see the xCAT Statelite documentation for the xCAT defined format of this configuration file. For Ubuntu, besides "<partition file absolute path>" or "s:<partitioning script absolute path>", the disk name(s) to partition must be specified in traditional, non-devfs format, delimited with space, it can be specified in 2 forms: "d:<the absolute path of the disk name file>" which contains the disk name(s) to partition and "s:d:<the absolute path of the disk script>" which runs in pressed/early_command and writes the disk names into the "/tmp/xcat.install_disk" . To support other specific partition methods such as RAID or LVM in Ubuntu, some additional preseed values should be specified, these values can be specified with "c:<the absolute path of the additional pressed config file>" which contains the additional pressed entries in "d-i ..." form and "s:c:<the absolute path of the additional pressed config script>" which runs in pressed/early_command and set the preseed values with "debconf-set". The multiple values should be delimited with comma ","
|
||||
Only available for diskful osimages and statelite osimages(localdisk enabled). The full path of the partition file or the script to generate the partition file. The valid value includes:
|
||||
|
||||
* ``<the absolute path of the parititon file>``: For diskful osimages, the partition file contains the partition definition that will be inserted directly into the template file for os installation. The syntax and format of the partition file should confirm to the corresponding OS installer of the Linux distributions(e.g. kickstart for RedHat, autoyast for SLES, pressed for Ubuntu). For statelite osimages, when the localdisk is enabled, the partition file with specific syntax and format includes the partition scheme of the local disk, please refer to the statelite documentation for details.
|
||||
* ``s:<the absolute path of the partition script>``: a shell script to generate the partition file "/tmp/partitionfile" inside the installer before the installation start.
|
||||
* ``d:<the absolute path of the disk name file>``: only available for ubuntu osimages, includes the name(s) of the disks to partition in traditional, non-devfs format(e.g, /dev/sdx, not e.g. /dev/discs/disc0/disc), and be delimited with space. All the disks involved in the partition file should be specified.
|
||||
* ``s:d:<the absolute path of the disk script>``: only available for ubuntu osimages, a script to generate the disk name file "/tmp/xcat.install_disk" inside the debian installer. This script is run in the "pressed/early_command" section.
|
||||
* ``c:<the absolute path of the additional pressed config file>``: only availbe for ubuntu osimages, contains the additional pressed entries in "d-i ..." form. This can be used to specify some additional preseed options to support RAID or LVM in Ubuntu.
|
||||
* ``s:c:<the absolute path of the additional pressed config script>``: only available for ubuntu osimages, runs in pressed/early_command and set the preseed values with "debconf-set". The multiple values should be delimited with comma ","
|
||||
|
||||
|
||||
|
||||
|
@ -796,7 +796,14 @@ passed as argument rather than by table value',
|
||||
permission => 'The mount permission of /.statelite directory is used, its default value is 755',
|
||||
dump => qq{The NFS directory to hold the Linux kernel dump file (vmcore) when the node with this image crashes, its format is "nfs://<nfs_server_ip>/<kdump_path>". If you want to use the node's "xcatmaster" (its SN or MN), <nfs_server_ip> can be left blank. For example, "nfs:///<kdump_path>" means the NFS directory to hold the kernel dump file is on the node's SN, or MN if there's no SN.},
|
||||
crashkernelsize => 'the size that assigned to the kdump kernel. If the kernel size is not set, 256M will be the default value.',
|
||||
partitionfile => 'The path of the configuration file which will be used to partition the disk for the node. For stateful osimages,two types of files are supported: "<partition file absolute path>" which contains a partitioning definition that will be inserted directly into the generated autoinst configuration file and must be formatted for the corresponding OS installer (e.g. kickstart for RedHat, autoyast for SLES, pressed for Ubuntu). "s:<partitioning script absolute path>" which specifies a shell script that will be run from the OS installer configuration file %pre section; the script must write the correct partitioning definition into the file /tmp/partitionfile on the node which will be included into the configuration file during the install process. For statelite osimages, partitionfile should specify "<partition file absolute path>"; see the xCAT Statelite documentation for the xCAT defined format of this configuration file. For Ubuntu, besides "<partition file absolute path>" or "s:<partitioning script absolute path>", the disk name(s) to partition must be specified in traditional, non-devfs format, delimited with space, it can be specified in 2 forms: "d:<the absolute path of the disk name file>" which contains the disk name(s) to partition and "s:d:<the absolute path of the disk script>" which runs in pressed/early_command and writes the disk names into the "/tmp/xcat.install_disk" . To support other specific partition methods such as RAID or LVM in Ubuntu, some additional preseed values should be specified, these values can be specified with "c:<the absolute path of the additional pressed config file>" which contains the additional pressed entries in "d-i ..." form and "s:c:<the absolute path of the additional pressed config script>" which runs in pressed/early_command and set the preseed values with "debconf-set". The multiple values should be delimited with comma "," ',
|
||||
partitionfile => 'Only available for diskful osimages and statelite osimages(localdisk enabled). The full path of the partition file or the script to generate the partition file. The valid value includes:
|
||||
"<the absolute path of the parititon file>": For diskful osimages, the partition file contains the partition definition that will be inserted directly into the template file for os installation. The syntax and format of the partition file should confirm to the corresponding OS installer of the Linux distributions(e.g. kickstart for RedHat, autoyast for SLES, pressed for Ubuntu). For statelite osimages, when the localdisk is enabled, the partition file with specific syntax and format includes the partition scheme of the local disk, please refer to the statelite documentation for details.
|
||||
"s:<the absolute path of the partition script>": a shell script to generate the partition file "/tmp/partitionfile" inside the installer before the installation start.
|
||||
"d:<the absolute path of the disk name file>": only available for ubuntu osimages, includes the name(s) of the disks to partition in traditional, non-devfs format(e.g, /dev/sdx, not e.g. /dev/discs/disc0/disc), and be delimited with space. All the disks involved in the partition file should be specified.
|
||||
"s:d:<the absolute path of the disk script>": only available for ubuntu osimages, a script to generate the disk name file "/tmp/xcat.install_disk" inside the debian installer. This script is run in the "pressed/early_command" section.
|
||||
"c:<the absolute path of the additional pressed config file>": only availbe for ubuntu osimages, contains the additional pressed entries in "d-i ..." form. This can be used to specify some additional preseed options to support RAID or LVM in Ubuntu.
|
||||
"s:c:<the absolute path of the additional pressed config script>": only available for ubuntu osimages, runs in pressed/early_command and set the preseed values with "debconf-set". The multiple values should be delimited with comma ","
|
||||
',
|
||||
driverupdatesrc => 'The source of the drivers which need to be loaded during the boot. Two types of driver update source are supported: Driver update disk and Driver rpm package. The value for this attribute should be comma separated sources. Each source should be the format tab:full_path_of_source_file. The tab keyword can be: dud (for Driver update disk) and rpm (for driver rpm). If missing the tab, the rpm format is the default. e.g. dud:/install/dud/dd.img,rpm:/install/rpm/d.rpm',
|
||||
comments => 'Any user-written notes.',
|
||||
disable => "Set to 'yes' or '1' to comment out this row.",
|
||||
|
Loading…
x
Reference in New Issue
Block a user