Multipath JBOD storage devices are not shown via /dev/mapper but each path as a single device.

Bug #1887558 reported by Mirek
40
This bug affects 7 people
Affects Status Importance Assigned to Milestone
MAAS
Fix Released
Wishlist
Lee Trager

Bug Description

As in the title, if machine has multipath storage device connected e.g. JBOD via SAS controller, then each disk in the JBOD is reported N times, depend how many paths you have. It's problematic when you do commissioning as things are done multiple times, badblock test takes forever as each disk is done multiple times and also configuring when you do e.g. Ceph OSD deployment as you don't see a device you are going to use, you have to first ssh into a system and check all /dev/mapper to find a correct device for OSD.

Related branches

Revision history for this message
Lee Trager (ltrager) wrote :

MAAS does not currently support multipath devices. Curtin, the tool MAAS uses to perform installations, does. We'd have to add support for gathering information on multipath devices during commissioning, a way to properly configure multipath storage, and a way to test multipath devices.

Changed in maas:
status: New → Triaged
importance: Undecided → Wishlist
Revision history for this message
Mirek (mirek186) wrote :

I guess you could either probe for any mapper devices and detect multipath this way or do it over a serial number when collecting info about storage if the same serial more then once then just grab the first one or look for a mapper device.
Do you know where in the code it is so I could have a look myself?

Revision history for this message
Lee Trager (ltrager) wrote :

I looked at adding support for multipath on IBM Z. In that case each LPAR has access to mutlipath devices from all other LPARs. There is no way to locally determine which multipath device is for which LPAR, nor is there a way to determine if any are in use. IBM told me that its expected that a storage administrator tells users which multipath device to use. They were adding an API to get that information but it would still be configured manually in the JBOD.

The code for storage is in various places and would require alot of work to add multipath support

* Storage data actually comes from LXD - https://github.com/lxc/lxd/blob/master/lxd/resources/storage.go
* The data is processed in the metadata server - https://git.launchpad.net/maas/tree/src/metadataserver/builtin_scripts/hooks.py
* It has to be modeled. We model block devices and physical block devices. For multipath we'd most likely need to design a new model - https://git.launchpad.net/maas/tree/src/maasserver/models
* The API would have to be updated to interact with the new model - https://git.launchpad.net/maas/tree/src/maasserver/api/blockdevices.py
* The websocket would also have to be updated - https://git.launchpad.net/maas/tree/src/maasserver/websockets/handlers/node.py
* The preseed, which generates Curtin config, would require changes - https://git.launchpad.net/maas/tree/src/maasserver/preseed_storage.py
* We'd also want to update the UI to show that this is a multipath device - https://github.com/canonical-web-and-design/maas-ui

Lee Trager (ltrager)
Changed in maas:
assignee: nobody → Lee Trager (ltrager)
milestone: none → 2.10.0
status: Triaged → In Progress
Revision history for this message
Lee Trager (ltrager) wrote :

The attached branch allows MAAS to be used with multipath devices. It does this by condensing the the detected block devices into one block device per LUN. You can configure multipath devices just like normal block devices in MAAS. On deployment Curtin will detect that the given block device is actually a multipath device and configure it properly.

The only multipath hardware I have access to right now is IBM Z. Let me know if this patch doesn't work for you. I can also take a look at 50-maas-01-commissioning to see if this patch should work for your hardware.

Changed in maas:
status: In Progress → Fix Committed
Changed in maas:
milestone: 3.0.0 → 3.0-beta1
Changed in maas:
status: Fix Committed → Fix Released
Revision history for this message
Mirek (mirek186) wrote :

Hi, sorry for the late reply, but the issue is still there. The machine-resource binary is still only listing each disk. I think the correct way of doing it would be first to check multipath, e.g. multipath -ll and if any disks found there you would have to discard them from standard SATA disk output. I can see MAAS is now using LXD resource API and they don't care about multipath so maybe fixing it there would fix it for MAAS at the same time.

Revision history for this message
Carlos Bravo (carlosbravo) wrote :

Hi, as of MAAS 3.1 and 3.2 Beta the issue is still present. I have several multipath devices and they still show multiple devices instead of an mpath device.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers