Monday, October 5, 2020

xCAT Node Deployment


1.1       Adding nodes into xCAT DB

Follow these steps to addcompute001into xCAT DB.

nodeadd omaster groups=mgmt

nodeadd compute001 groups=compute,node



makedhcp –n

makedhcp –a

makedns –n

 makedns -a


Once done check if DNS is working correctly.

host compute001

Expected output:

compute001.cluster.local has address

Hmmm, is your name resolution not working? Check if your ‘/etc/resolv.conf’ file is correct.

It should look like similar to this:

search cluster.local




Bottom two lines can be different as they reflect your own environment.


1.2       Node Discovery

It’s time to have real fun. We need to add a new node and then deploy it with CentOS 7.

There are three ways you can add node MAC addresses into xCAT.

1)      Add MAC addresses manually

2)      Discovering nodes using ‘Sequential Node Discovery’ method &

3)      Auto discovery


1)      Add MAC addresses manually

The easiest method to add nodes in xCAT is to add their MAC addresses intomac table.

If you are using a VM then its pretty easy to get the MAC address of the node (in my case compute001has MAC address08:00:27:E9:BB:DB’)

To add the MAC follow this:

tabedit mac

The table should be looking like as below:



2)      Discovering nodes using ‘Sequential Node Discovery’ method &

Follow these steps

·        Keep compute001off

·        Typenodediscoverstart noderange=compute001on omasternode

·        Turn compute001on and wait

·        If you have access to its console, keep looking. It should be able to get an IP from DHCP and xCAT should start discovering this node.

·        Upon success,tabdump macshould show its MAC address automatically added.

·        Typenodediscoverls’ to see what xCAT has discovered and type nodediscoverstop’ to stop the process.


3)      Auto discovery

Auto discovery process will be covered in ‘Advanced Tutorial’. Watch this space…


1.3            xCAT OS images

To deploy a system with xCAT, it requires an OS image. OS image is just the information in xCAT DB to help xCAT create a kickstart file (for Redhat, CentOS etc) for the installation.

When copycdscommand is executed, it automatically creates some images by default but it’s always good to create a custom one for our purpose.

You can list all OS images using this command:

lsdef –t osimage

Use these lines to create an OS image named ascompute

mkdef -t osimage compute imagetype=linux osarch=x86_64 \

osname=Linux osvers=centos7.8 \

otherpkgdir=/install/post/otherpkgs/centos7.8/x86_64 \

pkgdir=/install/centos7.8/x86_64 \

pkglist=/install/templates/compute/pkglist \

profile=compute provmethod=install \

template=/install/templates/compute/tmpl \

partitionfile=/install/templates/compute/partfile \

otherpkglist=/install/templates/compute/otherpkgs.pkglist \



Now it’s time to configure files we have mentioned in the image (above).

Luckily xCAT installation comes with most of these files so it’s just a matter of copying them to our custom directory /install/templates/compute’

Let’s get it done…

mkdir –p /install/templates/compute

rsync -avp /opt/xcat/share/xcat/install/centos/compute.centos7.tmpl /install/templates/compute/tmpl

rsync -avp /opt/xcat/share/xcat/install/centos/compute.centos7.pkglist /install/templates/compute/pkglist

touch /install/templates/compute/otherpkgs.pkglist

touch /install/templates/compute/synclist


Function of ‘otherpkgs.pkglist’ and ‘synclist’ files will be covered in the advanced tutorial. For now the existence of these files is sufficient for xCAT to installcompute001’.

The file /install/templates/compute/partfile’ is used by xCAT to create custom disk partitioning for nodes. This file can be modified according to the requirements and also depending on the disk sizes.


part /boot/efi --size=100 --fstype=exfat

part /boot --fstype=ext4 --size=500

part pv.1 --grow --size=1

volgroup system --pesize=4096 pv.1

logvol swap --name=swap --vgname=system --size=2048

logvol / --fstype=ext4 --name=root --vgname=system --grow --size=4096


1.4            Nodes Installation

nodeset compute001 osimage=compute

Reset ‘compute001’ and make sure it boots up over network to receive DHCP and TFTP information from xCAT server (omaster).

Wow! You have managed to install a compute node using xCAT. That’s an achievement!

Monitor the screen of the node and make sure it completes the installations. It should automatically boot up and you should be able to SSH into it without any password.

For further reading and understanding please check out my ‘xCAT Tutorial for advanced users’ (coming soon…)


      <<Previous        <Tutorial Home>                                                                                                               


No comments:

Post a Comment

How to install and configure xCAT (for beginners)

Are you fed-up of manual server installation? Are you not a fan of managing your cluster using DVDs and USB sticks anymore? Are you afra...