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?

I missed an important client meeting and hurt my standing. How can I recover?

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

Gboard stopped working on Motorola phone -

Tactical illusion combat countermeasures (password system)

How do astronauts brew tea on ISS and what brewing temperature is common?

Why has Trump refused to recognize the Armenian Genocide?

Can a public school in the USA force a 14yr old to create a Twitter account for a passing grade?

What's the difference between "men of violence" and "violent men"?

How can I get 2 characters to bond while standing alternate watches?

How to prevent humanity from using alien spaceships and technology exclusively?

Equivalent circuit of a non-ideal resistor

The default C drive is too small. How to make Windows boot from D drive

Would it have been possible to re-fuel the planes in the air?

being overqualified as a barrier for getting a job

Was Jumanji intended to be a co-op game?

SQL Server CUs vs SPs + CUs?

What does a reduction gearbox do in a turbofan engine?

Is it ethical to apply for a short-term grant with a partner/spouse/girlfriend?

How can I ensure consistency in web design?

My film came out blank (completely black and opaque) — is this a camera problem, my mistake, or the lab's?

I don't feel like creating this riddle today

Modeling in pure math

Change cone width

Using only one terminal, can I interrupt a process that's hung on very early Unix versions?



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

                      Tamil (spriik) Luke uk diar | Nawigatjuun

                      Align equal signs while including text over equalitiesAMS align: left aligned text/math plus multicolumn alignmentMultiple alignmentsAligning equations in multiple placesNumbering and aligning an equation with multiple columnsHow to align one equation with another multline equationUsing \ in environments inside the begintabularxNumber equations and preserving alignment of equal signsHow can I align equations to the left and to the right?Double equation alignment problem within align enviromentAligned within align: Why are they right-aligned?

                      Training a classifier when some of the features are unknownWhy does Gradient Boosting regression predict negative values when there are no negative y-values in my training set?How to improve an existing (trained) classifier?What is effect when I set up some self defined predisctor variables?Why Matlab neural network classification returns decimal values on prediction dataset?Fitting and transforming text data in training, testing, and validation setsHow to quantify the performance of the classifier (multi-class SVM) using the test data?How do I control for some patients providing multiple samples in my training data?Training and Test setTraining a convolutional neural network for image denoising in MatlabShouldn't an autoencoder with #(neurons in hidden layer) = #(neurons in input layer) be “perfect”?