Bug 615389 - Output of "mount" is missing mapping displays for loop-mounts
Summary: Output of "mount" is missing mapping displays for loop-mounts
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: util-linux-ng   
(Show other bugs)
Version: 6.1
Hardware: All
OS: Linux
Target Milestone: rc
: 6.1
Assignee: Karel Zak
QA Contact: qe-baseos-daemons
Depends On:
Blocks: 580566
TreeView+ depends on / blocked
Reported: 2010-07-16 16:38 UTC by Alexander Hass
Modified: 2011-05-19 14:05 UTC (History)
5 users (show)

Fixed In Version: util-linux-ng-2.17.2-9.el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2011-05-19 14:05:45 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:0699 normal SHIPPED_LIVE util-linux-ng bug fix and enhancement update 2011-05-18 18:10:13 UTC

Description Alexander Hass 2010-07-16 16:38:17 UTC
The output of "mount" does not display the mapping of <source image> to
<mountpoint> directly in RHEL 6, where RHEL 5 used to display it. E.g.

# mount -o loop,ro /mnt/tmp/rhel/6.0beta2/x86_64/RHEL6.0-20100622.1-Server-x86_64-DVD1.iso /mnt/loop/

RHEL 5.2 (util-linux-2.13-0.47.el5):
# mount | grep iso
/mnt/tmp/rhel/6.0beta2/x86_64/RHEL6.0-20100622.1-Server-x86_64-DVD1.iso on /mnt/loop type iso9660 (ro,loop=/dev/loop0)

RHEL 6 (util-linux-ng-2.17.2-1.el6.x86_64):
# mount | grep iso
/dev/loop0 on /mnt/loop type iso9660 (ro)

Therefore the needed information has to be determined manually, e.g. via

# losetup /dev/loop0
/dev/loop0: [0016]:1519 (/mnt/tmp/rhel/6.0beta2/x86_64/RHEL6.0-20100622.1-Server-x86_64*)

Please adapt "mount" to resolve the mappings directly again.

Comment 2 RHEL Product and Program Management 2010-07-16 16:57:38 UTC
This issue has been proposed when we are only considering blocker
issues in the current Red Hat Enterprise Linux release. It has
been denied for the current Red Hat Enterprise Linux release.

** If you would still like this issue considered for the current
release, ask your support representative to file as a blocker on
your behalf. Otherwise ask that it be considered for the next
Red Hat Enterprise Linux release. **

Comment 3 Karel Zak 2010-07-19 13:04:16 UTC
The Linux kernel (since 2.6.25) supports auto-clear flag for mount
devices. All loop devices with this flag are automatically destroyed
when the device is unmounted. The auto-clear flag allows to remove loop=
mount option from /etc/mtab.

Our long-term goal is to remove /etc/mtab from Linux (and use
/proc/self/mountinfo only), so we want to minimize number of userspace
specific mount options. 

We can revert the auto-clear support in RHEL6 mount(8), but it's not optimal
solution from long-term point of view.

The final solution is to improve losetup(8) to return full path to the
backing file (now the filename is restricted to 64 bytes in
LOOP_GET_STATUS ioctl (the ideal solution is to have the filename in /sys)).

Comment 4 Karel Zak 2010-07-29 11:15:12 UTC
Side effect of this bug is that "mount -a" can mount the same image file twice -- for more details see bug #618957

Comment 10 errata-xmlrpc 2011-05-19 14:05:45 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.


Note You need to log in before you can comment on or make changes to this bug.