ArticlesWarewulf

Adding a NAS to Your Warewulf Cluster

Introduction

In this article, we will guide you through the process of adding your NAS system to your Warewulf cluster.

This involves configuring a static mapping on the DHCP configuration of your Warewulf server, to ensure that your NAS system is properly recognized and assigned a static IP address.

Problem

A NAS is needed to be added to the Warewulf cluster, rather than a standard compute node.

Symptoms

The NAS system is not being assigned an IP address from the Warewulf DHCP server.

Resolution

The steps below are for Warewulf version 4.6.x. Please upgrade to the latest version of Warewulf first if possible. Full instructions are available via the Upgrading Warewulf to Version 4.6.x blog post.

  • Check the DHCP logs located at /var/log/messages or /var/log/dhcpd.log to see if the NAS' MAC address is available there. Look for a request made to the DHCP server from the NAS to obtain an IP address. Sometimes the MAC address is not easily identifiable in the logs if there are many nodes in the cluster.

  • You can manually add static IP mapping to the dhcpd.conf.ww DHCP configuration file.

  • Firstly, make sure to (re)create your dhcpd.conf.ww by running:

wwctl configure dhcp
  • The previous command (re)writes the DHCP configuration and enables and (re)starts the DHCP service.

  • Backup the dhcpd.conf.ww configuration file:

cp /usr/share/warewulf/overlays/host/rootfs/etc/dhcp/dhcpd.conf.ww /usr/share/warewulf/overlays/host/rootfs/etc/dhcp/dhcpd.conf.ww.bak
  • Edit the configuration file with your text editor of choice:
vim /usr/share/warewulf/overlays/host/rootfs/etc/dhcp/dhcpd.conf.ww
  • Scroll to the bottom of the file and add a new line between {{- end}} and {{/* dhcp enabled */}}. The configuration will then look like this:
...
{{- end}}

{{/* dhcp enabled */}}
  • In the gap you have created, add the following lines, supplementing the MAC address with the one from your NAS and the IP that you wish to assign to it:
...
host <IDENTIFIABLE_NAME_FOR_YOUR_NAS_HERE> {
    hardware ethernet <NAS_MAC_ADDRESS>;
    fixed-address <IP_TO_ASSIGN>;
}
  • Here is an example configuration:
...
{{- end}}
host TEST {
    hardware ethernet A3:32:52:D1:2B:1C;
    fixed-address 192.168.1.254;
}
{{/* dhcp enabled */}}
  • Apply the changes to the DHCP config:
wwctl configure dhcp
  • The NAS should now be picked up by your Warewulf Controller Node upon next boot and assigned a static IP address.

Root cause

A NAS system is sometimes not automatically recognized by the Warewulf DHCP server and needs to be manually assigned an IP address.

Notes

Always backup the dhcpd.conf.ww configuration file before making any changes.

References & related articles

Upgrading Warewulf to Version 4.6.x How to Add a Static DHCP Entry into Warewulf 4.5.x and 4.6.x