This section describes how to boot a cluster from the network using the Intel Preboot Execution Environment (PXE) specification. This booting process (commonly referred to as network booting) is supported by most NICs. PXE is one way to boot your storage cluster nodes.
Platform Server
If you use Platform Server, skip this section: your network booting is set up.
To enable nodes to boot from a USB flash drive, see Initializing a Storage Cluster.
To enable nodes to boot using a configuration file server, see the section below.
To enable nodes to PXE boot, perform these steps:
Configure your DHCP server with next-server and filename parameters.
Configure PortFast on the switch ports leading to the storage cluster nodes.
Configure the TFTP server with PXE bootstrap, configuration, and Swarm files.
Set up the nodes' BIOS configurations for network booting.
Requirement
Increase the size of the initrd RAM disk to 160MB on your PXE boot server to prevent PXE boot failures. This does not apply if using Platform Server.
Setting up the DHCP server for PXE booting
Warning
Swarm can erase all non-Swarm data on hosts that boot accidentally from the network. When you set up your DHCP server, verify that it provides network booting information to the correct network hosts only.
The following example shows the configuration lines from the Internet Systems Consortium (ISC) DHCP server that is commonly available on UNIX systems. As shown below, the next-server parameter defines the IP address of the Trivial File Transfer Protocol (TFTP) server and the filename parameter to define the bootstrap loader program to download.
group { next-server 172.16.1.10; filename "/pxelinux.0"; # Hosts allowed to network boot into Swarm host clusternode1 { hardware ethernet 00:90:cb:bf:45:26; } host clusternode2 { hardware ethernet 00:90:b2:92:09:e4; } host clusternode3 { hardware ethernet 00:90:0d:46:7a:b4; } }
In this example, the Swarm nodes are explicitly defined by MAC address to prevent Swarm from initiating an unattended boot by other servers or workstations.
Configuring PortFast on your switch ports
PortFast is a switch port configuration parameter that enables a port to bypass the listening and learning Spanning Tree states so the port will immediately forward traffic.
If you connect a storage cluster node to a network switch, ensure that PortFast is configured on the switch ports leading to each node. Otherwise, the extended time delay can prevent netboot from delivering the Swarm image to a PXE-enabled node in a timely manner.
Configuring the TFTP server
The TFTP server transfers configuration or boot files between systems in a local environment. After you configure your DHCP server, configure your TFTP server to load the Swarm software onto the cluster nodes.
To set up your TFTP server:
Install and configure TFTP server software on the boot server.
Create the /tftpboot directory hierarchy.
Copy the kernel and fsimage files to the /tftpboot/profiles/castor directory.
See DHCP and Boot Server Redundancy, below.
Installing and configuring TFTP
TFTP server software is available in both free and commercial packages. UNIX distributions commonly include TFTP server software with their standard setup. For example, the tftp-hpa package for UNIX can integrate with Swarm. You can also obtain source code from the Linux Kernel Archives website located at kernel.org/pub/software/network/tftp.
TFTP server software is also available as a binary package in many Linux distributions.
Creating the tftpboot directory hierarchy
After you install the TFTP server, configure the server to access the network boot file directory. This directory is typically labeled /tftpboot because TFTP is almost exclusively used for booting network devices.
A sample template is included in the samples/NetworkBoot directory of your Swarm software distribution.
Copying kernel and fsimage
The Swarm software distribution media includes the kernel and fsimage files, which contain the Swarm embedded operating system. Copy these files to the tftpboot/profiles/castor directory on the TFTP server so they will load onto each Swarm node during bootup.
After you copy the directory template and the Swarm software files, the tftpboot directory on the TFTP server should contain these files:
File name | Description |
---|---|
| Boot loader program |
| Swarm software |
| Swarm operating system kernel |
| PXELINUX configuration file |
See the documentation and ZIP file in the samples/Network-Boot directory on the Swarm distribution media for help with using the PXELINUX boot loader.
DHCP and boot server redundancy
When you set up your DHCP server, configure both a primary and secondary DHCP server. This configuration eliminates a single point of failure if one of the servers goes offline for any reason.
To set up the ISC DHCP daemon for redundancy, see "Failover with ISC DHCP" at madboa.com/geek/dhcp-failover.
To provide redundancy at the network booting layer, you can use your primary and secondary DHCP servers as TFTP servers.
When you set up your DHCP servers, set the next-server parameter in each server to specify their own IP address. When the primary or secondary DHCP server answers a DHCP query, it will also handle the PXE boot.To prevent any network interruptions, ensure that the TFTP boot servers are located in the same broadcast domain (or VLAN) as the Swarm nodes or enable a DHCP relay server on the VLAN.
Setting up a configuration file server
Platform Server
If you use Platform Server, skip this section: your centralized configuration is set up.
Swarm supports centralized node configuration files on an HTTP or FTP server. This method allows you to boot from a network or a standard USB flash drive. A centralized configuration file server simplifies storage cluster administration by supporting configuration file updates and providing a method to group similar node configurations together.
To implement a configuration file server, set the value of the castor_cfg kernel configuration parameter to a URL that targets the configuration list file, as described below.
PXE boot example
This is an example PXELINUX configuration file located in the tftpboot/pxelinux.cfg directory on the TFTP boot server.
default profiles/castor/kernel append initrd=profiles/castor/fsimage ramdisk_size=160000 root=/dev/ram0 castor_cfg=http://172.16.1.200/castor/cfg-list.txt
USB boot loader example
This is an example section of the syslinux.cfg located in the root directory on the USB flash drive.
label normal kernel kernel append initrd=fsimage ramdisk_size=160000 root=/dev/ram0 castor_cfg=http://172.16.1.200/castor/cfg-list.txt
Configuration list file example
The castor_cfg kernel configuration parameter specifies a file that contains a list of URLs for all the configuration files that will be loaded by a Swarm node. Swarm configuration files are evaluated in the order in which they are listed in the configuration list file.
Although Swarm configuration settings can be defined multiple times, only the last definition is used. By redefining the settings, you can layer configuration files so that they contain generally applicable values for a cluster, a group of similar nodes, and values specific to one node.
Example of URLs in a configuration list file:
http://172.16.1.200/castor/cluster.cfg http://172.16.1.200/castor/subcluster.cfg http://172.16.1.200/castor/testnode.cfg
Each of the configuration files in the list file uses the same format as the Swarm node.cfg file.
See the /caringo/node.cfg.sample in the Swarm software distribution.
See Managing Configuration Settings.
Disabling monitor power-saving activation
To disable the monitor power-saving feature from activating while connected to a Swarm storage node, add the following kernel option to the APPEND line in either the syslinux.cfg file on the Swarm USB key or in the PXE boot configuration file.
When enabled, this parameter tells the kernel to stop blanking the console:
consoleblank=0
This feature defaults to 10 minutes. A value of 0 disables the blank timer. Listed below are examples.
PXE boot example
This is a PXELINUX configuration file from the tftpboot/pxelinux.cfg directory on the TFTP boot server with the console power saver disabled.
default profiles/castor/kernel append initrd=profiles/castor/fsimage consoleblank=0 ramdisk_size=160000 root=/dev/ram0 castor_cfg=http://172.16.1.200/castor/cfg-list.txt
USB boot loader example
This is a section of the syslinux.cfg contained in the root directory on the USB flash drive with the console power savings disabled.
label normal kernel kernel append initrd=fsimage consoleblank=0 ramdisk_size=160000 root=/dev/ram0 castor_cfg=http://172.16.1.200/castor/cfg-list.txt