All of lore.kernel.org
 help / color / mirror / Atom feed
* UUID of subvolumes
@ 2010-04-08 15:51 David Brown
  2010-04-08 22:57 ` Karel Zak
  0 siblings, 1 reply; 2+ messages in thread
From: David Brown @ 2010-04-08 15:51 UTC (permalink / raw)
  To: linux-btrfs

I am developing backup software (<http://github.com/d3zd3z/jpool> for
the curious), and have been doing some testing with btrfs.

Jpool currently uses the blkid database to map between device numbers
(st_rdev) and the uuid of a particular filesystem.  I originally
created this because LVM device numbers sometimes changed.  Jpool
uses the uuid to track files within a tree.

The subvolumes on btrfs seem to be getting ephemeral device numbers,
which aren't listed in the blkid output.  The program falls back to
using the mountpoint, but that misses mountpoints changing.

   - Do subvolumes in btrfs even have separate uuids, and should they?

   - Is there any way for me to map a particular st_rdev value to a
     particular filesystem/subvolume?

   - btrfs seems to allow me to rename subvolumes, so this doesn't seem
     like a particularly good value to use as a key.  The device number
     can change depending on what else might be used.

   - Any other ideas on a unique key I could use for a given subvolume
     to identify the files on that volume, even if it moves around?

Thanks,
David Brown

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: UUID of subvolumes
  2010-04-08 15:51 UUID of subvolumes David Brown
@ 2010-04-08 22:57 ` Karel Zak
  0 siblings, 0 replies; 2+ messages in thread
From: Karel Zak @ 2010-04-08 22:57 UTC (permalink / raw)
  To: David Brown; +Cc: linux-btrfs

On Thu, Apr 08, 2010 at 08:51:42AM -0700, David Brown wrote:
> I am developing backup software (<http://github.com/d3zd3z/jpool> for
> the curious), and have been doing some testing with btrfs.
>
> Jpool currently uses the blkid database to map between device numbers
> (st_rdev) and the uuid of a particular filesystem.  I originally
> created this because LVM device numbers sometimes changed.  Jpool
> uses the uuid to track files within a tree.
>
> The subvolumes on btrfs seem to be getting ephemeral device numbers,
> which aren't listed in the blkid output.  The program falls back to
> using the mountpoint, but that misses mountpoints changing.
>
>   - Do subvolumes in btrfs even have separate uuids, and should they?

I think yes, in libblkid code is:

   blkid_probe_set_uuid(pr, bfs->fsid);
   blkid_probe_set_uuid_as(pr, bfs->dev_item.uuid, "UUID_SUB");

so there should be two UUIDs for the device.

However, I'd like to see more information about btrfs UUIDs.

BTW, see my old discussion with Andreas about UUIDs:
http://marc.info/?l=linux-fsdevel&m=126754081900406&w=2

    Karel

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-04-08 22:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-04-08 15:51 UUID of subvolumes David Brown
2010-04-08 22:57 ` Karel Zak

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.