Changing multipath default config for OS install

Is there a way to change the default setting for user_friendly_names in multipath.conf used during the OS install phase? The default for this setting is yes, which causes /etc/fstab and the grub config to get friendly device names like /dev/mapper/mpatha-part2. However if user_friendly_names is lhen later changed to no on the installed OS, this breaks the boot configuration and requires manual adjustment to fix (needing to replace mpatha with the WWID of the volume).

If curtin could run with the user_friendly_names setting already at the desired value, we can prevent the need to fix the boot config after OS install.

Hi @kevin-reeuwijk ,

I think you can achieve this by customizing the curtin installation (see this).

In the curtin early stage if you run echo -e "defaults {\n user_friendly_names no\n}" > /etc/multipath.conf you should be able to achieve this (I didn’t try it, let me know if that works)

@kevin-reeuwijk any luck?

I believe this will work, but I don’t have the boot-from-san environment to test it:

  mpath_no_friendly: sh -c "/bin/echo -e 'defaults {\n    user_friendly_names no\n}' > /etc/multipath.conf"
  mpath_restart: ["systemctl", "restart", "multipathd"]

I’ve forwarded it to the customer that does though.