2008-06-30

Simulating UUID in rc.server

I've now done a reasonable amount of testing, and it seems clear that an "md5 -q" hash of the output of « pdist DISK -dump | grep -v "/dev/disk" » can be used to identify a certain disk both while the system is running and the drive is mounted, and while the system is in single-user mode (in rc.server) and the drive is not mounted.

In effect, the hash functions very similarly to the UUID method that can be used in multi-user mode in fstab.

Furthermore, I have ascertained, as is only logical, that neither /private/tmp nor /Volumes has been cleaned up at the time that rc.server is running. (It's logical because the boot drive is still mounted read-only and no other drive is yet mounted.)

Therefore, putting a time-stamped info file into /tmp that contains the hash(es) of the drive(s) containing /Volumes/Clone and /Volumes/Snapshots can be used reliably to find the appropriate drive(s) to mount in order to do the backups, and that they can be mounted in /Volumes.

No comments:

About Me

My photo
Ignavis semper feriæ sunt.