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;
I have the following situation:
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:
Any help is appreciated.
partitioning nvme
|
show 7 more comments
I have the following situation:
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:
Any help is appreciated.
partitioning nvme
Try usingsudo 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 usingsudo fdisk /dev/nvme
, then format it and after all, resize your partition usingresize2fs
.
– Mohammad Kholghi
Oct 2 at 8:18
1
Please add a screenshot offdisk -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
|
show 7 more comments
I have the following situation:
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:
Any help is appreciated.
partitioning nvme
I have the following situation:
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:
Any help is appreciated.
partitioning nvme
partitioning nvme
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 usingsudo 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 usingsudo fdisk /dev/nvme
, then format it and after all, resize your partition usingresize2fs
.
– Mohammad Kholghi
Oct 2 at 8:18
1
Please add a screenshot offdisk -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
|
show 7 more comments
Try usingsudo 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 usingsudo fdisk /dev/nvme
, then format it and after all, resize your partition usingresize2fs
.
– Mohammad Kholghi
Oct 2 at 8:18
1
Please add a screenshot offdisk -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
|
show 7 more comments
2 Answers
2
active
oldest
votes
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.
add a comment
|
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
add a comment
|
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%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
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.
add a comment
|
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.
add a comment
|
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.
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.
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
add a comment
|
add a comment
|
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
add a comment
|
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
add a comment
|
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
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
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
add a comment
|
add a comment
|
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
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 usingresize2fs
.– 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