linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Karel Zak <kzak-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: Andreas Dilger <adilger-xsfywfwIY+M@public.gmane.org>
Cc: "Ricardo M. Correia"
	<Ricardo.M.Correia-xsfywfwIY+M@public.gmane.org>,
	Brian Behlendorf <behlendorf1-i2BcT+NCU+M@public.gmane.org>,
	linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Emmanuel Anne
	<emmanuel.anne-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Chris Mason <chris.mason-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>,
	util-linux-ng-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [ANNOUNCE] util-linux-ng v2.17.1
Date: Tue, 2 Mar 2010 15:40:06 +0100	[thread overview]
Message-ID: <20100302144006.GA9422@nb.net.home> (raw)
In-Reply-To: <8DFF5500-85B9-4E6F-83E6-FC99A06A14C1-xsfywfwIY+M@public.gmane.org>

On Mon, Mar 01, 2010 at 04:40:43PM -0700, Andreas Dilger wrote:
>> Unfortunately, we don't have any rules for these things. See btrfs.c
>> (that's better example than vmfs.c ;-) where we have "UUID" for
>> filesystem and "UUID_SUB" (subvolume uuid) for the device.
>>
>> The udev is able to use these UUIDs to create a hierarchy of symlinks,
>> something like:
>>
>>   /dev/btrfs/<UUID>/<UUID_SUB>
>
> This is itself a bit confusing, because AFAIK btrfs can have multiple  
> "filesystems" within the same volume, so it would seem that "UUID" is  
> for the whole volume?

 Good point. Now, libblkid uses:
 
    UUID     = btrfs_super_block->fsid
    UUID_SUB = btrfs_super_block->btrfs_dev_item->uuid

 but I also see

   btrfs_super_block->btrfs_dev_item->fsid

which is uuid of FS who owns this device. Maybe it would be better to
use the "fsid" from btrfs_dev_item as UUID. Not sure.

> It would be good if we can come to some consensus for this, since in the 
> case of LVM2 it is using "UUID" for the disk UUID (seems this should be 
> "UUID_SUB"), and the volume group UUID is not printed at all (seems this 
> should be "UUID", maybe with LABEL={vgname}), and the LV UUID is 
> completely ignored.

 Well, the PV UUID is stored in PV label, the others information about
 LG and LV are in the metadata area in text format. The metadata are
 optional and versioned, etc. Currently, nobody asks for such
 information and I very happy that we don't have to parse the metadata :-)

 Don't forget that the libblkid library is used to identify block
 device content. For additional information/operations we usually call
 RAID or volume-manager specific tools by udevd.

 The libblkid library probes for PV and nothing other, so I think that
 using the "UUID" is good enough, because we don't have to
 differentiate between more UUIDs here.

> I'm ready with a ZFS patch to use "UUID" for the volume, and "UUID_SUB" 
> for the disks, once we agree that this is correct.

 Yes, makes sense.

    Karel

-- 
 Karel Zak  <kzak-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
--
To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

      parent reply	other threads:[~2010-03-02 14:40 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-22 10:30 [ANNOUNCE] util-linux-ng v2.17.1 Karel Zak
2010-02-26  1:13 ` Andreas Dilger
     [not found]   ` <A5AF32A3-C8A4-4785-8886-9CF79EFA4C57-xsfywfwIY+M@public.gmane.org>
2010-02-26 13:52     ` Karel Zak
2010-02-26 14:18       ` Ricardo M. Correia
     [not found]         ` <1267193930.10440.44.camel-RKLrhfLVcY7jLjhPMhbwMQ@public.gmane.org>
2010-02-26 15:16           ` Karel Zak
     [not found]             ` <20100226151618.GE8702-sHeGUpI7y9L/9pzu0YdTqQ@public.gmane.org>
2010-02-26 15:42               ` Ricardo M. Correia
     [not found]       ` <20100226135203.GC8702-sHeGUpI7y9L/9pzu0YdTqQ@public.gmane.org>
2010-02-26 20:07         ` Andreas Dilger
     [not found]           ` <CB4C887A-11B7-4A88-A911-102B34728B8A-xsfywfwIY+M@public.gmane.org>
2010-02-26 22:47             ` Karel Zak
     [not found]               ` <20100226224706.GH8702-sHeGUpI7y9L/9pzu0YdTqQ@public.gmane.org>
2010-03-01 23:40                 ` Andreas Dilger
     [not found]                   ` <8DFF5500-85B9-4E6F-83E6-FC99A06A14C1-xsfywfwIY+M@public.gmane.org>
2010-03-02 14:40                     ` Karel Zak [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100302144006.GA9422@nb.net.home \
    --to=kzak-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
    --cc=Ricardo.M.Correia-xsfywfwIY+M@public.gmane.org \
    --cc=adilger-xsfywfwIY+M@public.gmane.org \
    --cc=behlendorf1-i2BcT+NCU+M@public.gmane.org \
    --cc=chris.mason-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org \
    --cc=emmanuel.anne-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=util-linux-ng-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).