nvme-create-ns, we can assign namespace size and namespace capacity; what's the difference?
Is it necessary to do this before using a NVMe SSD?
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.Sign up to join this community
A namespace can have a different size and capacity thanks to thin provisioning. The namespace’s size is the total size of the namespace (in logical blocks). The namespace’s capacity is the maximum number of logical blocks which can really be allocated in the namespace. So you can create a namespace which is larger than your real capacity.
This isn’t useful on a single NVMe SSD; it’s the sort of feature which only makes sense in SAN-style deployments. See the NVMe specifications for details.
For a typical SSD I wouldn’t expect you to need to do anything related to namespaces. It should come with a pre-existing namespace, and you should be able to use that directly, without even being aware that NVMe supports namespaces.