Ask Your Question

Is it possible to "add" more room to a hard drive partition?

asked 2014-10-06 08:51:51 -0500

jflory7 gravatar image

updated 2014-10-06 11:16:52 -0500

mether gravatar image

I'm currently using Fedora 20 x86_64 on a 10GB encrypted partition on this computer, and I was hoping to add some more room to the partition. I have 20GB of unallocated space on the computer at the moment.

I'm looking throuigh GParted and there doesn't seem to be an abundantly clear way to do this. If there is a method to do this without losing any data, that would be preferred. Thanks!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2014-10-06 09:29:59 -0500

swilson gravatar image

Did something similar some time ago:

Installed Fedora 16 into 10GB KVM guest. Copied kvm img file to laptop with 110GB drive. Install created with 1MB BIOS boot partition, 500MB Grub boot (/boot) partition, 2GB encrypted swap partition and 10GB encrypted root (/) partition. Increased root partition with the following steps after install and 'yum update'.

  • Booted livecd (Parted Magic, SystemRescueCD, etc).
  • Used 'parted' to print partition table info. Noted Start location.
  • Used 'parted' to delete partition. Ex. rm 4
  • Used 'parted' to recreate partition. Set start to noted start location. Ex. 'mkpart 4 100%'
  • Restarted system.
  • Booted livecd again.
  • Opened crypt with cryptsetup (cryptsetup luksOpen ). Crypt opened at /dev/mapper/ . Ex. 'cryptsetup luksOpen /dev/sda4 sda4'
  • Resized crypt with cryptsetup (cryptsetup resize ). Crypt resized to 100% of partition space. Ex. 'cryptsetup resize sda4'
  • Mounted BTRFS Filesystem (mount ). Ex.'mount /dev/mapper/sda4 /mnt/sda4'
  • Resized BTRFS Filesystem (btrfs filesystem resize max ). Filesystem grew to size of crypt. Ex. 'btrfs filesystem resize max /mnt/sda4'
  • Unmounted BTRFS Filesystem(umount ). Ex. 'umount /mnt/sda4'
  • Closed crypt (cryptsetup luksClose ). Ex. 'cryptsetup luksClose sda4'
  • Restarted system

The BTRFS partition resized to 100% of the free space.

edit flag offensive delete link more


Did you delete the initial partition in Step #3?

jflory7 gravatar imagejflory7 ( 2014-10-06 19:03:21 -0500 )edit

Yes. I was a little worried at first but deleting the partition does not delete the data, it just deletes the boundaries of the partition. The key is to make sure you recreate the partition with the same starting point and set the end point further than the previous end point, thus increasing the size of the partition.

swilson gravatar imageswilson ( 2014-10-09 09:01:07 -0500 )edit

Question Tools

1 follower


Asked: 2014-10-06 08:51:51 -0500

Seen: 275 times

Last updated: Oct 06 '14