Product SiteDocumentation Site

2.2.4. Short Node Names

During installation, we filled in the machine’s fully qualified domain name (FQDN) which can be rather long when it appears in cluster logs and status output. See for yourself how the machine identifies itself:
# uname -n
pcmk-1.clusterlabs.org
# dnsdomainname
clusterlabs.org
The output from the second command is fine, but we really don’t need the domain name included in the basic host details. To address this, we need to use the hostnamectl tool to strip off the domain name.
# hostnamectl set-hostname $(uname -n | sed s/\\..*//)'
Now check the machine is using the correct names
# uname -n
pcmk-1
# dnsdomainname
clusterlabs.org
If it concerns you that the shell prompt has not been updated, simply log out and back in again.