*** (0.001) *** [Linux-HA] Node IDs value
Alan Robertson
alanr at unix.sh
Mon Feb 26 20:42:44 MST 2007
Florent Bouron wrote:
> Hi Gurus,
>
> Is it possible to predict the node IDs used by the CIB ?
>
> I'm creating a procedure to simply create a new cluster based on a
> sample cib.xml file and it would be perfect if I could predict the node
> IDs or use a simple command to identify these values and replace them in
> my template cib.xml file.
The node ids are intended to be UUIDs - which are supposed to be
globally unique across the lifetime of the universe -- more or less.
They are stored in binary in /var/lib/heartbeat/hb_uuid on each machine,
and they're stored in ASCII for the whole cluster in
/var/lib/heartbeat/hostcache -- once heartbeat has been started.
$ cat hostcache
servidor 0f74f51a-ecf2-4271-8a94-ce4dd210fe92 100
$ od -x /var/lib/heartbeat/*uuid*
0000000 740f 1af5 f2ec 7142 948a 4dce 10d2 92fe
Note that the hostcache file is for a one-node cluster (my desktop
machine). It has one line like that per node in the cluster.
Because the uuids are stored in the same format, and dump to the same
ASCII format on every machine, that means they will od -x differently on
each machine - because od -x interprets the data as 16-bit ints. You
can dump it with -o, but then the base is 8, whereas the ASCII verison
is in base 16 :-(.
--
Alan Robertson <alanr at unix.sh>
"Openness is the foundation and preservative of friendship... Let me
claim from you at all times your undisguised opinions." - William
Wilberforce
More information about the Linux-HA
mailing list