Bug 2138459
| Summary: | lvmdevices can end up thinking a base device is partitioned after the mpath device on top was; ("WARNING: devices file is missing ... using multipath component /dev/sda.") | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 9 | Reporter: | Corey Marthaler <cmarthal> |
| Component: | lvm2 | Assignee: | LVM and device-mapper development team <lvm-team> |
| lvm2 sub component: | Devices, Filtering and Stacking | QA Contact: | cluster-qe <cluster-qe> |
| Status: | CLOSED DUPLICATE | Docs Contact: | |
| Severity: | low | ||
| Priority: | unspecified | CC: | agk, heinzm, jbrassow, msnitzer, prajnoha, teigland, zkabelac |
| Version: | 9.1 | Flags: | pm-rhel:
mirror+
|
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2023-03-08 18:13:22 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: | |||
|
Description
Corey Marthaler
2022-10-28 22:47:59 UTC
This test case was for bug 2052064. This same behavior occurs on rhel8.7 as well. kernel-4.18.0-425.el8 BUILT: Fri Sep 9 11:51:56 CDT 2022 lvm2-2.03.14-6.el8 BUILT: Fri Jul 29 05:40:53 CDT 2022 lvm2-libs-2.03.14-6.el8 BUILT: Fri Jul 29 05:40:53 CDT 2022 SCENARIO - partitioned_mpath_device_PV: Check for 'excluded: device is partitioned' message when creating a PV from a partitioned mpath device already existing in the devicesfile (bug 2052064) Copying out blanked system.devices file to begin with /tmp/system858.devices -> hayes-01:/etc/lvm/devices/system.devices multipath /dev/sde create: mpathc (36d094660575ece002291bade2acdbd28) undef DELL,PERC H330 Adp size=1.8T features='0' hwhandler='0' wp=undef `-+- policy='service-time 0' prio=1 status=undef `- 0:2:4:0 sde 8:64 undef ready running setting mpath base to:mpathc adding entry to the devices file for /dev/mapper/mpathc Using gpt label Disk size: 1907199 MB Num partitions: 1 Adding new primary partition: (40, 3905945559) = 1907199 MB Committing changes adding entry to the devices file for /dev/mapper/mpathc1 Physical volume "/dev/mapper/mpathc1" successfully created. Devices file /dev/mapper/mpathc is excluded: device is partitioned. WARNING: D-Bus notification failed: Connection timed out Devices file /dev/mapper/mpathc is excluded: device is partitioned. Labels on physical volume "/dev/mapper/mpathc1" successfully wiped. removing entry from the devices file for /dev/mapper/mpathc1 WARNING: Heartbeat did not respond at start of command. Check btimed service on remote host removing entry from the devices file for /dev/mapper/mpathc multipath -f mpathc multipath -W successfully reset wwids adding entry to the devices file for /dev/sde creating PV on hayes-01 using device /dev/sde pvcreate --yes -ff --zero y /dev/sde Devices file /dev/sde is excluded: device is partitioned. Cannot use /dev/sde: device is partitioned Traceback (most recent call last): > [root@virt-529 ~]# pvcreate /dev/sda > Cannot use /dev/sda: device is partitioned I see the same thing. If you run wipefs on the device at this point, it will show the partition info, here's what I see: $ wipefs /dev/sdf DEVICE OFFSET TYPE UUID LABEL sdf 0x200 gpt sdf 0xe8c0bffe00 gpt sdf 0x1fe PMBR and if you run wipefs -a /dev/sdf it will erase it all and then pvcreate will work. $ wipefs -a /dev/sdf /dev/sdf: 8 bytes were erased at offset 0x00000200 (gpt): 45 46 49 20 50 41 52 54 /dev/sdf: 8 bytes were erased at offset 0xe8c0bffe00 (gpt): 45 46 49 20 50 41 52 54 /dev/sdf: 2 bytes were erased at offset 0x000001fe (PMBR): 55 aa /dev/sdf: calling ioctl to re-read partition table: Success $ pvcreate /dev/sdf Physical volume "/dev/sdf" successfully created. In the original sequence above, there is no step to erase the partitions from the dice command, which could be added for a symmetrical setup/teardown. However, pvcreate -f has traditionally been able to erase partition data if you haven't already. GPT partitions is a case where that doesn't work, as reported in bug 1977734 which this should probably be a dup of. *** This bug has been marked as a duplicate of bug 1977734 *** |