Does `resize2fs` by default do nothing?
Clash Royale CLAN TAG#URR8PPP
For resize2fs
,
If ``size parameter is not specified, it will default to the
size of the partition
The size of a filesystem is by default the size of its underlying partition.
So by default, resize2fs
doesn't change the size of a filesystem. Does it do nothing?
Thanks.
filesystems resize2fs
add a comment |
For resize2fs
,
If ``size parameter is not specified, it will default to the
size of the partition
The size of a filesystem is by default the size of its underlying partition.
So by default, resize2fs
doesn't change the size of a filesystem. Does it do nothing?
Thanks.
filesystems resize2fs
add a comment |
For resize2fs
,
If ``size parameter is not specified, it will default to the
size of the partition
The size of a filesystem is by default the size of its underlying partition.
So by default, resize2fs
doesn't change the size of a filesystem. Does it do nothing?
Thanks.
filesystems resize2fs
For resize2fs
,
If ``size parameter is not specified, it will default to the
size of the partition
The size of a filesystem is by default the size of its underlying partition.
So by default, resize2fs
doesn't change the size of a filesystem. Does it do nothing?
Thanks.
filesystems resize2fs
filesystems resize2fs
asked Feb 21 at 17:29
TimTim
27.8k78269486
27.8k78269486
add a comment |
add a comment |
3 Answers
3
active
oldest
votes
If the underlying partition is larger than the filesystem within it, resize2fs
will, by default, attempt to expand the filesystem to fill the partition.
For example, if /dev/sdd3
is a 1TB partition, and we were to run:
# mke2fs /dev/sdd3 500G
We will have a 500GB partition within a 1TB partition. If we then resize2fs /dev/sdd3
, it will be expanded to the full 1TB.
add a comment |
The size of a filesystem is by default the size of its underlying partition.
Usually, yes. There's little point in creating a filesystem smaller than the available space on the partition.
But if you're trying to enlarge the filesystem, you'll first have to enlarge the device it's on. For the usual fixed partitions, that's not often possible (you'd need to have available space after the partition itself), but with something like LVM it's trivial, since you can just resize the logical volume at will.
After resizing the partition/volume, the filesystem only makes use of the originally available space, and at that point resize2fs
is necessary. Again, you'll usually want to resize the partition to the fill all the now available space, so the default action is what you want.
add a comment |
I also often (ab)use resize2fs
in some smallish/skeletal VMs for not to have to setup LVM.
For extending a drive/partition, I can provisioning/extend a virtual physical hard disk, and then delete and create a new bigger partition. Once I do that, I can extend the partition to the new "physical" space. (for instance, in vmware, I just edit an existing virtual disk, and edit it to be 10GB instead of 5GB...)
Or even in a physical disk, you can delete a second partition, delete the 1st one and recreate it using the former space of the two partitions, and then use resizefs
for having a single partition where once you had two partitions.
So, resize2fs
does something even without using LVM.
add a comment |
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
);
);
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%2funix.stackexchange.com%2fquestions%2f502136%2fdoes-resize2fs-by-default-do-nothing%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
If the underlying partition is larger than the filesystem within it, resize2fs
will, by default, attempt to expand the filesystem to fill the partition.
For example, if /dev/sdd3
is a 1TB partition, and we were to run:
# mke2fs /dev/sdd3 500G
We will have a 500GB partition within a 1TB partition. If we then resize2fs /dev/sdd3
, it will be expanded to the full 1TB.
add a comment |
If the underlying partition is larger than the filesystem within it, resize2fs
will, by default, attempt to expand the filesystem to fill the partition.
For example, if /dev/sdd3
is a 1TB partition, and we were to run:
# mke2fs /dev/sdd3 500G
We will have a 500GB partition within a 1TB partition. If we then resize2fs /dev/sdd3
, it will be expanded to the full 1TB.
add a comment |
If the underlying partition is larger than the filesystem within it, resize2fs
will, by default, attempt to expand the filesystem to fill the partition.
For example, if /dev/sdd3
is a 1TB partition, and we were to run:
# mke2fs /dev/sdd3 500G
We will have a 500GB partition within a 1TB partition. If we then resize2fs /dev/sdd3
, it will be expanded to the full 1TB.
If the underlying partition is larger than the filesystem within it, resize2fs
will, by default, attempt to expand the filesystem to fill the partition.
For example, if /dev/sdd3
is a 1TB partition, and we were to run:
# mke2fs /dev/sdd3 500G
We will have a 500GB partition within a 1TB partition. If we then resize2fs /dev/sdd3
, it will be expanded to the full 1TB.
answered Feb 21 at 17:41
DopeGhotiDopeGhoti
46.3k56089
46.3k56089
add a comment |
add a comment |
The size of a filesystem is by default the size of its underlying partition.
Usually, yes. There's little point in creating a filesystem smaller than the available space on the partition.
But if you're trying to enlarge the filesystem, you'll first have to enlarge the device it's on. For the usual fixed partitions, that's not often possible (you'd need to have available space after the partition itself), but with something like LVM it's trivial, since you can just resize the logical volume at will.
After resizing the partition/volume, the filesystem only makes use of the originally available space, and at that point resize2fs
is necessary. Again, you'll usually want to resize the partition to the fill all the now available space, so the default action is what you want.
add a comment |
The size of a filesystem is by default the size of its underlying partition.
Usually, yes. There's little point in creating a filesystem smaller than the available space on the partition.
But if you're trying to enlarge the filesystem, you'll first have to enlarge the device it's on. For the usual fixed partitions, that's not often possible (you'd need to have available space after the partition itself), but with something like LVM it's trivial, since you can just resize the logical volume at will.
After resizing the partition/volume, the filesystem only makes use of the originally available space, and at that point resize2fs
is necessary. Again, you'll usually want to resize the partition to the fill all the now available space, so the default action is what you want.
add a comment |
The size of a filesystem is by default the size of its underlying partition.
Usually, yes. There's little point in creating a filesystem smaller than the available space on the partition.
But if you're trying to enlarge the filesystem, you'll first have to enlarge the device it's on. For the usual fixed partitions, that's not often possible (you'd need to have available space after the partition itself), but with something like LVM it's trivial, since you can just resize the logical volume at will.
After resizing the partition/volume, the filesystem only makes use of the originally available space, and at that point resize2fs
is necessary. Again, you'll usually want to resize the partition to the fill all the now available space, so the default action is what you want.
The size of a filesystem is by default the size of its underlying partition.
Usually, yes. There's little point in creating a filesystem smaller than the available space on the partition.
But if you're trying to enlarge the filesystem, you'll first have to enlarge the device it's on. For the usual fixed partitions, that's not often possible (you'd need to have available space after the partition itself), but with something like LVM it's trivial, since you can just resize the logical volume at will.
After resizing the partition/volume, the filesystem only makes use of the originally available space, and at that point resize2fs
is necessary. Again, you'll usually want to resize the partition to the fill all the now available space, so the default action is what you want.
answered Feb 21 at 18:07
ilkkachuilkkachu
61.6k10101177
61.6k10101177
add a comment |
add a comment |
I also often (ab)use resize2fs
in some smallish/skeletal VMs for not to have to setup LVM.
For extending a drive/partition, I can provisioning/extend a virtual physical hard disk, and then delete and create a new bigger partition. Once I do that, I can extend the partition to the new "physical" space. (for instance, in vmware, I just edit an existing virtual disk, and edit it to be 10GB instead of 5GB...)
Or even in a physical disk, you can delete a second partition, delete the 1st one and recreate it using the former space of the two partitions, and then use resizefs
for having a single partition where once you had two partitions.
So, resize2fs
does something even without using LVM.
add a comment |
I also often (ab)use resize2fs
in some smallish/skeletal VMs for not to have to setup LVM.
For extending a drive/partition, I can provisioning/extend a virtual physical hard disk, and then delete and create a new bigger partition. Once I do that, I can extend the partition to the new "physical" space. (for instance, in vmware, I just edit an existing virtual disk, and edit it to be 10GB instead of 5GB...)
Or even in a physical disk, you can delete a second partition, delete the 1st one and recreate it using the former space of the two partitions, and then use resizefs
for having a single partition where once you had two partitions.
So, resize2fs
does something even without using LVM.
add a comment |
I also often (ab)use resize2fs
in some smallish/skeletal VMs for not to have to setup LVM.
For extending a drive/partition, I can provisioning/extend a virtual physical hard disk, and then delete and create a new bigger partition. Once I do that, I can extend the partition to the new "physical" space. (for instance, in vmware, I just edit an existing virtual disk, and edit it to be 10GB instead of 5GB...)
Or even in a physical disk, you can delete a second partition, delete the 1st one and recreate it using the former space of the two partitions, and then use resizefs
for having a single partition where once you had two partitions.
So, resize2fs
does something even without using LVM.
I also often (ab)use resize2fs
in some smallish/skeletal VMs for not to have to setup LVM.
For extending a drive/partition, I can provisioning/extend a virtual physical hard disk, and then delete and create a new bigger partition. Once I do that, I can extend the partition to the new "physical" space. (for instance, in vmware, I just edit an existing virtual disk, and edit it to be 10GB instead of 5GB...)
Or even in a physical disk, you can delete a second partition, delete the 1st one and recreate it using the former space of the two partitions, and then use resizefs
for having a single partition where once you had two partitions.
So, resize2fs
does something even without using LVM.
edited Feb 21 at 20:38
answered Feb 21 at 19:58
Rui F RibeiroRui F Ribeiro
41.5k1483141
41.5k1483141
add a comment |
add a comment |
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.
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%2funix.stackexchange.com%2fquestions%2f502136%2fdoes-resize2fs-by-default-do-nothing%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