I did further analysis on amd64 + qemu today.

I figured that the EBUSY error is caused by LVM creating a DM entry
(e.g. ubuntu--vg-ubuntu--lvm on a typical install) using paths such as
/dev/sda and /dev/sdb - before multipathd has a chance to start and
create the /dev/mapper/mpatha device.

After boot:

$ multipath -ll
$ pvs
  WARNING: Not using device /dev/sdb3 for PV [...]
  WARNING: PV [...] prefers device /dev/sda3 because device is used by LVM.
  PV         VG        Fmt  Attr PSize  PFree
  /dev/sda3  ubuntu-vg lvm2 a--  <6.25g    0
$ journalctl -u multipathd
ubuntu-server multipathd[941]: mpatha: addmap [0 16777216 multipath 0 0 2 1 
service-time 0 1 1 8:0 1 service-time 0 1 1 8:16 1]
ubuntu-server multipathd[941]: libdevmapper: ioctl/libdm-iface.c(1990): 
device-mapper: reload ioctl on mpatha (252:1) failed: Device or resource busy
ubuntu-server multipathd[941]: dm_addmap: libdm task=0 error: Device or 
resource busy
ubuntu-server multipathd[941]: mpatha: ignoring map
$ ls /dev/mapper/
control ubuntu--vg-ubuntu--lv

At this point restarting multipathd does not help - it still fails with
EBUSY.

However, after removing the /dev/mapper entry created by LVM and
restarting multipathd, the situation becomes as expected, and the
installation can proceed.

$ dmsetup remove /dev/mapper/ubuntu--vg-ubuntu--lv
$ systemctl restart multipathd
$ multipath -ll
mpatha (0QEMU_QEMU_HARDDISK_MPIO) dm-0 QEMU,QEMU HARDDISK
size=8.0G features='0' hwhandler='0' wp=rw
|-+- policy='service-time 0' prio=1 status=active
| `- 0:0:0:0 sda 8:0  active ready running
`-+- policy='service-time 0' prio=1 status=enabled
  `- 0:0:1:0 sdb 8:16 active ready running
$ ls /dev/mapper
control  mpatha  mpatha-part1  mpatha-part2  mpatha-part3  ubuntu--vg-ubuntu--lv
$ pvs
  PV                       VG        Fmt  Attr PSize  PFree
  /dev/mapper/mpatha-part3 ubuntu-vg lvm2 a--  <6.25g    0


I wonder if we should make multipathd run before LVM? And is it going to 
address the issue originally reported - or only what we were able to reproduce 
using qemu on amd64.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2080474

Title:
  ubuntu installation failing for systems having SAN disk

To manage notifications about this bug go to:
https://bugs.launchpad.net/subiquity/+bug/2080474/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to