From: Karel Zak <kzak@redhat.com>
To: Linda Walsh <lkml@tlinx.org>
Cc: util-linux@vger.kernel.org, LKML <linux-lkml@vger.kernel.org>
Subject: Re: new mount is broken w/regard to devnames in /etc/fstab
Date: Mon, 20 May 2013 09:53:29 +0200 [thread overview]
Message-ID: <20130520075329.GA19935@x2.net.home> (raw)
In-Reply-To: <5198086A.1010903@tlinx.org>
On Sat, May 18, 2013 at 04:02:02PM -0700, Linda Walsh wrote:
> 1) How is one supposed to get the real root device?
> It's not /dev/root -- and on my system /dev/root doesn't even exist.
> (though to be fair, it has in the past -- udev musta got sloppy this time,
> and did point to the real root device). But how can I get /proc to display
> the real root device instead of some fake name.
>
> It's insecure the way it is -- as /dev/root could be "anything"...
I don't think this is util-linux issue. It's more distro specific and
related to kernel & initramfs & udevd.
For example my Fedora 18:
$ findmnt /
TARGET SOURCE FSTYPE OPTIONS
/ /dev/sda4 ext4 rw,relatime,data=ordered
$ df /
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda4 35146488 16233036 17121452 49% /
$ grep ' / ' /proc/mounts
rootfs / rootfs rw 0 0
/dev/sda4 / ext4 rw,relatime,data=ordered 0 0
> 2) I'd like lvm's naming to be available through mount. Ideally, lvm's
> naming would be available in /proc/mounts... At least, though
> in going from /dev/VG/LV => /dev/mapper/VG-LV, that can be
> scripted reliably to get the mount device name.
For example lsblk(8) should be able to convert to the /dev/mapper
format
lsblk -rno NAME /dev/VG/LV
you can also use /dev/VG/LV for findmnt(8), it should be able to
convert the names for /dev/mapper/VG-LV to search for mountpoint.
.. or use /dev/mapper/<name> in your /etc/fstab ;-)
Karel
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
next prev parent reply other threads:[~2013-05-20 7:53 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-18 23:02 new mount is broken w/regard to devnames in /etc/fstab Linda Walsh
2013-05-20 7:53 ` Karel Zak [this message]
2013-05-20 8:03 ` Helmut Hullen
2013-05-21 2:28 ` Helmut Hullen
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=20130520075329.GA19935@x2.net.home \
--to=kzak@redhat.com \
--cc=linux-lkml@vger.kernel.org \
--cc=lkml@tlinx.org \
--cc=util-linux@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