From: Duncan <1i5t5.duncan@cox.net>
To: linux-btrfs@vger.kernel.org
Subject: Re: Can I see what device was used to mount btrfs?
Date: Wed, 3 May 2017 21:19:31 +0000 (UTC) [thread overview]
Message-ID: <pan$8ae23$5a262cb7$97dabdcd$19e38885@cox.net> (raw)
In-Reply-To: CAJCQCtQwCohHJBKihg5fMC2Wc6+jz=Zc-a5MAOBaV4Pt-YzN6w@mail.gmail.com
Chris Murphy posted on Wed, 03 May 2017 12:43:36 -0600 as excerpted:
> If I understand the bug report correctly, the user specifies mounting by
> label which then systemd is converting into /dev/dm-0 (because it's a
> two LUKS devices Btrfs volume).
>
> Why not convert the fstab mount by label request, into a /dev/by-uuid/
> path; and then systemd calls mount with -u,--uuid mount option rather
> than the block device? I'd think this is better no matter what the file
> system is, but certainly with Btrfs and possibly ZFS. That makes the
> device discovery problem not systemd's problem to hassle with.
You're forgetting one thing: mount doesn't handle either label or uuid
(or similar partlabel/partuid/etc) mounting on its own -- it interprets
all of these as the appropriate /dev/disk/by-* symlink references,
dereferences those to the canonical device name, and actually mounts
using that.
See the mount (8) manpage, relatively near the top under "Indicating the
device", the relevant quote being "The mount (8) command internally uses
udev symlinks, so the use of symlinks in /etc/fstab has no advantage over
[LABEL=, UUID=, etc] tags."
And of course it's systemd's udev component that sets up those /dev/disk/
by-* symlinks in the first place.
So converting mount-by-label requests to mount-by-uuid requests gets you
exactly nowhere, as underneath the covers they're both using the the same
level udev-generated /dev/disk/by-* symlinks to get the canonical device
name, so not only do you fail to get rid of the systemd/udev involvement,
you fail to even reduce abstraction to a lower level.
Not to mention that newer systemd is apparently using its own mount-
alternative now, and doesn't actually call the traditional mount binary
any more, at least for supported filesystem types. I'm not qualified to
argue the case for or against that, but it's apparently happening now,
and regardless of where one stands on the merits, it's certainly
inserting systemd even farther into the mount process for relatively
complex and fuller-featured filesystems such as btrfs.
--
Duncan - List replies preferred. No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master." Richard Stallman
next prev parent reply other threads:[~2017-05-03 21:19 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-30 5:47 Can I see what device was used to mount btrfs? Andrei Borzenkov
2017-05-02 3:26 ` Anand Jain
2017-05-02 13:58 ` Adam Borowski
2017-05-02 14:19 ` Andrei Borzenkov
2017-05-02 18:49 ` Adam Borowski
2017-05-02 19:50 ` Goffredo Baroncelli
2017-05-02 20:15 ` Kai Krakow
2017-05-02 20:34 ` Adam Borowski
2017-05-03 11:32 ` Austin S. Hemmelgarn
2017-05-03 17:05 ` Goffredo Baroncelli
2017-05-03 18:43 ` Chris Murphy
2017-05-03 21:19 ` Duncan [this message]
2017-05-04 2:15 ` Chris Murphy
2017-05-04 3:48 ` Andrei Borzenkov
2017-05-03 11:26 ` Austin S. Hemmelgarn
2017-05-03 18:12 ` Andrei Borzenkov
2017-05-03 18:53 ` Austin S. Hemmelgarn
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='pan$8ae23$5a262cb7$97dabdcd$19e38885@cox.net' \
--to=1i5t5.duncan@cox.net \
--cc=linux-btrfs@vger.kernel.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).