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?

Why did Jon Snow do this immoral act if he is so honorable?

Using too much dialogue?

What weight should be given to writers groups critiques?

How to keep consistency across the application architecture as a team grows?

A burglar's sunglasses, a lady's odyssey

Why isn't 'chemically-strengthened glass' made with potassium carbonate? To begin with?

Can a UK national work as a paid shop assistant in the USA?

What did the 'turbo' button actually do?

Burned out due to current job, Can I take a week of vacation between jobs?

“For nothing” = “pour rien”?

Is there any chance a man can get the death penalty for causing a miscarriage?

How to respond to an e-mail asking me to suggest a doctoral research topic?

Is there a simple example that empirical evidence is misleading?

Removing the last element of a list

Did this character show any indication of wanting to rule before S8E6?

One word for 'the thing that attracts me'?

Python program for fibonacci sequence using a recursive function

On San Andreas Speedruns, why do players blow up the Picador in the mission Ryder?

Can a ring of spell storing and access to Find spells produce an endless menagerie?

Testing using real data of the customer

I want to ask company flying me out for office tour if I can bring my fiance

Cardio work for Muay Thai fighters

Has Ursula Le Guin ever admitted to be influenced by Kibbutz for the Dispossessed?

Count all vowels in string



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

          Log på Navigationsmenu

          Wonderful Copenhagen (sang) Eksterne henvisninger | NavigationsmenurSide på frankloesser.comWonderful Copenhagen

          Detroit Tigers Spis treści Historia | Skład zespołu | Sukcesy | Członkowie Baseball Hall of Fame | Zastrzeżone numery | Przypisy | Menu nawigacyjneEncyclopedia of Detroit - Detroit TigersTigers Stadium, Detroit, MITigers Timeline 1900sDetroit Tigers Team History & EncyclopediaTigers Timeline 1910s1935 World Series1945 World Series1945 World Series1984 World SeriesComerica Park, Detroit, MI2006 World Series2012 World SeriesDetroit Tigers 40-Man RosterDetroit Tigers Coaching StaffTigers Hall of FamersTigers Retired Numberse