Unable to deploy : ValueError - Failed to find storage volume id='nvme0n1'

I’m new to MAAS, I have setup MAAS with test-db using Hyper-V.
After some configuration, I can deploy Hyper-V machine successfully.
But when I deploy my PC, errors occured.
My PC has only one NVME storage and it seems that some scripe invoked by MAAS failed to reconise it.

Is here anyone get some idea about fixing it?

here’s the logs:
installation logs:
https://upload.happyzh.com/temp/installation.txt

summery/storage:

We usually receive that error when that particular disk is no longer in the server, as when a disk is replaced. Commissioning the server again will interrogate the hardware and make sure MAAS is up to date.

Okay, I will try MAAS 3.0 .

I have tried 3.0, the problem persists.
I’m sure that my nvme is always there, never beging replaced/unplaged. And I tried re-commission over and over but always get the same result.
In order to figure out what’s happeded, I checked the source of curtin(commit 818db25799d85d273a0da69075f77dc2b7c1127f), I found this:

# block_meta.py line 450:   
  volume_path = block.lookup_disk(vol_value)  # vol_value = '202101260446' according to the log.

# block\__init__.py 
def lookup_disk(serial):
  ...
  # line 926:
  disks = list(filter(lambda x: serial_udev in x,
                        os.listdir("/dev/disk/by-id/")))
  if not disks or len(disks) < 1:
    raise ValueError("no disk with serial '%s' found" % serial_udev)

According to the code, I checke whether /dev/disk/by-id/202101260446 exists or not. The result is NOT.
But there do exists some symbol links:

root@pc1:/home/ubuntu# tree /dev/disk/by-id/
/dev/disk/by-id/
├── nvme-Asgard_AN3_2TNVMe-M.2
│   └── 80_202101260446 -> ../../../nvme0n1
└── nvme-nvme.126f-323032313031323630343436-41736761726420414e332032544e564d652d4d2e322f3830-00000001 -> ../../nvme0n1

So I guess either the config passed to curtin or curtin itself needs improves.


I keep seeking and find a config-000.cfg is passed to curtin which contains:

...
storage:
  config:
  - grub_device: true
    id: nvme0n1
    model: Asgard AN3 2TNVMe-M.2/80
    name: nvme0n1
    ptable: gpt
    serial: '202101260446'
    type: disk
    wipe: superblock
...

That one is exactly the config shown in log.
But my work of seeking config stops here because I’m not yet figure how curtin get these configs from MAAS.

So I started from another side. After checking source code of MAAS, I found an executable /snap/maas/13107/usr/share/maas/machine-resources/amd64.
I guess that this is the tool for generating config and pass it to curtin.
But what superised me is that if I run it manually under target machine(rescue mode), I got the following result:

  "storage": {
            "disks": [
                {
                    "id": "nvme0n1",
                    "device": "259:0",
                    "model": "Asgard AN3 2TNVMe-M.2/80",
                    "type": "nvme",
                    "read_only": false,
                    "size": 2048408248320,
                    "removable": false,
                    "wwn": "nvme.126f-323032313031323630343436-41736761726420414e332032544e564d652d4d2e322f3830-00000001",
                    "numa_node": 0,
                    "device_path": "pci-0000:01:00.0-nvme-1",
                    "block_size": 512,
                    "firmware_version": "42A7T36A",
                    "rpm": 0,
                    "serial": "202101260446",
                    "device_id": "nvme-nvme.126f-323032313031323630343436-41736761726420414e332032544e564d652d4d2e322f3830-00000001",
                    "partitions": []
                }
            ],

Which seems the device_id is definily correct.


So, either the config MAAS passed to curtin (if config is pass from MAAS to curtin) or curtin itself needs improves.

It seems that this BUG will be fixed in the next release of systemd.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.