Comment 0 for bug 1830913

Revision history for this message
Dmitrii Shcherbakov (dmitriis) wrote :

Currently by-dname symlinks are created based on serial numbers of controllers.

We started getting hardware with multi-path support that uses a different naming scheme and can support multiple namespaces per controller.

It would be good to bind block device symlinks for namespaces to namespace GUIDs (NGUID) instead of controller serial numbers.

See https://bugs.launchpad.net/curtin/+bug/1735839/comments/16 for more details and the NVMe spec reference around NGUID uniqueness and lifetime.

https://git.launchpad.net/~ubuntu-kernel/ubuntu/+source/linux/+git/bionic/tree/drivers/nvme/host/multipath.c?id=Ubuntu-4.15.0-51.55#n22
void nvme_set_disk_name(char *disk_name, struct nvme_ns *ns,
   struct nvme_ctrl *ctrl, int *flags)
{
 if (!multipath) {
  sprintf(disk_name, "nvme%dn%d", ctrl->instance, ns->head->instance);
 } else if (ns->head->disk) {
  sprintf(disk_name, "nvme%dc%dn%d", ctrl->subsys->instance,
// ...