iscsi-boot-admin is a small adminstration tool for creation and maintainance of the DHCP server configuration files for booting diskless servers.
A physical machine without disks.
A server that runs the DHCP and TFTP daemons for booting diskless servers.
The OS + applications running on a diskless server. Equivalent to 'host'. In this definition a server can run only 1 service simultaneously. (If we keep hardware virtualization out of the picture).
A service that can be run simultaneously on multiple servers. Typically these services do not require a volume on the SAN, like a 'diagnostic' service such as memtest or use a shared read-only volume.
A service that cannot be run simultaneously on multiple servers. E.g. a webserver. These services have a dedicated volume on the SAN for OS and application data.
Program loaded by PXE on the diskless server in order to bootstrap the OS startup. The bootloader loads the kernel and initial ramdisk via TFTP from the bootserver and starts it up.
Preboot eXecution Environment. Intel standard for booting PC style hardware via the LAN.
The easiest way to install iscsi-boot-admin is to let yum download and install the RPM. This will install its depency package system-config-netboot (or redhat-config-netboot), tftp-server and dhcp.
iscsi-boot-admin keeps its configuration files in /etc/iscsi-boot-admin. Currently this contains two files: admin.conf for global settings and servers.conf containing the settings for individual diskless servers. The latter is not intended for manual editting: use the iscsi-boot-admin tool to manipulate its settings.
Example:
Specifies the file containing the server database. Default:
/etc/iscsi-boot-admin/servers.conf
Specifies the file containing the DHCP definities for the
diskless servers. This file needs to be included in the DHCP
server configuration file /etc/dhcp.conf. See XXX. Default:
/etc/dhcpd.d/iscsi-boot-group-1.conf
Specifies the 'root directory' of the TFTP server. Default: /tftpboot
Specifies the subdirectory within tftp_rootdir containing
the bootloader (pxelinux.0) and the service
specific directories containing the boot config (pxelinux.cfg),
kernel image and initial ramdisk. Default: linux-install
Specifies the shared service to be used for new, spare and broken servers. Default: diagnostics.
Specifies the suffix to add to a service name in order to translate it to the corresponding hostname. E.g. service 'webservice1' translates to hostname 'webservice.san.loc'. This hostname needs to resolve or else the DHCP server cannot assign an IP address to the server booting the service. Default: .san.loc.
Typically only the parameters 'default_service' and 'domain_suffix' need to be changed. Example (and default):
server_db_file=/etc/iscsi-boot-admin/servers.conf dhcp_config_file=/etc/dhcpd.d/iscsi-boot-group-1.conf tftp_rootdir=/tftpboot pxe_subdir=linux-install default_service=diagnostics domain_suffix=.san.loc
Iscsi-boot-admin requires a few modifications to the configuration of the DHCP server. Particularly it needs some pxelinux DHCP options to properly set the directory where pxelinux will download the kernel and initrd. The config also needs to include a separate DHCP config file containing the host definitions of the diskless servers, typically '/etc/dhcpd.d/iscsi-boot-group-1.conf'. That way iscsi-boot-admin does not need to modify the main dhcpd.conf file.
The config file below contains a typical setup. The boot server has IP address 10.15.49.1. The peer server 10.15.49.2 has an identical dhcp.conf, except for the 'range' parameter (which should not overlap) and the next-server parameter (which should point to its own IP address).
ddns-update-style ad-hoc;
allow booting; #PXE
allow bootp; #PXE
option space pxelinux;
option pxelinux.magic code 208 = string;
option pxelinux.configfile code 209 = text;
option pxelinux.pathprefix code 210 = text;
option pxelinux.reboottime code 211 = unsigned integer 32;
subnet 10.15.48.0 netmask 255.255.252.0 {
range 10.15.49.224 10.15.49.254;
# range 10.15.49.192 10.15.49.223;
authoritative;
ddns-updates off;
host bootserver1.san.loc { fixed-address 10.15.49.1; }
host bootserver2.san.loc { fixed-address 10.15.49.2; }
# iscsi-boot-group-1
group {
site-option-space "pxelinux";
option pxelinux.magic f1:00:74:7e;
if exists dhcp-parameter-request-list {
# Always send the PXELINUX options (specified in hexadecimal)
option dhcp-parameter-request-list = concat(option dhcp-parameter-request-list,d0,d1,d2,d3);
}
next-server 10.15.49.1;
# next-server 10.15.49.2;
filename "linux-install/pxelinux.0";
# root-path is obsolete: as of mkinitrd-iscsi-1.4 the initrd contains a complete iscsi.conf
# option root-path "10.15.48.5:/,10.15.48.6://";
include "/etc/dhcpd.d/iscsi-boot-group-1.conf";
}
}
The iscsi-boot-admin package contains two commands,
iscsi-boot-admin and
iscsi-boot-activate. The first manages the diskless
server database and the corresponding DHCP configuration. The latter
optionally synchronises the peer boot server with the new configuration
and restarts DHCP.
iscsi-boot-admin [--config=<admin.conf>]
command
writes the DHCP config to either stdout, the specified output file, or the default config file (as specified by parameter dhcp_config_file in admin.conf).
lists all servers or the servers in the specified state.
lists all services found in the PXE directory.
lists the server(s) to which the specifed services has been assigned.
shows all details of the specified server.
shows all configuration parameters (i.e. the contents of admin.conf)
swaps the services and statuses assigned to both servers.
replaces the active server with the specified spare server. The active server will be set to state BROKEN and the spare server will be configured for the service assigned to the previously active server and set to ACTIVE.
adds the specified server to the server database. parameter ethernets is a comma separated list of the servers MAC addresses that are in the boot network segment (i.e. may send DHCP requests). Parameter description is a free text string except for that it may not contain a TAB character.
The new server will have status SPARE and be assigned the default service.
Example:
iscsi-boot-admin add-server erepos-1
00:0E:0C:65:E2:7A,00:0E:0C:65:E2:7B "erepos pand 12 rack
24"
removes the specified server from the server database. If the server in state ACTIVE, this command will refuse removal unless option '--force' is given.
sets the status of the specified server to ACTIVE and if a service is specified changes the service. The command will not change the service if the server is already ACTIVE for another service. In this case you will need to set the server to state SPARE first (with command 'set-spare').
Also, if the new service is an exclusive service and it already has assigned been to another server, this command will not reassign the service. In this case you will need to either unassign the service by setting the other server to state SPARE or use command 'switch-server' to swap the services between the two servers.
sets the status of the specified server to SPARE and changes its service to the default service. If the server is currently in state ACTIVE, this command will refuse to change the status unless option '--force' is used.
sets the status of the specified server to BROKEN and changes its service to the default service. If the server is currently in state ACTIVE, this command will refuse to change the status unless option '--force' is used.
sets the description for the given server.
shows all commands.
iscsi-boot-activate [ 'local' | <peer-server>]
[<config-dir>] [<PXE-dir>] [<DHCP config
dir>]