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;








5















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?)










share|improve this question







New contributor



JeffFromOhio is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

























    5















    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?)










    share|improve this question







    New contributor



    JeffFromOhio is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.





















      5












      5








      5








      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?)










      share|improve this question







      New contributor



      JeffFromOhio is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      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






      share|improve this question







      New contributor



      JeffFromOhio is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.










      share|improve this question







      New contributor



      JeffFromOhio is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.








      share|improve this question




      share|improve this question






      New contributor



      JeffFromOhio is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.








      asked 8 hours ago









      JeffFromOhioJeffFromOhio

      284




      284




      New contributor



      JeffFromOhio is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.




      New contributor




      JeffFromOhio is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






















          1 Answer
          1






          active

          oldest

          votes


















          6














          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.






          share|improve this answer

























          • 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











          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.









          draft saved

          draft discarded


















          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









          6














          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.






          share|improve this answer

























          • 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















          6














          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.






          share|improve this answer

























          • 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













          6












          6








          6







          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.






          share|improve this answer















          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.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          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

















          • 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










          JeffFromOhio is a new contributor. Be nice, and check out our Code of Conduct.









          draft saved

          draft discarded


















          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.




          draft saved


          draft discarded














          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





















































          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







          Popular posts from this blog

          Invision Community Contents History See also References External links Navigation menuProprietaryinvisioncommunity.comIPS Community ForumsIPS Community Forumsthis blog entry"License Changes, IP.Board 3.4, and the Future""Interview -- Matt Mecham of Ibforums""CEO Invision Power Board, Matt Mecham Is a Liar, Thief!"IPB License Explanation 1.3, 1.3.1, 2.0, and 2.1ArchivedSecurity Fixes, Updates And Enhancements For IPB 1.3.1Archived"New Demo Accounts - Invision Power Services"the original"New Default Skin"the original"Invision Power Board 3.0.0 and Applications Released"the original"Archived copy"the original"Perpetual licenses being done away with""Release Notes - Invision Power Services""Introducing: IPS Community Suite 4!"Invision Community Release Notes

          Canceling a color specificationRandomly assigning color to Graphics3D objects?Default color for Filling in Mathematica 9Coloring specific elements of sets with a prime modified order in an array plotHow to pick a color differing significantly from the colors already in a given color list?Detection of the text colorColor numbers based on their valueCan color schemes for use with ColorData include opacity specification?My dynamic color schemes

          Ласкавець круглолистий Зміст Опис | Поширення | Галерея | Примітки | Посилання | Навігаційне меню58171138361-22960890446Bupleurum rotundifoliumEuro+Med PlantbasePlants of the World Online — Kew ScienceGermplasm Resources Information Network (GRIN)Ласкавецькн. VI : Літери Ком — Левиправивши або дописавши її