Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 8 Oct 2007 13:58:54 -0400
From:      Jung-uk Kim <jkim@FreeBSD.org>
To:        freebsd-current@FreeBSD.org, "Ralf S. Engelschall" <rse@FreeBSD.org>
Subject:   Re: cosmetics: bsdlabel fstype for ZFS partitions?
Message-ID:  <200710081358.56947.jkim@FreeBSD.org>
In-Reply-To: <20071008172801.GA82997@engelschall.com>
References:  <20071005193825.GA66299@engelschall.com> <539A3DC9-59C9-4106-8F35-4D5676707EC0@mac.com> <20071008172801.GA82997@engelschall.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Monday 08 October 2007 01:28 pm, Ralf S. Engelschall wrote:
> On Mon, Oct 08, 2007, Marcel Moolenaar wrote:
> > On Oct 8, 2007, at 9:42 AM, Craig Boston wrote:
> >> On Fri, Oct 05, 2007 at 09:38:25PM +0200, Ralf S. Engelschall
> >> wrote:
> >
> > [...]
> >
> >> what GUID to use.  I couldn't find a good reference for what Sun
> >> uses for ZFS disks, so I ended up making up a bogus one under
> >> FreeBSD's range.
> >>
> >> 516e7cba-6ecf-11d6-8ff8-00022d09712b
>
> Well, this UUID is...
>
> $ uuid -d 516e7cba-6ecf-11d6-8ff8-00022d09712b
> encode: STR:     516e7cba-6ecf-11d6-8ff8-00022d09712b
>         SIV:     108241150102539780167861756444952588587
> decode: variant: DCE 1.1, ISO/IEC 11578:1996
>         version: 1 (time and node based)
>         content: time:  2002-05-24 04:32:55.748933.8 UTC
>                  clock: 4088 (usually random)
>                  node:  00:02:2d:09:71:2b (global unicast)
>
> > This is technically speaking not a good idea because the UUID may
> > be in use already. In this case, given that the MAC address is in
> > one of my machines, it can only be a UUID I can possibly generate
> > (legally) and I can tell you that the UUID is not in use :-)
> >
> > If no-one has created their own UUID for ZFS, I'll re-use Craig's
> > one so that he doesn't have to change his GPT. Any objections for
> > using Craig's synthesized UUID for ZFS file systems?
>
> Well, if a really synthesized UUID for ZFS under FreeBSD is wished,
> I would propose to generate a UUID v3 for this purpose and add this
> to the FreeBSD handbook so people can find it. For instance
> something like:
>
> $ uuid -v3 ns:DNS zfs.FreeBSD.org
> 61d35356-226b-38dd-8346-f97771b80070
> $ uuid -d 61d35356-226b-38dd-8346-f97771b80070
> encode: STR:     61d35356-226b-38dd-8346-f97771b80070
>         SIV:     130032380492558881552004941246316937328
> decode: variant: DCE 1.1, ISO/IEC 11578:1996
>         version: 3 (name based, MD5)
>         content: 61:D3:53:56:22:6B:08:DD:03:46:F9:77:71:B8:00:70
>                  (not decipherable: MD5 message digest only)

FYI, FreeBSD's UUIDs are here:

http://fxr.watson.org/fxr/source/sys/gpt.h#L77

We have been using them for years and I don't think it is necessary to 
switch the encoding from v1 to v3 IMHO.

BTW, just out of my curiosity, I grok'd OpenSolaris sources.  
OpenSolaris seems to use the following UUID for ZFS nowadays:

http://fxr.watson.org/fxr/source/common/sys/efi_partition.h?v=OPENSOLARIS#L113

It seems it was reserved for cachefs but never used (according to some 
comments in the OpenSolaris source tree).  So, instead of adding 
another UUID for ZFS, they just reused it for ZFS, I guess.

I wonder what Apple would do for the upcoming ZFS support. ;-)

http://arstechnica.com/journals/apple.ars/2007/10/07/apple-delivers-zfs-readwrite-developer-preview-1-1-for-leopard

Jung-uk Kim



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200710081358.56947.jkim>