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.

Bug 1100140

Summary: some operation cause "lvremove" can not find the object
Product: Red Hat Enterprise Linux 6 Reporter: bfan
Component: libguestfsAssignee: Pino Toscano <ptoscano>
Status: CLOSED WONTFIX QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.5CC: leiwang, linl, mbooth, ptoscano, rjones, wshi, xchen
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1100138 Environment:
Last Closed: 2017-01-23 14:05:06 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1100138    
Bug Blocks: 1301844    

Description bfan 2014-05-22 06:03:00 UTC
+++ This bug was initially created as a clone of Bug #1100138 +++

Description of problem:
1. create a LV on /dev/sda1, then re-partition /dev/sda1 without remove LV
2. reload disk and re-partition again, we can see LV still exists.
3. LV can't be removed


Version-Release number of selected component (if applicable):
libguestfs-1.22.6-22.el7.x86_64


How reproducible:
100%


Steps to Reproduce:
1. create a disk.
# dd if=/dev/zero of=/tmp/lvmtest.img bs=1M count=1024

2.  create a lvm on /dev/sda1, then re-partition /dev/sda1 without remove lvm.
(All commands in one line)
# guestfish -a /tmp/lvmtest.img run : part-disk /dev/sda msdos : pvcreate /dev/sda1 : vgcreate vg /dev/sda1 : lvcreate lv vg 50 : lvs : part-disk /dev/sda msdos
/dev/vg/lv
libguestfs: error: part_disk: parted: /dev/sda: Error: Partition(s) 1 on /dev/sda have been written, but we have been unable to inform the kernel of the change, probably because it/they are in use.  As a result, the old partition(s) will remain in use.  You should reboot now before making further changes.

3. reload disk , re-partition and do lvremove
# guestfish -a /tmp/lvmtest.img run : part-disk /dev/sda msdos : lvs : lvremove /dev/vg/lv


Actual results:
libguestfs: error: lvremove: lvremove_stub: /dev/vg/lv: No such file or directory


Expected results:
lv can be removed.


Additional info:
Same operation on rhel7 guest, LV can be removed successfully

# parted -s -- /dev/xvdb mklabel msdos mkpart primary 128s -128s
# lvm pvcreate --force /dev/xvdb1
# lvm vgcreate vg /dev/xvdb1
# lvm lvcreate -L 50 -n lv vg
# parted -s -- /dev/xvdb mklabel msdos mkpart primary 128s -128s

After reboot,
# parted -s -- /dev/xvdb mklabel msdos mkpart primary 128s -128s
# lvremove /dev/vg/lv

Comment 4 Richard W.M. Jones 2017-01-23 14:05:06 UTC
I'm closing this as WONTFIX as it's not a customer bug and is
a minor irritation.