lvcreate fails with duplicate paths to physical volume
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ubuntu on IBM z Systems |
Fix Released
|
High
|
Canonical Server | ||
curtin |
Fix Released
|
Critical
|
Ryan Harper | ||
subiquity |
Invalid
|
Undecided
|
Unassigned |
Bug Description
An subiquity installation was done on an s390x LPAR using a zFCP disk where previously a LUKS installation was done. While doing a LVM installation then (this time w/o LUKS) I faced this error:
curtin: Installation failed with exception: Unexpected error while running comm
and.
Command: ['curtin', 'block-meta', 'simple']
Exit code: 3
Reason: -
Stdout: start: cmd-install/
mmand block-meta
Processing serial 0x6005076306ffd
076306ffd6b6000
005076306ffd6b6
part2']
Running command ['udevadm', 'info', '--query=property', '--export', '/d
ev/sda'] with allowed return codes [0] (capture=True)
Processing serial 36005076306ffd6
6306ffd6b600000
005076306ffd6b6
part2']
Running command ['udevadm', 'info', '--query=property', '--export', '/d
I've attached the full steps of the installation (partially with workarounds due to a VLAN nw issue).
And I'll also attach the full /var/log and /var/crash.
Related branches
- Michael Hudson-Doyle: Approve
- Richard Harding (community): Approve
- Server Team CI bot: Approve (continuous-integration)
-
Diff: 208 lines (+38/-16)7 files modifiedcurtin/block/__init__.py (+3/-0)
curtin/block/clear_holders.py (+1/-0)
curtin/block/multipath.py (+14/-9)
curtin/commands/block_meta.py (+10/-5)
examples/tests/multipath-lvm.yaml (+5/-1)
examples/tests/multipath.yaml (+4/-0)
tests/unittests/test_block.py (+1/-1)
- Server Team CI bot: Approve (continuous-integration)
- Dan Watkins (community): Approve
-
Diff: 284 lines (+156/-7)7 files modifiedcurtin/block/clear_holders.py (+4/-0)
curtin/block/multipath.py (+2/-0)
curtin/commands/block_meta.py (+4/-0)
examples/tests/multipath-lvm-part-wipe.yaml (+125/-0)
tests/unittests/test_clear_holders.py (+5/-5)
tests/unittests/test_curthooks.py (+7/-2)
tests/vmtests/test_multipath_lvm.py (+9/-0)
- Server Team CI bot: Approve (continuous-integration)
- Dan Watkins (community): Approve
-
Diff: 1937 lines (+818/-227)24 files modifiedcurtin/block/__init__.py (+76/-11)
curtin/block/clear_holders.py (+23/-51)
curtin/block/lvm.py (+30/-3)
curtin/block/mdadm.py (+10/-25)
curtin/block/multipath.py (+50/-4)
curtin/commands/block_discover.py (+11/-2)
curtin/commands/block_meta.py (+114/-53)
curtin/commands/clear_holders.py (+44/-9)
curtin/commands/curthooks.py (+69/-20)
examples/tests/multipath-lvm.yaml (+117/-0)
examples/tests/multipath.yaml (+2/-0)
examples/tests/vmtest_defaults.yaml (+4/-1)
tests/unittests/test_block.py (+14/-4)
tests/unittests/test_block_lvm.py (+30/-0)
tests/unittests/test_block_mdadm.py (+8/-6)
tests/unittests/test_block_multipath.py (+1/-0)
tests/unittests/test_clear_holders.py (+30/-30)
tests/unittests/test_commands_block_meta.py (+7/-0)
tests/unittests/test_commands_clear_holders.py (+24/-0)
tests/unittests/test_make_dname.py (+3/-3)
tests/vmtests/__init__.py (+2/-1)
tests/vmtests/releases.py (+2/-1)
tests/vmtests/test_multipath.py (+80/-3)
tests/vmtests/test_multipath_lvm.py (+67/-0)
Changed in ubuntu-z-systems: | |
status: | New → Triaged |
tags: | added: req4focal |
Changed in ubuntu-z-systems: | |
status: | Triaged → In Progress |
Changed in ubuntu-z-systems: | |
status: | In Progress → Fix Committed |
Changed in ubuntu-z-systems: | |
status: | Fix Committed → In Progress |
Changed in curtin: | |
status: | Fix Committed → In Progress |
We create the vg on /dev/sda2
Running command ['vgcreate', '--force', '--zero=y', '--yes', 'ubuntu-vg', '/dev/sda2'] with allowed return codes [0] (capture=True) stage-partition ing/builtin/ cmd-block- meta: SUCCESS: configuring lvm_volgroup: lvm_volgroup-0 stage-partition ing/builtin/ cmd-block- meta: configuring lvm_partition: lvm_partition-0
Running command ['pvscan'] with allowed return codes [0] (capture=True)
Running command ['vgscan', '--mknodes'] with allowed return codes [0] (capture=True)
finish: cmd-install/
start: cmd-install/
Running command ['lvcreate', 'ubuntu-vg', '--name', 'ubuntu-lv', '--zero=y', '--wipesignatur es=y', '--size', '4294967296.0B'] with allowed return codes [0] (capture=False) fWXS-JNWB- WPJC-vUhM- 2K46-6f5AAU. fWXS-JNWB- WPJC-vUhM- 2K46-6f5AAU. fWXS-JNWB- WPJC-vUhM- 2K46-6f5AAU. fWXS-JNWB- WPJC-vUhM- 2K46-6f5AAU prefers device /dev/sda2 because device name matches previous. fWXS-JNWB- WPJC-vUhM- 2K46-6f5AAU prefers device /dev/sda2 because device name matches previous. fWXS-JNWB- WPJC-vUhM- 2K46-6f5AAU prefers device /dev/sda2 because device name matches previous. nError - Unexpected error while running command. es=y', '--size', '4294967296'
WARNING: Not using device /dev/sdb2 for PV los2ZN-
WARNING: Not using device /dev/sdc2 for PV los2ZN-
WARNING: Not using device /dev/sdd2 for PV los2ZN-
WARNING: PV los2ZN-
WARNING: PV los2ZN-
WARNING: PV los2ZN-
Cannot update volume group ubuntu-vg with duplicate PV devices.
An error occured handling 'lvm_partition-0': ProcessExecutio
Command: ['lvcreate', 'ubuntu-vg', '--name', 'ubuntu-lv', '--zero=y', '--wipesignatur
And then lvm looks at other *disks* on the system (and sees duplicates due to multipath).
It looks like curtin will need to dynamically enable lvm filters to ignore these:
--config 'devices{ filter = filter = [ "a|/dev/sda2$|" ] }'