RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1057492 - mount-local should give a clearer error if root is not mounted
Summary: mount-local should give a clearer error if root is not mounted
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libguestfs
Version: 7.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Richard W.M. Jones
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On: 1057504 1062533 1062890
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-01-24 09:00 UTC by yuliu
Modified: 2014-06-18 02:02 UTC (History)
6 users (show)

Fixed In Version: libguestfs-1.22.6-19.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1057504 1057510 (view as bug list)
Environment:
Last Closed: 2014-06-13 10:31:17 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description yuliu 2014-01-24 09:00:37 UTC
Description of problem:
Before run "mount-local localmountpoint " you should mount filesystem to "/" first.
This prerequisites should be added to help info.

Version-Release number of selected component (if applicable):


How reproducible:
100%

Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Richard W.M. Jones 2014-01-24 09:07:09 UTC
If you use mount-local without mounting something on / then you get
odd errors:

$ mkdir -p /tmp/mnt
$ guestfish -x -N fs mount-local /tmp/mnt : mount-local-run
libguestfs: error: lstat: lstat_stub: you must call 'mount' first to mount the root filesystem
libguestfs: error: lstat: lstat_stub: you must call 'mount' first to mount the root filesystem

Basically what happens is that mount-local itself doesn't do the
usual "is root mounted" daemon check (because it cannot - it is not
running in the daemon).  However any later commands which are run
by mount-local do this check, and give errors.

It would be better if mount-local itself did this check and gave
a clearer error if root was not mounted.

Comment 3 Richard W.M. Jones 2014-02-05 16:52:16 UTC
Upstream fix is 0e2489974b91e4728d544fe2aa08c2a1c9deb365.

Comment 6 yuliu 2014-02-10 07:47:54 UTC
Version: libguestfs-1.22.6-19.el7.x86_64

When use mount-local without mounting something on "/":

# guestfish -x -N fs mount-local /tmp/mnt : mount-local-run

libguestfs: error: you must call 'guestfs_mount' first to mount a filesystem on '/'.
Note: '/tmp/mnt' is still mounted.  Use 'guestunmount /tmp/mnt' to clean up.

It gives a clear error info about what to do first.

Comment 7 Ludek Smid 2014-06-13 10:31:17 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.


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