Search code examples
namespacesnvme

Error while using nvme-cli to create a separate namespace


I am new to using nvme-cli and am trying to create a new namespace on my ubuntu linux machine using nvme-cli package. I have tried out the following command: nvme create-ns /dev/nvme0n1 -s 4096 -c 4096 -b 512 However, it returns:

identify failed
NVMe status: INVALID_NS: The namespace or the format of that namespace is invalid(0x400b)

What could be the reason for this to be the case? I have seen some examples online which have used this command to successfully create a new namespace.


Solution

  • Okay, so after figuring things out a bit, I found out the fact that my computer's SSD has a maximum cap on the total number of namespaces set as 1. So basically, multiple namespaces can't exist in this SSD. And in fact, most of the conventional SSDs only have a capacity of just 1 namespace.

    I used nvme-cli package to check this out. I had to use the command:

    nvme id-ctrl <device>
    

    Here device may look like /dev/nvme0n1 or possibly something else as well based on your system.