Re: System unique identifier.....

tytso@mit.edu
Wed, 23 Jun 1999 23:04:58 -0400


Date: Tue, 22 Jun 1999 11:52:18 -0700 (PWT)
From: Matthew Jacob <mjacob@feral.com>

My original posting said why I was doing this- I've a need to generate at
least a 64 bit unique WWN for a NODE id for fibre channel. This is for
fibre channel ports that don't have assigned (in NVRAM) WWNs. Like I said,
Solaris has a hack that takes the first ethernet mac addr and or's in 1 <<
60 (and controller instance number if you're making a port vs. a node WWN)
for this purpose. I could do this also for Linux, but it raised the
metaquestion of "I need a system unique identifier". Yes, it's a
heavyweight object, but that's no reason to not make it available to
kernel (at boot time too) subsystems that need it.

Does this system unique identifier need to be the same across reboots?
If so, an in-kernel UUID generator which generates a new UUID at each
boot is obviously the wrong thing. Instead, the system unique
identifier would have to be stored on disk, and set using a system call,
much like the system's hostname is set via a system call....

If you just need a 128 or 64 bit unique id which is generated on the
spot and doesn't need to be saved across reboots, this could trivially
be done using a call to /dev/random routines.

- Ted

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/