What are nvme namespaces? How do they work?What are ConsoleKit and PolicyKit? How do they work?Files starting with .#lk0xb in ~/.gnupg directory - what are they?Major and minor numbers of a partitionLinux Disk IO Statistics Across DevicesNMVe SSD Fedora Throughput Tests too HighHow to constantly show line number when navigating in nano?Understanding how mount namespaces work in LinuxI deleted the namespaces (NS) in my nvme ssd and ubuntu is not able to recognize the deviceHow do inode numbers from ls -i relate to inodes on diskHow to check/fix nvme health?
How would a developer who mostly fixed bugs for years at a company call out their contributions in their CV?
How to respond to an e-mail asking me to suggest a doctoral research topic?
3 prong range outlet
What could a self-sustaining lunar colony slowly lose that would ultimately prove fatal?
Why is the Eisenstein ideal paper so great?
How was Daenerys able to legitimise Gendry?
Cardio work for Muay Thai fighters
Removing the last element of a list
How to let other coworkers know that I don't share my coworker's political views?
What are nvme namespaces? How do they work?
Why was this character made Grand Maester?
What is the recommended procedure to land a taildragger in a crosswind?
Possibility of faking someone's public key
Freedom of Speech and Assembly in China
Why is unzipped directory exactly 4.0k (much smaller than zipped file)?
What weight should be given to writers groups critiques?
A burglar's sunglasses, a lady's odyssey
Are cells guaranteed to get at least one mitochondrion when they divide?
Interpretation of ROC AUC score
...And they were stumped for a long time
Why did other houses not demand this?
Why do Russians almost not use verbs of possession akin to "have"?
Is keeping the forking link on a true fork necessary (Github/GPL)?
Testing using real data of the customer
What are nvme namespaces? How do they work?
What are ConsoleKit and PolicyKit? How do they work?Files starting with .#lk0xb in ~/.gnupg directory - what are they?Major and minor numbers of a partitionLinux Disk IO Statistics Across DevicesNMVe SSD Fedora Throughput Tests too HighHow to constantly show line number when navigating in nano?Understanding how mount namespaces work in LinuxI deleted the namespaces (NS) in my nvme ssd and ubuntu is not able to recognize the deviceHow do inode numbers from ls -i relate to inodes on diskHow to check/fix nvme health?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I've recently begun supporting Linux installed on devices with built-in nvme ssds. I noticed the device files had an extra number, beyond a number identifying the drive number and the partition number. IDE/SATA/SCSI drives normally only have a drive letter and partition number.
For example: /dev/nvme0n1p2
I got to wondering what the n1 part was, and after a bit of searching, it looks like that identifies an nvme 'namespace'. The definitions for it were kind of vague: "An NVMe namespace is a quantity of non-volatile memory (NVM) that can be formatted into logical blocks."
So, does this act like a partition that is defined at the hardware controller level, and not in an MBR or GPT partition table? Can a namespace span multiple physical nvme ssd's? E.g. can you create a namespace that pools together storage from multiple ssd's into a single logical namespace, similar to RAID 0?
What would you do with an NVME namespace that you can't already achieve using partition tables or LVM or a filesystem that can manage multiple volumes (like ZFS, Btrfs, etc)?
Also, why does it seem like the namespace numbering starts at 1 instead of 0? Is that just something to do with how NVME tracks the namespace numbers at a low level (e.g. partitions also start at 1, not 0, because that is how the standard for partition numbers was set, so the Linux kernel just uses whatever the partition number that is stored on disk is - I guess nvme works the same way?)
linux devices nvme
New contributor
add a comment |
I've recently begun supporting Linux installed on devices with built-in nvme ssds. I noticed the device files had an extra number, beyond a number identifying the drive number and the partition number. IDE/SATA/SCSI drives normally only have a drive letter and partition number.
For example: /dev/nvme0n1p2
I got to wondering what the n1 part was, and after a bit of searching, it looks like that identifies an nvme 'namespace'. The definitions for it were kind of vague: "An NVMe namespace is a quantity of non-volatile memory (NVM) that can be formatted into logical blocks."
So, does this act like a partition that is defined at the hardware controller level, and not in an MBR or GPT partition table? Can a namespace span multiple physical nvme ssd's? E.g. can you create a namespace that pools together storage from multiple ssd's into a single logical namespace, similar to RAID 0?
What would you do with an NVME namespace that you can't already achieve using partition tables or LVM or a filesystem that can manage multiple volumes (like ZFS, Btrfs, etc)?
Also, why does it seem like the namespace numbering starts at 1 instead of 0? Is that just something to do with how NVME tracks the namespace numbers at a low level (e.g. partitions also start at 1, not 0, because that is how the standard for partition numbers was set, so the Linux kernel just uses whatever the partition number that is stored on disk is - I guess nvme works the same way?)
linux devices nvme
New contributor
add a comment |
I've recently begun supporting Linux installed on devices with built-in nvme ssds. I noticed the device files had an extra number, beyond a number identifying the drive number and the partition number. IDE/SATA/SCSI drives normally only have a drive letter and partition number.
For example: /dev/nvme0n1p2
I got to wondering what the n1 part was, and after a bit of searching, it looks like that identifies an nvme 'namespace'. The definitions for it were kind of vague: "An NVMe namespace is a quantity of non-volatile memory (NVM) that can be formatted into logical blocks."
So, does this act like a partition that is defined at the hardware controller level, and not in an MBR or GPT partition table? Can a namespace span multiple physical nvme ssd's? E.g. can you create a namespace that pools together storage from multiple ssd's into a single logical namespace, similar to RAID 0?
What would you do with an NVME namespace that you can't already achieve using partition tables or LVM or a filesystem that can manage multiple volumes (like ZFS, Btrfs, etc)?
Also, why does it seem like the namespace numbering starts at 1 instead of 0? Is that just something to do with how NVME tracks the namespace numbers at a low level (e.g. partitions also start at 1, not 0, because that is how the standard for partition numbers was set, so the Linux kernel just uses whatever the partition number that is stored on disk is - I guess nvme works the same way?)
linux devices nvme
New contributor
I've recently begun supporting Linux installed on devices with built-in nvme ssds. I noticed the device files had an extra number, beyond a number identifying the drive number and the partition number. IDE/SATA/SCSI drives normally only have a drive letter and partition number.
For example: /dev/nvme0n1p2
I got to wondering what the n1 part was, and after a bit of searching, it looks like that identifies an nvme 'namespace'. The definitions for it were kind of vague: "An NVMe namespace is a quantity of non-volatile memory (NVM) that can be formatted into logical blocks."
So, does this act like a partition that is defined at the hardware controller level, and not in an MBR or GPT partition table? Can a namespace span multiple physical nvme ssd's? E.g. can you create a namespace that pools together storage from multiple ssd's into a single logical namespace, similar to RAID 0?
What would you do with an NVME namespace that you can't already achieve using partition tables or LVM or a filesystem that can manage multiple volumes (like ZFS, Btrfs, etc)?
Also, why does it seem like the namespace numbering starts at 1 instead of 0? Is that just something to do with how NVME tracks the namespace numbers at a low level (e.g. partitions also start at 1, not 0, because that is how the standard for partition numbers was set, so the Linux kernel just uses whatever the partition number that is stored on disk is - I guess nvme works the same way?)
linux devices nvme
linux devices nvme
New contributor
New contributor
New contributor
asked 8 hours ago
JeffFromOhioJeffFromOhio
284
284
New contributor
New contributor
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
In NVM Express (and other related standards), controllers give access to storage divided into one or more namespaces. Namespaces can be created and deleted via the controller, as long as there is room for them, and multiple controllers can provide access to a shared namespace. How the underlying storage is organised isn’t specified by the standard (as far as I can tell).
However typical NVMe SSDs can’t be combined, since they each provide their own controller attached to a PCI Express port, and the access point is the controller, above namespaces — thus a namespace can’t group multiple controllers (multiple controllers can provide access to a shared namespace). It’s better to think of namespaces as something akin to SCSI LUNs as used in enterprise storage (SANs etc.).
Namespace numbering starts at 1 because that’s how per-controller namespace identifiers work. Namespaces also have longer, globally-unique identifiers.
Namespaces can be manipulated using the nvme
command, which provides support for low-level NVMe features including:
- formatting, which performs a low-level format and allows various features to be used (secure erase, LBA format selection...);
- attaching and detaching, which allows controllers to be attached to or detached from a namespace (if they support it and the namespace allows it).
Attaching and detaching isn’t something you’ll come across in laptop or desktop NVMe drives. You’d use it with NVMe storage bays such as those sold by Dell EMC, which replace the iSCSI SANs of the past.
See the NVM Express standards for details (they’re relatively easy to read), and this NVM Express tutorial presentation for a good introduction.
I noticed the Linux 'nvme' command, in addition to support for deleting/creating namespaces, also provides concepts of attach/detach, and formatting a namespace (which seems to be separate from the format operation of a filesystem writing to the namespace). Can you provide any information about what those operations are?
– JeffFromOhio
5 hours ago
1
See my updated answer.
– Stephen Kitt
4 hours ago
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
JeffFromOhio is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f520231%2fwhat-are-nvme-namespaces-how-do-they-work%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
In NVM Express (and other related standards), controllers give access to storage divided into one or more namespaces. Namespaces can be created and deleted via the controller, as long as there is room for them, and multiple controllers can provide access to a shared namespace. How the underlying storage is organised isn’t specified by the standard (as far as I can tell).
However typical NVMe SSDs can’t be combined, since they each provide their own controller attached to a PCI Express port, and the access point is the controller, above namespaces — thus a namespace can’t group multiple controllers (multiple controllers can provide access to a shared namespace). It’s better to think of namespaces as something akin to SCSI LUNs as used in enterprise storage (SANs etc.).
Namespace numbering starts at 1 because that’s how per-controller namespace identifiers work. Namespaces also have longer, globally-unique identifiers.
Namespaces can be manipulated using the nvme
command, which provides support for low-level NVMe features including:
- formatting, which performs a low-level format and allows various features to be used (secure erase, LBA format selection...);
- attaching and detaching, which allows controllers to be attached to or detached from a namespace (if they support it and the namespace allows it).
Attaching and detaching isn’t something you’ll come across in laptop or desktop NVMe drives. You’d use it with NVMe storage bays such as those sold by Dell EMC, which replace the iSCSI SANs of the past.
See the NVM Express standards for details (they’re relatively easy to read), and this NVM Express tutorial presentation for a good introduction.
I noticed the Linux 'nvme' command, in addition to support for deleting/creating namespaces, also provides concepts of attach/detach, and formatting a namespace (which seems to be separate from the format operation of a filesystem writing to the namespace). Can you provide any information about what those operations are?
– JeffFromOhio
5 hours ago
1
See my updated answer.
– Stephen Kitt
4 hours ago
add a comment |
In NVM Express (and other related standards), controllers give access to storage divided into one or more namespaces. Namespaces can be created and deleted via the controller, as long as there is room for them, and multiple controllers can provide access to a shared namespace. How the underlying storage is organised isn’t specified by the standard (as far as I can tell).
However typical NVMe SSDs can’t be combined, since they each provide their own controller attached to a PCI Express port, and the access point is the controller, above namespaces — thus a namespace can’t group multiple controllers (multiple controllers can provide access to a shared namespace). It’s better to think of namespaces as something akin to SCSI LUNs as used in enterprise storage (SANs etc.).
Namespace numbering starts at 1 because that’s how per-controller namespace identifiers work. Namespaces also have longer, globally-unique identifiers.
Namespaces can be manipulated using the nvme
command, which provides support for low-level NVMe features including:
- formatting, which performs a low-level format and allows various features to be used (secure erase, LBA format selection...);
- attaching and detaching, which allows controllers to be attached to or detached from a namespace (if they support it and the namespace allows it).
Attaching and detaching isn’t something you’ll come across in laptop or desktop NVMe drives. You’d use it with NVMe storage bays such as those sold by Dell EMC, which replace the iSCSI SANs of the past.
See the NVM Express standards for details (they’re relatively easy to read), and this NVM Express tutorial presentation for a good introduction.
I noticed the Linux 'nvme' command, in addition to support for deleting/creating namespaces, also provides concepts of attach/detach, and formatting a namespace (which seems to be separate from the format operation of a filesystem writing to the namespace). Can you provide any information about what those operations are?
– JeffFromOhio
5 hours ago
1
See my updated answer.
– Stephen Kitt
4 hours ago
add a comment |
In NVM Express (and other related standards), controllers give access to storage divided into one or more namespaces. Namespaces can be created and deleted via the controller, as long as there is room for them, and multiple controllers can provide access to a shared namespace. How the underlying storage is organised isn’t specified by the standard (as far as I can tell).
However typical NVMe SSDs can’t be combined, since they each provide their own controller attached to a PCI Express port, and the access point is the controller, above namespaces — thus a namespace can’t group multiple controllers (multiple controllers can provide access to a shared namespace). It’s better to think of namespaces as something akin to SCSI LUNs as used in enterprise storage (SANs etc.).
Namespace numbering starts at 1 because that’s how per-controller namespace identifiers work. Namespaces also have longer, globally-unique identifiers.
Namespaces can be manipulated using the nvme
command, which provides support for low-level NVMe features including:
- formatting, which performs a low-level format and allows various features to be used (secure erase, LBA format selection...);
- attaching and detaching, which allows controllers to be attached to or detached from a namespace (if they support it and the namespace allows it).
Attaching and detaching isn’t something you’ll come across in laptop or desktop NVMe drives. You’d use it with NVMe storage bays such as those sold by Dell EMC, which replace the iSCSI SANs of the past.
See the NVM Express standards for details (they’re relatively easy to read), and this NVM Express tutorial presentation for a good introduction.
In NVM Express (and other related standards), controllers give access to storage divided into one or more namespaces. Namespaces can be created and deleted via the controller, as long as there is room for them, and multiple controllers can provide access to a shared namespace. How the underlying storage is organised isn’t specified by the standard (as far as I can tell).
However typical NVMe SSDs can’t be combined, since they each provide their own controller attached to a PCI Express port, and the access point is the controller, above namespaces — thus a namespace can’t group multiple controllers (multiple controllers can provide access to a shared namespace). It’s better to think of namespaces as something akin to SCSI LUNs as used in enterprise storage (SANs etc.).
Namespace numbering starts at 1 because that’s how per-controller namespace identifiers work. Namespaces also have longer, globally-unique identifiers.
Namespaces can be manipulated using the nvme
command, which provides support for low-level NVMe features including:
- formatting, which performs a low-level format and allows various features to be used (secure erase, LBA format selection...);
- attaching and detaching, which allows controllers to be attached to or detached from a namespace (if they support it and the namespace allows it).
Attaching and detaching isn’t something you’ll come across in laptop or desktop NVMe drives. You’d use it with NVMe storage bays such as those sold by Dell EMC, which replace the iSCSI SANs of the past.
See the NVM Express standards for details (they’re relatively easy to read), and this NVM Express tutorial presentation for a good introduction.
edited 4 hours ago
answered 6 hours ago
Stephen KittStephen Kitt
187k26434514
187k26434514
I noticed the Linux 'nvme' command, in addition to support for deleting/creating namespaces, also provides concepts of attach/detach, and formatting a namespace (which seems to be separate from the format operation of a filesystem writing to the namespace). Can you provide any information about what those operations are?
– JeffFromOhio
5 hours ago
1
See my updated answer.
– Stephen Kitt
4 hours ago
add a comment |
I noticed the Linux 'nvme' command, in addition to support for deleting/creating namespaces, also provides concepts of attach/detach, and formatting a namespace (which seems to be separate from the format operation of a filesystem writing to the namespace). Can you provide any information about what those operations are?
– JeffFromOhio
5 hours ago
1
See my updated answer.
– Stephen Kitt
4 hours ago
I noticed the Linux 'nvme' command, in addition to support for deleting/creating namespaces, also provides concepts of attach/detach, and formatting a namespace (which seems to be separate from the format operation of a filesystem writing to the namespace). Can you provide any information about what those operations are?
– JeffFromOhio
5 hours ago
I noticed the Linux 'nvme' command, in addition to support for deleting/creating namespaces, also provides concepts of attach/detach, and formatting a namespace (which seems to be separate from the format operation of a filesystem writing to the namespace). Can you provide any information about what those operations are?
– JeffFromOhio
5 hours ago
1
1
See my updated answer.
– Stephen Kitt
4 hours ago
See my updated answer.
– Stephen Kitt
4 hours ago
add a comment |
JeffFromOhio is a new contributor. Be nice, and check out our Code of Conduct.
JeffFromOhio is a new contributor. Be nice, and check out our Code of Conduct.
JeffFromOhio is a new contributor. Be nice, and check out our Code of Conduct.
JeffFromOhio is a new contributor. Be nice, and check out our Code of Conduct.
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f520231%2fwhat-are-nvme-namespaces-how-do-they-work%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown