[pkg-cryptsetup-devel] Bug#784881: Bug#784881: cryptsetup: WARNING: failed to detect canonical device

Paride Legovini pl at ninthfloor.org
Fri Oct 7 09:55:35 UTC 2016


On 2016-10-07 11:30, Guilhem Moulin wrote:
>> Perhaps we should add a --no-simplify to that loop?
> 
> Hmm but we'll still want unambiguous crypttab(5) lookups.  It's
> unfortunate that `btrfs filesystem` lists /dev/sda2 while the FS
> actually uses device UUIDs internally.  I think we need to call blkid(8)
> to pass the device's UUID to canonical_device().

This is the full output of btrfs filesystem show:

# btrfs filesystem show /
Label: none  uuid: 5651d651-5c48-425f-9fc9-56f2a9ad004f
	Total devices 1 FS bytes used 211.01GiB
	devid    1 size 237.97GiB used 237.97GiB path /dev/sda2

the UUID is there, easy to parse, e.g.:

# btrfs filesystem show / | sed -nr 's/^Label: .+ uuid: (.+)/\1/p'
5651d651-5c48-425f-9fc9-56f2a9ad004f

but I'm not sure of what happens when several devices contain a
filesystem with the same UUID. I guess this is the reason for using
devids instead of the uuid. In the case of multiple devices the output
of btrfs filesystem show is:

Label: none  uuid: 21f33aaa-b2b3-464b-8cf1-0f8cc3689529
        Total devices 3 FS bytes used 28.00KB
        devid    3 size 5.00GB used 1.01GB path /dev/sdd
        devid    2 size 5.00GB used 1.01GB path /dev/sdc
        devid    1 size 5.00GB used 2.02GB path /dev/sdb

Paride


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: OpenPGP digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-cryptsetup-devel/attachments/20161007/002ac2ff/attachment.sig>


More information about the pkg-cryptsetup-devel mailing list