How to extend the root partition in Ubuntu 18.04How can I resize an ext root partition at runtime?How to create a separate home partition after installing Ubuntu under single / partitionExpand the size of / partition with unallocated spaceHow to extend my root (/) partition?Gparted - How to move partition to extend the sizeExtend the Linux Native Pratition DiskHow to extend storage space on VPS (LVM) 9GB to 40GBhow to extend my root (/) partitionHow to Extend Ubuntu OS Partition Size from Unallocated Partition?

What's the difference between 记录 and 纪录, both pronounced jìlù, and both meaning "record"?

Finishing pre-cooked prime rib, day-of?

"Is called a sinner" vs "is a sinner"

Missing word! What word am i looking for?

Tactical illusion combat countermeasures (password system)

Why is long term binary put option more expensive than call?

Does the sterile cockpit rule mean flight attendants could not inform the pilots if a passenger is in the lavatory while on final?

smallest number obtainable from 2020

Was I wrong to rebutt unjustified rewiewer comments in the review?

I filled the crucial gap; co-authors did the rest–who should be first author?

Why wasn't Officer Angela Lopez questioned when she killed a suspect?

Why my vim doesn't support hex color code?

As of 2019, why do mountaineering courses still teach how to use a paper map?

Running wider tires in the front

Looking for a Country name

Peptide bond formation in acidic and basic amino acids

The algorithm of the new quantum factoring record 1,099,551,473,989

Java OOP Temperature Converter

Security implication if android app can be installed on emulator

Who is the controller of an Aura when the creature it enchants is stolen?

This new puzzle type needs a name

being overqualified as a barrier for getting a job

Pregnant spouse slipped abortion pills unknowingly. What would the legal ramifications be?

What can Scotland legally do to get independence?



How to extend the root partition in Ubuntu 18.04


How can I resize an ext root partition at runtime?How to create a separate home partition after installing Ubuntu under single / partitionExpand the size of / partition with unallocated spaceHow to extend my root (/) partition?Gparted - How to move partition to extend the sizeExtend the Linux Native Pratition DiskHow to extend storage space on VPS (LVM) 9GB to 40GBhow to extend my root (/) partitionHow to Extend Ubuntu OS Partition Size from Unallocated Partition?






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty
margin-bottom:0;









5


















I have the following situation:



enter image description here



Where I would like to extend the size of nvme0n1 from 8GB to 78 GB using the command line.



Adding also fdisk as requested in comments:



enter image description here



Any help is appreciated.










share|improve this question



























  • Try using sudo resize2fs /dev/nvme0n1p1

    – Mohammad Kholghi
    Oct 2 at 8:07






  • 1





    I ran it and I get "The filesystem is already 2096891 (4k) blocks long. Nothing to do!"

    – criticalth
    Oct 2 at 8:10











  • First, create a new partition using sudo fdisk /dev/nvme, then format it and after all, resize your partition using resize2fs.

    – Mohammad Kholghi
    Oct 2 at 8:18







  • 1





    Please add a screenshot of fdisk -l /dev/nvme to your question.

    – Mohammad Kholghi
    Oct 2 at 8:24






  • 1





    Please do not post screenshots of the terminal. Paste the text directly to your question and apply code formatting.

    – Melebius
    Oct 2 at 9:22

















5


















I have the following situation:



enter image description here



Where I would like to extend the size of nvme0n1 from 8GB to 78 GB using the command line.



Adding also fdisk as requested in comments:



enter image description here



Any help is appreciated.










share|improve this question



























  • Try using sudo resize2fs /dev/nvme0n1p1

    – Mohammad Kholghi
    Oct 2 at 8:07






  • 1





    I ran it and I get "The filesystem is already 2096891 (4k) blocks long. Nothing to do!"

    – criticalth
    Oct 2 at 8:10











  • First, create a new partition using sudo fdisk /dev/nvme, then format it and after all, resize your partition using resize2fs.

    – Mohammad Kholghi
    Oct 2 at 8:18







  • 1





    Please add a screenshot of fdisk -l /dev/nvme to your question.

    – Mohammad Kholghi
    Oct 2 at 8:24






  • 1





    Please do not post screenshots of the terminal. Paste the text directly to your question and apply code formatting.

    – Melebius
    Oct 2 at 9:22













5













5









5


2






I have the following situation:



enter image description here



Where I would like to extend the size of nvme0n1 from 8GB to 78 GB using the command line.



Adding also fdisk as requested in comments:



enter image description here



Any help is appreciated.










share|improve this question
















I have the following situation:



enter image description here



Where I would like to extend the size of nvme0n1 from 8GB to 78 GB using the command line.



Adding also fdisk as requested in comments:



enter image description here



Any help is appreciated.







partitioning nvme






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Oct 2 at 9:32









Melebius

8,0916 gold badges30 silver badges57 bronze badges




8,0916 gold badges30 silver badges57 bronze badges










asked Oct 2 at 7:54









criticalthcriticalth

1535 bronze badges




1535 bronze badges















  • Try using sudo resize2fs /dev/nvme0n1p1

    – Mohammad Kholghi
    Oct 2 at 8:07






  • 1





    I ran it and I get "The filesystem is already 2096891 (4k) blocks long. Nothing to do!"

    – criticalth
    Oct 2 at 8:10











  • First, create a new partition using sudo fdisk /dev/nvme, then format it and after all, resize your partition using resize2fs.

    – Mohammad Kholghi
    Oct 2 at 8:18







  • 1





    Please add a screenshot of fdisk -l /dev/nvme to your question.

    – Mohammad Kholghi
    Oct 2 at 8:24






  • 1





    Please do not post screenshots of the terminal. Paste the text directly to your question and apply code formatting.

    – Melebius
    Oct 2 at 9:22

















  • Try using sudo resize2fs /dev/nvme0n1p1

    – Mohammad Kholghi
    Oct 2 at 8:07






  • 1





    I ran it and I get "The filesystem is already 2096891 (4k) blocks long. Nothing to do!"

    – criticalth
    Oct 2 at 8:10











  • First, create a new partition using sudo fdisk /dev/nvme, then format it and after all, resize your partition using resize2fs.

    – Mohammad Kholghi
    Oct 2 at 8:18







  • 1





    Please add a screenshot of fdisk -l /dev/nvme to your question.

    – Mohammad Kholghi
    Oct 2 at 8:24






  • 1





    Please do not post screenshots of the terminal. Paste the text directly to your question and apply code formatting.

    – Melebius
    Oct 2 at 9:22
















Try using sudo resize2fs /dev/nvme0n1p1

– Mohammad Kholghi
Oct 2 at 8:07





Try using sudo resize2fs /dev/nvme0n1p1

– Mohammad Kholghi
Oct 2 at 8:07




1




1





I ran it and I get "The filesystem is already 2096891 (4k) blocks long. Nothing to do!"

– criticalth
Oct 2 at 8:10





I ran it and I get "The filesystem is already 2096891 (4k) blocks long. Nothing to do!"

– criticalth
Oct 2 at 8:10













First, create a new partition using sudo fdisk /dev/nvme, then format it and after all, resize your partition using resize2fs.

– Mohammad Kholghi
Oct 2 at 8:18






First, create a new partition using sudo fdisk /dev/nvme, then format it and after all, resize your partition using resize2fs.

– Mohammad Kholghi
Oct 2 at 8:18





1




1





Please add a screenshot of fdisk -l /dev/nvme to your question.

– Mohammad Kholghi
Oct 2 at 8:24





Please add a screenshot of fdisk -l /dev/nvme to your question.

– Mohammad Kholghi
Oct 2 at 8:24




1




1





Please do not post screenshots of the terminal. Paste the text directly to your question and apply code formatting.

– Melebius
Oct 2 at 9:22





Please do not post screenshots of the terminal. Paste the text directly to your question and apply code formatting.

– Melebius
Oct 2 at 9:22










2 Answers
2






active

oldest

votes


















2



















This looks like an AWS EC2 instance you are adding a new volume to. You started correctly by listing the available devices.



Then, you need to create a file system on the new device (use sudo file -s to check if there is a file system already) with:



sudo mkfs -t ext4 /dev/nvme0n1p1


Then, make a directory on where you want to mount it:



sudo mkdir /mydata


And mount it:



sudo mount /dev/nvme0n1p1 /mydata


Finally, add it to fstab for auto mounting by editing fstab (back it up first) using:



sudo nano /etc/fstab


with the info from:



sudo lsblk -o +UUID


Test by unmounting the file system and then mounting it again with the next commands:



sudo umount /mydata
sudo mount -a


Hope this helps.






share|improve this answer


































    0



















    Unfortunately, you cannot extend your root partition since it’s filling all of the available space on the device nvme0n1. If you want to utilize the space of the device nvme1n1, you can:



    • Use LVM for your root partition. A logical volume can spread across multiple disks using LVM. However, this would need reinstalling your system or backing it up, preparing LVM volumes and restoring current data.

    • Use nvme1n1 for a partition below your root, e.g. a separate /home or /var partition.

    See also




    • https://unix.stackexchange.com/a/452135/54675 for NVMe device naming

    • How to create a separate home partition after installing Ubuntu under single / partition





    share|improve this answer




























      Your Answer








      StackExchange.ready(function()
      var channelOptions =
      tags: "".split(" "),
      id: "89"
      ;
      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: true,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: 10,
      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/4.0/"u003ecc by-sa 4.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
      );



      );














      draft saved

      draft discarded
















      StackExchange.ready(
      function ()
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1178069%2fhow-to-extend-the-root-partition-in-ubuntu-18-04%23new-answer', 'question_page');

      );

      Post as a guest















      Required, but never shown


























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      2



















      This looks like an AWS EC2 instance you are adding a new volume to. You started correctly by listing the available devices.



      Then, you need to create a file system on the new device (use sudo file -s to check if there is a file system already) with:



      sudo mkfs -t ext4 /dev/nvme0n1p1


      Then, make a directory on where you want to mount it:



      sudo mkdir /mydata


      And mount it:



      sudo mount /dev/nvme0n1p1 /mydata


      Finally, add it to fstab for auto mounting by editing fstab (back it up first) using:



      sudo nano /etc/fstab


      with the info from:



      sudo lsblk -o +UUID


      Test by unmounting the file system and then mounting it again with the next commands:



      sudo umount /mydata
      sudo mount -a


      Hope this helps.






      share|improve this answer































        2



















        This looks like an AWS EC2 instance you are adding a new volume to. You started correctly by listing the available devices.



        Then, you need to create a file system on the new device (use sudo file -s to check if there is a file system already) with:



        sudo mkfs -t ext4 /dev/nvme0n1p1


        Then, make a directory on where you want to mount it:



        sudo mkdir /mydata


        And mount it:



        sudo mount /dev/nvme0n1p1 /mydata


        Finally, add it to fstab for auto mounting by editing fstab (back it up first) using:



        sudo nano /etc/fstab


        with the info from:



        sudo lsblk -o +UUID


        Test by unmounting the file system and then mounting it again with the next commands:



        sudo umount /mydata
        sudo mount -a


        Hope this helps.






        share|improve this answer





























          2















          2











          2









          This looks like an AWS EC2 instance you are adding a new volume to. You started correctly by listing the available devices.



          Then, you need to create a file system on the new device (use sudo file -s to check if there is a file system already) with:



          sudo mkfs -t ext4 /dev/nvme0n1p1


          Then, make a directory on where you want to mount it:



          sudo mkdir /mydata


          And mount it:



          sudo mount /dev/nvme0n1p1 /mydata


          Finally, add it to fstab for auto mounting by editing fstab (back it up first) using:



          sudo nano /etc/fstab


          with the info from:



          sudo lsblk -o +UUID


          Test by unmounting the file system and then mounting it again with the next commands:



          sudo umount /mydata
          sudo mount -a


          Hope this helps.






          share|improve this answer
















          This looks like an AWS EC2 instance you are adding a new volume to. You started correctly by listing the available devices.



          Then, you need to create a file system on the new device (use sudo file -s to check if there is a file system already) with:



          sudo mkfs -t ext4 /dev/nvme0n1p1


          Then, make a directory on where you want to mount it:



          sudo mkdir /mydata


          And mount it:



          sudo mount /dev/nvme0n1p1 /mydata


          Finally, add it to fstab for auto mounting by editing fstab (back it up first) using:



          sudo nano /etc/fstab


          with the info from:



          sudo lsblk -o +UUID


          Test by unmounting the file system and then mounting it again with the next commands:



          sudo umount /mydata
          sudo mount -a


          Hope this helps.







          share|improve this answer















          share|improve this answer




          share|improve this answer








          edited Oct 2 at 9:47









          user3140225

          2,7104 gold badges12 silver badges24 bronze badges




          2,7104 gold badges12 silver badges24 bronze badges










          answered Oct 2 at 9:36









          DGenchevDGenchev

          363 bronze badges




          363 bronze badges


























              0



















              Unfortunately, you cannot extend your root partition since it’s filling all of the available space on the device nvme0n1. If you want to utilize the space of the device nvme1n1, you can:



              • Use LVM for your root partition. A logical volume can spread across multiple disks using LVM. However, this would need reinstalling your system or backing it up, preparing LVM volumes and restoring current data.

              • Use nvme1n1 for a partition below your root, e.g. a separate /home or /var partition.

              See also




              • https://unix.stackexchange.com/a/452135/54675 for NVMe device naming

              • How to create a separate home partition after installing Ubuntu under single / partition





              share|improve this answer































                0



















                Unfortunately, you cannot extend your root partition since it’s filling all of the available space on the device nvme0n1. If you want to utilize the space of the device nvme1n1, you can:



                • Use LVM for your root partition. A logical volume can spread across multiple disks using LVM. However, this would need reinstalling your system or backing it up, preparing LVM volumes and restoring current data.

                • Use nvme1n1 for a partition below your root, e.g. a separate /home or /var partition.

                See also




                • https://unix.stackexchange.com/a/452135/54675 for NVMe device naming

                • How to create a separate home partition after installing Ubuntu under single / partition





                share|improve this answer





























                  0















                  0











                  0









                  Unfortunately, you cannot extend your root partition since it’s filling all of the available space on the device nvme0n1. If you want to utilize the space of the device nvme1n1, you can:



                  • Use LVM for your root partition. A logical volume can spread across multiple disks using LVM. However, this would need reinstalling your system or backing it up, preparing LVM volumes and restoring current data.

                  • Use nvme1n1 for a partition below your root, e.g. a separate /home or /var partition.

                  See also




                  • https://unix.stackexchange.com/a/452135/54675 for NVMe device naming

                  • How to create a separate home partition after installing Ubuntu under single / partition





                  share|improve this answer
















                  Unfortunately, you cannot extend your root partition since it’s filling all of the available space on the device nvme0n1. If you want to utilize the space of the device nvme1n1, you can:



                  • Use LVM for your root partition. A logical volume can spread across multiple disks using LVM. However, this would need reinstalling your system or backing it up, preparing LVM volumes and restoring current data.

                  • Use nvme1n1 for a partition below your root, e.g. a separate /home or /var partition.

                  See also




                  • https://unix.stackexchange.com/a/452135/54675 for NVMe device naming

                  • How to create a separate home partition after installing Ubuntu under single / partition






                  share|improve this answer















                  share|improve this answer




                  share|improve this answer








                  edited Oct 2 at 9:29

























                  answered Oct 2 at 9:22









                  MelebiusMelebius

                  8,0916 gold badges30 silver badges57 bronze badges




                  8,0916 gold badges30 silver badges57 bronze badges































                      draft saved

                      draft discarded















































                      Thanks for contributing an answer to Ask Ubuntu!


                      • 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%2faskubuntu.com%2fquestions%2f1178069%2fhow-to-extend-the-root-partition-in-ubuntu-18-04%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

                      Distance measures on a map of a game The 2019 Stack Overflow Developer Survey Results Are Inmin distance in a graphShortest distance path on contour plotHow to plot a tilted map?Finding points outside of a diskDelaunay link distanceAnnulus from GeoDisks: drawing a ring on a mapNegative Correlation DistanceFind distance along a path (GPS coordinates)Finding position at given distance in a GeoPathMathematics behind distance estimation using camera

                      How to get a smooth, uniform ParametricPlot of a 2D Region?How to plot a complicated Region?How to exclude a region from ParametricPlotHow discretize a region placing vertices on a specific non-uniform gridHow to transform a Plot or a ParametricPlot into a RegionHow can I get a smooth plot of a bounded region?Smooth ParametricPlot3D with RegionFunction?Smooth border of a region ParametricPlotSmooth region boundarySmooth region plot from list of pointsGet minimum y of a certain x in a region

                      Genealogie vun de Merowenger Vum Merowech bis zum Chilperich I. | Navigatiounsmenü