How do you come up with your naming scheme for Linux hostnames?
Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Ladies. Always ladies. I started with an abbreviation of 'computah', i.e. 'puta'. I liked the Spanish meaning, and since then all my machines have been named as females
My earliest hosts were named after farm/zoo animals (486 class)
The next generation were named after cars/trucks/vans. (586/686 class)
Current generation is mostly solaris, so names like corona, zenith, pulsar ...
The virtual machine names are less creative since they are less permanent. one two three four
Wireless or handheld endpoint devices get a parasite name like leech, tick, flea, worm, or mite
The Official LQ Poll Series continues. This time we want to know: How do you come up with your naming scheme for Linux hostnames?
(Note that multiple responses for different schemes used at home, at work, for servers, etc., is acceptable).
--jeremy
I have several unix/linux systems at home, and all are named for characters in (obscure ;-) science fiction novels. Only names that aren't "ordinary" names here in the US are acceptable, of course, preferably if they're no actual words in any language I'm familiar with.
I've encouraged this approach in a few places that I've worked, partly because it goes over well with most of the computer geeks on staff. But sometimes they go for fantasy novels instead, such as LotR characters.
My 3 linux boxes at home are currently named kendy, minya and gavving. Points to anyone who can name the science fiction novel(s) those came from (without googleing them ;-).
Obscure sci-fi novels are good sources of machine names. My main non-home account is on one of several servers named for HHGttG characters. That one's not so obscure, though, and you see those names all over. (But I didn't name it.)
From working in larger companies with multiple datacenters and environments...
It's important to have names that don't get confused easily (typos, verbal confusion, etc)
It's very useful to have servers doing the same job have similar names
It's very useful to have the server name include things like environment, cluster membership in the name (you can try to use FQDN for this, but not everything uses fqdn, some things use just the hostname, and fqdn is clumsy to have to say)
Just about every machine should be part of a cluster/failover pair, redundancy is a good thing.
You frequently want to refer to a cluster, or all machines doing a similar job when discussing things.
Humans are not column based processors, we tend to see patterns in strings shoved together that aren't intended and have a hard time noticing a missing or added column. there should be a clear delineation between parts of a name, LAXDEVFOO0123 (dev foo server in Los Angeles, member #23 of cluster #1) is way too easy to confuse with other things, hard to say, and hard to look at.
While hostnames can be very long in theory, in practice there are too many things that impose some limit (KVM console selection displays for example), so I like to try and keep the resulting name compact, ideally < 13 characters.
There aren't enough 3 character combinations to make meaningful abbreviations for systems.
With the above in mind, I like to use names like scribe1a-p (scribe (syslog) server that is the primary (-p) box in cluster "a" in environment/datacenter "1")
Formally, this is <class><datacenter/environment><cluster>-<membership>
class these are arbitrary names, registered in a central location, but it's nice if they have at least a vague association with the functionality of the system. If you have different systems that work together, picking names on a common theme for those systems is handy.
datacenter/environment is a number (so there's no confusion over where the server name ends, although you can get away with things like 'dev' once the class names are well established). Ideally this is a single digit, and doesn't mix datacenters and dev/qa environments. I like to use '0' for QA or Dev boxes and then start the datacenters at '1'. For corporate offices, I would either count on classes being distinct or leave a gap to allow for some additional datacenters
cluster is a letter (so there's no confusion over where the datacenter/environment ends). I try to keep cluster naming consistent between environments so that if you talk about the 'scribe A' cluster, it's doing the same job in all environments. sometimes I will get 'tricky' with cluster names to have some mnemonic (t for a test cluster for example)
membership is a unique letter/number to indicate the position in a cluster. If you have failover pairs you may do -p/-b, or just -a/-b, and then do load balanced clusters as -1/-2/-3 (or stick with letters)
With this scheme, you can talk about all the syslog servers by referring to 'the scribe boxes', all of them in a given datacenter by referring to 'the scribe1 boxes', the ones serving the DMZ across all datacenters by referring to 'the scribe A boxes' (a little clumsy, but it works), a specific cluster 'the scribe1a boxes' or a specific machine. Because this alternates word, number, letter there is no confusion when saying things verbally.
This isn't perfect (I'm looking for a better way to handle the datacenter/environment to allow lots of similar environments in one datacenter for example), but in practice it works pretty well, and far better than the other options I've seen used.
I have used-
a) Houses of Hogwarts
b) Pokemon
c) Wood Badge critters
The FCC used to use Icelandic waterfalls before they overhauled their server farm. I suspect names like hraunfoss, svartifoss and seljalandsfoss were just too hard to remember, much less spell.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.