using parted to resize partitions using free space in the end of the disk

Clash Royale CLAN TAG#URR8PPP
up vote
1
down vote
favorite
I have RH6 wtith GPT disk, which is partitioned as following:
parted /dev/sdb print free
Model: IBM ServeRAID M5110e (scsi)
Disk /dev/sdb: 4599GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Number Start End Size File system Name Flags
17.4kB 1049kB 1031kB Free Space
1 1049kB 2199GB 2199GB ext4
2 2199GB 2843GB 644GB ext4
3 2843GB 3165GB 322GB ext4
4 3165GB 3488GB 322GB ext4
3488GB 4599GB 1111GB Free Space
I want to resize 2 and 3 partitions using 'Free Space' at the end of the block device. These partitions currently unmounted .
What is the most proper way to complete the task ?
It is not completely clear in manual of parted, as in 'resize' section it gives examples to resize partition with no other partitions present.
This is production critical server and no place for mistake here.
linux rhel command gpt parted
add a comment |Â
up vote
1
down vote
favorite
I have RH6 wtith GPT disk, which is partitioned as following:
parted /dev/sdb print free
Model: IBM ServeRAID M5110e (scsi)
Disk /dev/sdb: 4599GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Number Start End Size File system Name Flags
17.4kB 1049kB 1031kB Free Space
1 1049kB 2199GB 2199GB ext4
2 2199GB 2843GB 644GB ext4
3 2843GB 3165GB 322GB ext4
4 3165GB 3488GB 322GB ext4
3488GB 4599GB 1111GB Free Space
I want to resize 2 and 3 partitions using 'Free Space' at the end of the block device. These partitions currently unmounted .
What is the most proper way to complete the task ?
It is not completely clear in manual of parted, as in 'resize' section it gives examples to resize partition with no other partitions present.
This is production critical server and no place for mistake here.
linux rhel command gpt parted
You cannot. You can only resize partition 4.
â NickD
Oct 30 '17 at 13:21
A.B. This is what I`ve done exactly and now it is looks good. Also i have increased the size of partitions ( all, but / ) by tune2fs -m 1 /dev/sdX
â nix-power
Oct 30 '17 at 15:20
parted can resize partition only in case free space is located directly at the end after the partition in current case the only possible and correct way, is to create brand new partition in free space at the end of the disk, then move all data from partition 3 to to the newly created one, then remove partition 3, and only then resize partition 2 (partition + resize2fs) to whole space created from partition 2 deletion. There is also the way to move 3 partition to the end of disk ( and then resizing it) but it will take more time and more dangerous operation, generally
â nix-power
Nov 2 '17 at 9:35
add a comment |Â
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I have RH6 wtith GPT disk, which is partitioned as following:
parted /dev/sdb print free
Model: IBM ServeRAID M5110e (scsi)
Disk /dev/sdb: 4599GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Number Start End Size File system Name Flags
17.4kB 1049kB 1031kB Free Space
1 1049kB 2199GB 2199GB ext4
2 2199GB 2843GB 644GB ext4
3 2843GB 3165GB 322GB ext4
4 3165GB 3488GB 322GB ext4
3488GB 4599GB 1111GB Free Space
I want to resize 2 and 3 partitions using 'Free Space' at the end of the block device. These partitions currently unmounted .
What is the most proper way to complete the task ?
It is not completely clear in manual of parted, as in 'resize' section it gives examples to resize partition with no other partitions present.
This is production critical server and no place for mistake here.
linux rhel command gpt parted
I have RH6 wtith GPT disk, which is partitioned as following:
parted /dev/sdb print free
Model: IBM ServeRAID M5110e (scsi)
Disk /dev/sdb: 4599GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Number Start End Size File system Name Flags
17.4kB 1049kB 1031kB Free Space
1 1049kB 2199GB 2199GB ext4
2 2199GB 2843GB 644GB ext4
3 2843GB 3165GB 322GB ext4
4 3165GB 3488GB 322GB ext4
3488GB 4599GB 1111GB Free Space
I want to resize 2 and 3 partitions using 'Free Space' at the end of the block device. These partitions currently unmounted .
What is the most proper way to complete the task ?
It is not completely clear in manual of parted, as in 'resize' section it gives examples to resize partition with no other partitions present.
This is production critical server and no place for mistake here.
linux rhel command gpt parted
asked Oct 30 '17 at 12:45
nix-power
365
365
You cannot. You can only resize partition 4.
â NickD
Oct 30 '17 at 13:21
A.B. This is what I`ve done exactly and now it is looks good. Also i have increased the size of partitions ( all, but / ) by tune2fs -m 1 /dev/sdX
â nix-power
Oct 30 '17 at 15:20
parted can resize partition only in case free space is located directly at the end after the partition in current case the only possible and correct way, is to create brand new partition in free space at the end of the disk, then move all data from partition 3 to to the newly created one, then remove partition 3, and only then resize partition 2 (partition + resize2fs) to whole space created from partition 2 deletion. There is also the way to move 3 partition to the end of disk ( and then resizing it) but it will take more time and more dangerous operation, generally
â nix-power
Nov 2 '17 at 9:35
add a comment |Â
You cannot. You can only resize partition 4.
â NickD
Oct 30 '17 at 13:21
A.B. This is what I`ve done exactly and now it is looks good. Also i have increased the size of partitions ( all, but / ) by tune2fs -m 1 /dev/sdX
â nix-power
Oct 30 '17 at 15:20
parted can resize partition only in case free space is located directly at the end after the partition in current case the only possible and correct way, is to create brand new partition in free space at the end of the disk, then move all data from partition 3 to to the newly created one, then remove partition 3, and only then resize partition 2 (partition + resize2fs) to whole space created from partition 2 deletion. There is also the way to move 3 partition to the end of disk ( and then resizing it) but it will take more time and more dangerous operation, generally
â nix-power
Nov 2 '17 at 9:35
You cannot. You can only resize partition 4.
â NickD
Oct 30 '17 at 13:21
You cannot. You can only resize partition 4.
â NickD
Oct 30 '17 at 13:21
A.B. This is what I`ve done exactly and now it is looks good. Also i have increased the size of partitions ( all, but / ) by tune2fs -m 1 /dev/sdX
â nix-power
Oct 30 '17 at 15:20
A.B. This is what I`ve done exactly and now it is looks good. Also i have increased the size of partitions ( all, but / ) by tune2fs -m 1 /dev/sdX
â nix-power
Oct 30 '17 at 15:20
parted can resize partition only in case free space is located directly at the end after the partition in current case the only possible and correct way, is to create brand new partition in free space at the end of the disk, then move all data from partition 3 to to the newly created one, then remove partition 3, and only then resize partition 2 (partition + resize2fs) to whole space created from partition 2 deletion. There is also the way to move 3 partition to the end of disk ( and then resizing it) but it will take more time and more dangerous operation, generally
â nix-power
Nov 2 '17 at 9:35
parted can resize partition only in case free space is located directly at the end after the partition in current case the only possible and correct way, is to create brand new partition in free space at the end of the disk, then move all data from partition 3 to to the newly created one, then remove partition 3, and only then resize partition 2 (partition + resize2fs) to whole space created from partition 2 deletion. There is also the way to move 3 partition to the end of disk ( and then resizing it) but it will take more time and more dangerous operation, generally
â nix-power
Nov 2 '17 at 9:35
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
1
down vote
You can't create a partition that is not contiguous directly on GPT, MBR or pretty much any partition table.
To use the disk with more freedom the most common solution is using an LVM as a single partition over the table and then creating your actual partitions over the lvm, but still you won't be able to just do that with parted. You pretty much would need to recreate all partitions.
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
You can't create a partition that is not contiguous directly on GPT, MBR or pretty much any partition table.
To use the disk with more freedom the most common solution is using an LVM as a single partition over the table and then creating your actual partitions over the lvm, but still you won't be able to just do that with parted. You pretty much would need to recreate all partitions.
add a comment |Â
up vote
1
down vote
You can't create a partition that is not contiguous directly on GPT, MBR or pretty much any partition table.
To use the disk with more freedom the most common solution is using an LVM as a single partition over the table and then creating your actual partitions over the lvm, but still you won't be able to just do that with parted. You pretty much would need to recreate all partitions.
add a comment |Â
up vote
1
down vote
up vote
1
down vote
You can't create a partition that is not contiguous directly on GPT, MBR or pretty much any partition table.
To use the disk with more freedom the most common solution is using an LVM as a single partition over the table and then creating your actual partitions over the lvm, but still you won't be able to just do that with parted. You pretty much would need to recreate all partitions.
You can't create a partition that is not contiguous directly on GPT, MBR or pretty much any partition table.
To use the disk with more freedom the most common solution is using an LVM as a single partition over the table and then creating your actual partitions over the lvm, but still you won't be able to just do that with parted. You pretty much would need to recreate all partitions.
answered Nov 1 '17 at 1:37
Zip
51118
51118
add a comment |Â
add a comment |Â
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
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f401403%2fusing-parted-to-resize-partitions-using-free-space-in-the-end-of-the-disk%23new-answer', 'question_page');
);
Post as a guest
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
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
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
You cannot. You can only resize partition 4.
â NickD
Oct 30 '17 at 13:21
A.B. This is what I`ve done exactly and now it is looks good. Also i have increased the size of partitions ( all, but / ) by tune2fs -m 1 /dev/sdX
â nix-power
Oct 30 '17 at 15:20
parted can resize partition only in case free space is located directly at the end after the partition in current case the only possible and correct way, is to create brand new partition in free space at the end of the disk, then move all data from partition 3 to to the newly created one, then remove partition 3, and only then resize partition 2 (partition + resize2fs) to whole space created from partition 2 deletion. There is also the way to move 3 partition to the end of disk ( and then resizing it) but it will take more time and more dangerous operation, generally
â nix-power
Nov 2 '17 at 9:35