0

We have rhel server 7.2 version ( VM machine ) with sdd disk

sdd disk have parted partition sdd1 , and our goal is to increase the sdd1 partition to 10g from current 1K size

From

lsblk

sdd                  8:48   0   20G  0 disk
└─sdd1               8:49   0    1K  0 part

so we expect to achieve sdd1 to became 10g

We did the following examples but without good results

parted /dev/sdd
GNU Parted 3.1
Using /dev/sdd
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) resizepart
Partition number? 1
End?  [21.5GB]? 100%
(parted) q
Information: You may need to update /etc/fstab.


parted /dev/sdd
GNU Parted 3.1
Using /dev/sdd
Welcome to GNU Parted! Type 'help' to view a list of commands.
 (parted) resizepart
Partition number? 1
End?  [21.5GB]?

we even installed the growpart command

growpart /dev/sdd 1
NOCHANGE: partition 1 could only be grown by -33 [fudge=2048]

Expected results ( from lsblk )

Any advice how to increase the sdd1 to 10g ?

s

dd                  8:48   0   20G  0 disk
└─sdd1               8:49   0    10G  0 part
1
  • Why not delete the partition and re-create it bigger?
    – harrymc
    Jul 12, 2021 at 19:08

1 Answer 1

0

Your requirement, "to increase the sdd1 partition to 10g from current 1K size"

Your first example successfully increased the /dev/sdd1 partition from 1K to 20GB (100% of the disk). The others all failed because the disk partition was already resized.

Now, since you actually wanted to resize the partition to 10G instead of the full 20GB disk we need to reduce the partition. You can safely do this because you have (apparently) not yet told any other part of the system that you resized it.

IF YOU HAVE ALREADY RESIZED YOUR FILESYSTEM DO NOT CONTINUE BEYOND HERE

parted /dev/sdd resizepart 1 10G
Warning: Shrinking a partition can cause data loss, are you sure you want to continue?
Yes/No? yes
Information: You may need to update /etc/fstab.

That has now successfully shrunk the partition back to 10GB, as required.

However, you have not yet increased the filesystem to fill the space. This is filesystem-dependent, and since you have not specified the filesystem type it's not possible to give the corresponding method for resizing it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.