5 ms·
What happens when you have to move a server for some reason? Has that never happened?
by chime 16y ago
What happens when you have to move a server for some reason? Has that never happened?
- spc476 16y agoMy guess: logical names (like www or db or ns) are CNAMES, so that when the server moves and gets a new named based on location, the CNAME is adjusted as well.
- andrewtj 16y agoYep — exactly. To use software parlance, if using this convention would halt or inconvenience your production, it's a smell and a likely indication you've got a spaghetti setup on your hands.
- gaius 16y agoYou shouldn't need to rename a server when you move it, esp. since you might not know where its hostname is used (e.g. at least one major database vendor at software installation time embeds the hostname in various generated config files). Machines should have sequential names, services should be VIPs (or CNAMEs if you must) and everything else should be in a configuration management database.
- dnsworks 16y agoAt least the way I like to build infrastructure, physical servers don't really matter. If for whatever reason servers had to get moved, their mac address would be updated to reflect it's location. I wrote some code a while back which grabs all the mac addresses from a switch and use that to map their physical location. It's quite simple, it looks at a port to see if it has multiple mac addresses behind it, if it does, it ignores it, if not, it maps that port out and labels it appropriately. There's also a little bit of logic to figure out what kind of a device a port is (whether it's another switch, a server, a pdu, etc), which also helps with my own personal continuing de-emphasis on the physicality of computing.