Does parted have the same functionality as gparted for shrinking an ext4 partition?

Clash Royale CLAN TAG#URR8PPP
I've been Googling about, and it seems the answer is 'no' from anecdotal reports for gparted. However does this apply to parted as well?
I'm not talking about risk factors here involved by inputting the wrong partition, fat fingering a button, power cuts etc - I mean direct effects only.
How does parted know how much 'space' is available? I just see the following output:
GNU Parted 3.2
Using /dev/sdd
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) p
Model: ATA OCZ-VERTEX3 (scsi)
Disk /dev/sdd: 60.0GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:
Number Start End Size Type File system Flags
1 1049kB 316MB 315MB primary ext4
2 316MB 60.0GB 59.7GB primary ext4
While on gparted I see the following (It's showing up with this drive as /dev/sde after a reboot):

It has some functionality to prevent me from 'resizing' the partition to small (and hence prevent data loss - I assume).
partition ext4 parted
add a comment |
I've been Googling about, and it seems the answer is 'no' from anecdotal reports for gparted. However does this apply to parted as well?
I'm not talking about risk factors here involved by inputting the wrong partition, fat fingering a button, power cuts etc - I mean direct effects only.
How does parted know how much 'space' is available? I just see the following output:
GNU Parted 3.2
Using /dev/sdd
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) p
Model: ATA OCZ-VERTEX3 (scsi)
Disk /dev/sdd: 60.0GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:
Number Start End Size Type File system Flags
1 1049kB 316MB 315MB primary ext4
2 316MB 60.0GB 59.7GB primary ext4
While on gparted I see the following (It's showing up with this drive as /dev/sde after a reboot):

It has some functionality to prevent me from 'resizing' the partition to small (and hence prevent data loss - I assume).
partition ext4 parted
Do you expect an answer to parted's implementation of the shrinking process specifically or a general explanation regarding ext?
– Hermann
Feb 4 at 19:32
Your question is too vague to give a definitive answer.. However, it is always possible to lose data at the filesystem metalayer using partitioning utilities.
– fpmurphy
Feb 4 at 19:37
@Hermann I was expecting an answer toparted's implementation.
– Chris Stryczynski
Feb 4 at 20:28
add a comment |
I've been Googling about, and it seems the answer is 'no' from anecdotal reports for gparted. However does this apply to parted as well?
I'm not talking about risk factors here involved by inputting the wrong partition, fat fingering a button, power cuts etc - I mean direct effects only.
How does parted know how much 'space' is available? I just see the following output:
GNU Parted 3.2
Using /dev/sdd
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) p
Model: ATA OCZ-VERTEX3 (scsi)
Disk /dev/sdd: 60.0GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:
Number Start End Size Type File system Flags
1 1049kB 316MB 315MB primary ext4
2 316MB 60.0GB 59.7GB primary ext4
While on gparted I see the following (It's showing up with this drive as /dev/sde after a reboot):

It has some functionality to prevent me from 'resizing' the partition to small (and hence prevent data loss - I assume).
partition ext4 parted
I've been Googling about, and it seems the answer is 'no' from anecdotal reports for gparted. However does this apply to parted as well?
I'm not talking about risk factors here involved by inputting the wrong partition, fat fingering a button, power cuts etc - I mean direct effects only.
How does parted know how much 'space' is available? I just see the following output:
GNU Parted 3.2
Using /dev/sdd
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) p
Model: ATA OCZ-VERTEX3 (scsi)
Disk /dev/sdd: 60.0GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:
Number Start End Size Type File system Flags
1 1049kB 316MB 315MB primary ext4
2 316MB 60.0GB 59.7GB primary ext4
While on gparted I see the following (It's showing up with this drive as /dev/sde after a reboot):

It has some functionality to prevent me from 'resizing' the partition to small (and hence prevent data loss - I assume).
partition ext4 parted
partition ext4 parted
edited Feb 8 at 3:17
Rui F Ribeiro
40.5k1479137
40.5k1479137
asked Feb 4 at 18:53
Chris StryczynskiChris Stryczynski
614619
614619
Do you expect an answer to parted's implementation of the shrinking process specifically or a general explanation regarding ext?
– Hermann
Feb 4 at 19:32
Your question is too vague to give a definitive answer.. However, it is always possible to lose data at the filesystem metalayer using partitioning utilities.
– fpmurphy
Feb 4 at 19:37
@Hermann I was expecting an answer toparted's implementation.
– Chris Stryczynski
Feb 4 at 20:28
add a comment |
Do you expect an answer to parted's implementation of the shrinking process specifically or a general explanation regarding ext?
– Hermann
Feb 4 at 19:32
Your question is too vague to give a definitive answer.. However, it is always possible to lose data at the filesystem metalayer using partitioning utilities.
– fpmurphy
Feb 4 at 19:37
@Hermann I was expecting an answer toparted's implementation.
– Chris Stryczynski
Feb 4 at 20:28
Do you expect an answer to parted's implementation of the shrinking process specifically or a general explanation regarding ext?
– Hermann
Feb 4 at 19:32
Do you expect an answer to parted's implementation of the shrinking process specifically or a general explanation regarding ext?
– Hermann
Feb 4 at 19:32
Your question is too vague to give a definitive answer.. However, it is always possible to lose data at the filesystem metalayer using partitioning utilities.
– fpmurphy
Feb 4 at 19:37
Your question is too vague to give a definitive answer.. However, it is always possible to lose data at the filesystem metalayer using partitioning utilities.
– fpmurphy
Feb 4 at 19:37
@Hermann I was expecting an answer to
parted's implementation.– Chris Stryczynski
Feb 4 at 20:28
@Hermann I was expecting an answer to
parted's implementation.– Chris Stryczynski
Feb 4 at 20:28
add a comment |
1 Answer
1
active
oldest
votes
gparted and parted may have similar names but they do (very) different things. gparted is a standalone software with a distinct set of features and explicitely not (just) a GUI frontend to parted, even though it's labelled as such in many places.
How does parted know how much 'space' is available?
parted does not know nor care (anymore) in the least about your filesystems. It might display the filesystem type for convenience and orientation of the user only, but there is no filesystem related functionality.
When you grow a partition in parted, the filesystem does not grow along with it. You have to do this yourself. (e.g. resize2fs after growing the partition).
When you shrink a partition in parted, you have to make sure beforehand that the filesystem will not take offense. (e.g. resize2fs before shrinking the partition).
If you want to move a partition to a different start sector, then parted does nothing to help you with the relocation logic whatsoever. (if you REALLY know what you're doing, you could do this manually, but you probably shouldn't).
Is it possible to lose data with any of these? Yes, of course.
You should always have a backup.
gnu.org/software/parted/manual/html_node/parted_32.html#SEC31 "Example: Resizing an ext2 partition on a crowded disk."
– sourcejedi
Feb 4 at 22:25
Yes, that was removed years ago in parted 3.0(?), and the manual is from 2002... you can, of course if you insist, use an old version of parted, I have done so before unix.stackexchange.com/a/373067/30851 and people complain in the comments "not so fast". However even in the old version that functionality is limited and sometimes buggy. It's not what gparted does.
– frostschutz
Feb 4 at 22:28
@frotzschutz thanks, I was hoping you'd offer a citation like that. It is confusing that the official site for parted only has the old out-of-date doc :-). Even just the fact that it shows the names of the different commands in parted is helpful IMO (resizepart, v.s. theresizecommand that has now been removed).
– sourcejedi
Feb 4 at 22:32
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%2f498655%2fdoes-parted-have-the-same-functionality-as-gparted-for-shrinking-an-ext4-partiti%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
gparted and parted may have similar names but they do (very) different things. gparted is a standalone software with a distinct set of features and explicitely not (just) a GUI frontend to parted, even though it's labelled as such in many places.
How does parted know how much 'space' is available?
parted does not know nor care (anymore) in the least about your filesystems. It might display the filesystem type for convenience and orientation of the user only, but there is no filesystem related functionality.
When you grow a partition in parted, the filesystem does not grow along with it. You have to do this yourself. (e.g. resize2fs after growing the partition).
When you shrink a partition in parted, you have to make sure beforehand that the filesystem will not take offense. (e.g. resize2fs before shrinking the partition).
If you want to move a partition to a different start sector, then parted does nothing to help you with the relocation logic whatsoever. (if you REALLY know what you're doing, you could do this manually, but you probably shouldn't).
Is it possible to lose data with any of these? Yes, of course.
You should always have a backup.
gnu.org/software/parted/manual/html_node/parted_32.html#SEC31 "Example: Resizing an ext2 partition on a crowded disk."
– sourcejedi
Feb 4 at 22:25
Yes, that was removed years ago in parted 3.0(?), and the manual is from 2002... you can, of course if you insist, use an old version of parted, I have done so before unix.stackexchange.com/a/373067/30851 and people complain in the comments "not so fast". However even in the old version that functionality is limited and sometimes buggy. It's not what gparted does.
– frostschutz
Feb 4 at 22:28
@frotzschutz thanks, I was hoping you'd offer a citation like that. It is confusing that the official site for parted only has the old out-of-date doc :-). Even just the fact that it shows the names of the different commands in parted is helpful IMO (resizepart, v.s. theresizecommand that has now been removed).
– sourcejedi
Feb 4 at 22:32
add a comment |
gparted and parted may have similar names but they do (very) different things. gparted is a standalone software with a distinct set of features and explicitely not (just) a GUI frontend to parted, even though it's labelled as such in many places.
How does parted know how much 'space' is available?
parted does not know nor care (anymore) in the least about your filesystems. It might display the filesystem type for convenience and orientation of the user only, but there is no filesystem related functionality.
When you grow a partition in parted, the filesystem does not grow along with it. You have to do this yourself. (e.g. resize2fs after growing the partition).
When you shrink a partition in parted, you have to make sure beforehand that the filesystem will not take offense. (e.g. resize2fs before shrinking the partition).
If you want to move a partition to a different start sector, then parted does nothing to help you with the relocation logic whatsoever. (if you REALLY know what you're doing, you could do this manually, but you probably shouldn't).
Is it possible to lose data with any of these? Yes, of course.
You should always have a backup.
gnu.org/software/parted/manual/html_node/parted_32.html#SEC31 "Example: Resizing an ext2 partition on a crowded disk."
– sourcejedi
Feb 4 at 22:25
Yes, that was removed years ago in parted 3.0(?), and the manual is from 2002... you can, of course if you insist, use an old version of parted, I have done so before unix.stackexchange.com/a/373067/30851 and people complain in the comments "not so fast". However even in the old version that functionality is limited and sometimes buggy. It's not what gparted does.
– frostschutz
Feb 4 at 22:28
@frotzschutz thanks, I was hoping you'd offer a citation like that. It is confusing that the official site for parted only has the old out-of-date doc :-). Even just the fact that it shows the names of the different commands in parted is helpful IMO (resizepart, v.s. theresizecommand that has now been removed).
– sourcejedi
Feb 4 at 22:32
add a comment |
gparted and parted may have similar names but they do (very) different things. gparted is a standalone software with a distinct set of features and explicitely not (just) a GUI frontend to parted, even though it's labelled as such in many places.
How does parted know how much 'space' is available?
parted does not know nor care (anymore) in the least about your filesystems. It might display the filesystem type for convenience and orientation of the user only, but there is no filesystem related functionality.
When you grow a partition in parted, the filesystem does not grow along with it. You have to do this yourself. (e.g. resize2fs after growing the partition).
When you shrink a partition in parted, you have to make sure beforehand that the filesystem will not take offense. (e.g. resize2fs before shrinking the partition).
If you want to move a partition to a different start sector, then parted does nothing to help you with the relocation logic whatsoever. (if you REALLY know what you're doing, you could do this manually, but you probably shouldn't).
Is it possible to lose data with any of these? Yes, of course.
You should always have a backup.
gparted and parted may have similar names but they do (very) different things. gparted is a standalone software with a distinct set of features and explicitely not (just) a GUI frontend to parted, even though it's labelled as such in many places.
How does parted know how much 'space' is available?
parted does not know nor care (anymore) in the least about your filesystems. It might display the filesystem type for convenience and orientation of the user only, but there is no filesystem related functionality.
When you grow a partition in parted, the filesystem does not grow along with it. You have to do this yourself. (e.g. resize2fs after growing the partition).
When you shrink a partition in parted, you have to make sure beforehand that the filesystem will not take offense. (e.g. resize2fs before shrinking the partition).
If you want to move a partition to a different start sector, then parted does nothing to help you with the relocation logic whatsoever. (if you REALLY know what you're doing, you could do this manually, but you probably shouldn't).
Is it possible to lose data with any of these? Yes, of course.
You should always have a backup.
answered Feb 4 at 19:37
frostschutzfrostschutz
27.2k15584
27.2k15584
gnu.org/software/parted/manual/html_node/parted_32.html#SEC31 "Example: Resizing an ext2 partition on a crowded disk."
– sourcejedi
Feb 4 at 22:25
Yes, that was removed years ago in parted 3.0(?), and the manual is from 2002... you can, of course if you insist, use an old version of parted, I have done so before unix.stackexchange.com/a/373067/30851 and people complain in the comments "not so fast". However even in the old version that functionality is limited and sometimes buggy. It's not what gparted does.
– frostschutz
Feb 4 at 22:28
@frotzschutz thanks, I was hoping you'd offer a citation like that. It is confusing that the official site for parted only has the old out-of-date doc :-). Even just the fact that it shows the names of the different commands in parted is helpful IMO (resizepart, v.s. theresizecommand that has now been removed).
– sourcejedi
Feb 4 at 22:32
add a comment |
gnu.org/software/parted/manual/html_node/parted_32.html#SEC31 "Example: Resizing an ext2 partition on a crowded disk."
– sourcejedi
Feb 4 at 22:25
Yes, that was removed years ago in parted 3.0(?), and the manual is from 2002... you can, of course if you insist, use an old version of parted, I have done so before unix.stackexchange.com/a/373067/30851 and people complain in the comments "not so fast". However even in the old version that functionality is limited and sometimes buggy. It's not what gparted does.
– frostschutz
Feb 4 at 22:28
@frotzschutz thanks, I was hoping you'd offer a citation like that. It is confusing that the official site for parted only has the old out-of-date doc :-). Even just the fact that it shows the names of the different commands in parted is helpful IMO (resizepart, v.s. theresizecommand that has now been removed).
– sourcejedi
Feb 4 at 22:32
gnu.org/software/parted/manual/html_node/parted_32.html#SEC31 "Example: Resizing an ext2 partition on a crowded disk."
– sourcejedi
Feb 4 at 22:25
gnu.org/software/parted/manual/html_node/parted_32.html#SEC31 "Example: Resizing an ext2 partition on a crowded disk."
– sourcejedi
Feb 4 at 22:25
Yes, that was removed years ago in parted 3.0(?), and the manual is from 2002... you can, of course if you insist, use an old version of parted, I have done so before unix.stackexchange.com/a/373067/30851 and people complain in the comments "not so fast". However even in the old version that functionality is limited and sometimes buggy. It's not what gparted does.
– frostschutz
Feb 4 at 22:28
Yes, that was removed years ago in parted 3.0(?), and the manual is from 2002... you can, of course if you insist, use an old version of parted, I have done so before unix.stackexchange.com/a/373067/30851 and people complain in the comments "not so fast". However even in the old version that functionality is limited and sometimes buggy. It's not what gparted does.
– frostschutz
Feb 4 at 22:28
@frotzschutz thanks, I was hoping you'd offer a citation like that. It is confusing that the official site for parted only has the old out-of-date doc :-). Even just the fact that it shows the names of the different commands in parted is helpful IMO (
resizepart, v.s. the resize command that has now been removed).– sourcejedi
Feb 4 at 22:32
@frotzschutz thanks, I was hoping you'd offer a citation like that. It is confusing that the official site for parted only has the old out-of-date doc :-). Even just the fact that it shows the names of the different commands in parted is helpful IMO (
resizepart, v.s. the resize command that has now been removed).– sourcejedi
Feb 4 at 22:32
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%2f498655%2fdoes-parted-have-the-same-functionality-as-gparted-for-shrinking-an-ext4-partiti%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
Do you expect an answer to parted's implementation of the shrinking process specifically or a general explanation regarding ext?
– Hermann
Feb 4 at 19:32
Your question is too vague to give a definitive answer.. However, it is always possible to lose data at the filesystem metalayer using partitioning utilities.
– fpmurphy
Feb 4 at 19:37
@Hermann I was expecting an answer to
parted's implementation.– Chris Stryczynski
Feb 4 at 20:28