Bug 615389 - Output of "mount" is missing mapping displays for loop-mounts
Output of "mount" is missing mapping displays for loop-mounts
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: util-linux-ng (Show other bugs)
6.1
All Linux
medium Severity medium
: rc
: 6.1
Assigned To: Karel Zak
qe-baseos-daemons
:
Depends On:
Blocks: 580566
  Show dependency treegraph
 
Reported: 2010-07-16 12:38 EDT by Alexander Hass
Modified: 2011-05-19 10:05 EDT (History)
5 users (show)

See Also:
Fixed In Version: util-linux-ng-2.17.2-9.el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-05-19 10:05:45 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
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 14:10:13 EDT

  None (edit)
Description Alexander Hass 2010-07-16 12:38:17 EDT
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":

# 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 12:57:38 EDT
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 09:04:16 EDT
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 07:15:12 EDT
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 10:05:45 EDT
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.

http://rhn.redhat.com/errata/RHBA-2011-0699.html

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