pmem / ndctl

A "device memory" enabling project encompassing tools and libraries for CXL, NVDIMMs, DAX, memory tiering and other platform memory device topics.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Some of the namespace management commands are not working from guest VM

NoufalKMuhammed opened this issue · comments

From virtual machine, we need to do the following on the namespaces exposed to it.

  1. Detect the badblocks.
    Commands: ndctl start-srub, ndctl wait-scrub, ndctl list -NH -vvv

  2. Clear the badblocks.
    Commands: ndctl inject-error --uninject --block=1024 --count=1 namespace0.0
    ndctl clear-errors namespace0.0

  3. Inject badblocks (for test / experiments).
    Commands: ndctl inject-error --block=1024 --count=1 namespace0.0
    ndctl inject-error --status namespace0.0

But above commands are not working from virtual machine. I have tried this with different hypervisors (AHV (KVM based) and ESXi) and different virtual machines, the commands are not working and the results are same. So this issue is hypervisor agnostic.
One of the setup and commands output are shown below.

lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 22.04 LTS
Release:	22.04
Codename:	jammy


uname -r
5.15.0-33-generic


ndctl --version
72.1+


ndctl list
[
  {
    "dev":"namespace0.0",
    "mode":"fsdax",
    "map":"dev",
    "size":16909336576,
    "uuid":"ac94096b-9820-4a13-8bce-aaaa6407320c",
    "sector_size":512,
    "align":2097152,
    "blockdev":"pmem0"
  }
]


ndctl start-scrub
error starting scrub: No such file or directory
sudo ndctl clear-errors namespace0.0
  Error: namespace0.0: Unable to determine scrub state: Operation not supported

error clearing namespaces: Operation not supported
cleared 0 namespaces