Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
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.
This was fixed in Fedora 22/23 but I encountered the problem in EL7 which it appears the fix was not made in. Since the fix is already known hopefully it should be a simpler matter to patch.
+++ This bug was initially created as a clone of Bug #1306666 +++
Description of problem:
guestfish -ia … fails with:
libguestfs: Fehler: internal_parse_mountable: internal_parse_mountable_stub: /dev/centos_installed/ovirt-node-ng-1.0-0.0: No such file or directory
When there is an LV inside the disk image which has activationskip=y set.
Version-Release number of selected component (if applicable):
$ rpm -q libguestfs
libguestfs-1.30.5-2.fc22.x86_64
How reproducible:
Always
Steps to Reproduce:
1. Install Fedora with LVm inside a disk image
2. inside the image: Create another volume
3. inside the image: lvchange -k y <other-vol>
4. guestfish -ia <disk-image>
Actual results:
libguestfs: Fehler: internal_parse_mountable: internal_parse_mountable_stub: /dev/centos_installed/ovirt-node-ng-1.0-0.0: No such file or directory
Expected results:
No failure
Additional info:
--- Additional comment from Richard W.M. Jones on 2016-02-11 09:42:33 EST ---
The problem is not the activationskip flag, but that libguestfs
needs to be robust and ignore LVs which were not activated. (It's
also possible that we could activate them anyway, but there may be
other reasons why that's not a good idea).
--- Additional comment from Richard W.M. Jones on 2016-02-11 09:49:29 EST ---
Something like this (untested):
diff --git a/daemon/lvm.c b/daemon/lvm.c
index 8bef4d5..529e20d 100644
--- a/daemon/lvm.c
+++ b/daemon/lvm.c
@@ -157,6 +157,10 @@ filter_convert_old_lvs_output (char *out)
if (lv_attr[0] == 't')
goto skip_line;
+ /* Ignore activationskip (RHBZ#1306666). */
+ if (strlen (lv_attr) >= 10 && lv_attr[9] == 'k')
+ goto skip_line;
+
/* Ignore "unknown device" message (RHBZ#1054761). */
if (STRNEQ (p, "unknown device")) {
char buf[256];
@@ -260,7 +264,7 @@ do_lvs (void)
r = command (&out, &err,
str_lvm, "lvs",
"-o", "vg_name,lv_name",
- "-S", "lv_role=public",
+ "-S", "lv_role=public && lv_active=active",
"--noheadings",
"--separator", "/", NULL);
if (r == -1) {
--- Additional comment from Richard W.M. Jones on 2016-02-12 08:42:06 EST ---
My reproducer for this is a bit involved, but here goes:
$ virt-builder fedora-23
$ truncate -s 20G bigger.img
$ virt-resize fedora-23.img bigger.img
$ virt-rescue bigger.img
><rescue> pvcreate /dev/sda4
><rescue> vgcreate VG /dev/sda4
><rescue> lvcreate -L 2G -n LV1 VG
><rescue> lvcreate -L 2G -n LV2 VG
><rescue> lvcreate -L 2G -n LV3 VG
><rescue> exit
# The following command works as expected:
$ virt-inspector bigger.img
# Now we set the activationskip flag:
$ virt-rescue bigger.img
><rescue> lvchange -k y /dev/VG/LV1
><rescue> lvs -o lv_attr,lv_name,vg_name
Attr LV VG
-wi-a----k LV1 VG <--- notice the 'k' flag
-wi-a----- LV2 VG
-wi-a----- LV3 VG
><rescue> exit
# Now the following command will fail:
$ virt-inspector bigger.img
libguestfs: error: internal_parse_mountable: internal_parse_mountable_stub: /dev/VG/LV1: No such file or directory
virt-inspector: no operating system could be detected inside this disk image.
--- Additional comment from Richard W.M. Jones on 2016-02-12 08:44:56 EST ---
Patch posted:
https://www.redhat.com/archives/libguestfs/2016-February/msg00089.html
--- Additional comment from Richard W.M. Jones on 2016-02-12 11:03:11 EST ---
Upstream commit:
https://github.com/libguestfs/libguestfs/commit/2e16e3e99324112845446c82b6a6e8b3e652e10d
--- Additional comment from Fedora Update System on 2016-02-12 12:50:30 EST ---
libguestfs-1.32.2-2.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-0a73d084ca
--- Additional comment from Fedora Update System on 2016-02-12 16:26:17 EST ---
libguestfs-1.30.6-2.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2016-c491f221e5
--- Additional comment from Fedora Update System on 2016-02-14 23:52:41 EST ---
libguestfs-1.30.6-2.fc22 has been pushed to the Fedora 22 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-c491f221e5
--- Additional comment from Fedora Update System on 2016-02-15 00:24:36 EST ---
libguestfs-1.32.2-2.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-0a73d084ca
--- Additional comment from Fabian Deutsch on 2016-02-17 03:23:32 EST ---
$ guestfish -a ovirt-node-ng-image.installed.qcow2
Welcome to guestfish, the guest filesystem shell for
editing virtual machine filesystems and disk images.
Type: 'help' for help on commands
'man' to read the manual
'quit' to quit the shell
><fs> run
><fs> list-filesystems
/dev/sda1: unknown
/dev/sda2: ext4
/dev/centos_installed/ovirt-node-ng-1.0-0.0: ext4
/dev/centos_installed/ovirt-node-ng-1.0-0.0+1: ext4
/dev/centos_installed/root: ext4
/dev/centos_installed/swap: swap
/dev/centos_installed/var: ext4
This works for me.
--- Additional comment from Fabian Deutsch on 2016-02-17 03:26:09 EST ---
In comment 10 there was actually no k used - but I rechecked with k=y and it works as well:
…
><fs> sh "lvchange -k y centos_installed/ovirt-node-ng-1.0-0.0"
Logical volume "ovirt-node-ng-1.0-0.0" changed.
><fs> sh "lvs"
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
ovirt-node-ng-1.0-0.0 centos_installed Vwi-a-tz-k 14.50g pool00 root 12.46
ovirt-node-ng-1.0-0.0+1 centos_installed Vwi-aotz-- 14.50g pool00 ovirt-node-ng-1.0-0.0 12.78
pool00 centos_installed twi-aotz-- 14.52g 15.33 8.72
root centos_installed Vwi-a-tz-- 14.50g pool00 12.46
swap centos_installed -wi-a----- 2.04g
var centos_installed Vwi-a-tz-- 4.00g pool00 6.23
><fs>
------------
$ guestfish -a ovirt-node-ng-image.installed.qcow2
Welcome to guestfish, the guest filesystem shell for
editing virtual machine filesystems and disk images.
Type: 'help' for help on commands
'man' to read the manual
'quit' to quit the shell
><fs> run
><fs> list-filesystems
/dev/sda1: unknown
/dev/sda2: ext4
/dev/centos_installed/ovirt-node-ng-1.0-0.0+1: ext4
/dev/centos_installed/root: ext4
/dev/centos_installed/swap: swap
/dev/centos_installed/var: ext4
/dev/centos_installed/ovirt-node-ng-1.0-0.0 is nto there, this is correct
--- Additional comment from Fedora Update System on 2016-02-22 15:49:41 EST ---
libguestfs-1.30.6-2.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.
--- Additional comment from Fedora Update System on 2016-02-22 20:24:28 EST ---
libguestfs-1.32.2-2.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.
Comment 2Richard W.M. Jones
2016-06-09 13:38:11 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://rhn.redhat.com/errata/RHSA-2016-2576.html