Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I ran out of space in my on the drive only to find that there was another unformatted partition in the system that is available. I now want to resize the current partition to take in the empty partition without losing data. Any ideas?

share|improve this question
The eternal reminder of how to not lose data... Make a full and complete backup of your existing partiton before you attempt anything of this nature... – Peter.O Feb 8 '11 at 20:59
There are some options, but it would help if you gave us your current partition layout. What is the output of fdisk -l /dev/sda (or whatever your disk's device is called) – jsbillings Feb 8 '11 at 21:00
up vote 3 down vote accepted

boot from live Linux distro (you can use Ubuntu install disk) and use gparted

But always something can go wrong, so it is advisable to make a backup.

The other option is to format the unused partition and mount it and use it (depending on the size) as /home or /usr

share|improve this answer

LVM is the way to go. Turn your whole spindles into PV's and migrate from legacy partition-based model to LVM model. RedHat has some good documentation on LVM, check it out.

share|improve this answer
How does LVM address the issue of not losing data when modifying partitions? – Peter.O Feb 9 '11 at 7:16
@fred.bear: LVM makes it a lot less likely that you'll accidentally delete or overwrite a filesystem, because its basic operations are creating a volume on free space and deleting a volume, rather than creating a volume on whatever was there before. – Gilles Feb 9 '11 at 22:47
@Peter.O That's a very complicated solution even if it's a good pratice to use it. – Kiwy Jan 17 '14 at 12:53

Try this live CD: PartedMagic

share|improve this answer

to find that there was another unformatted partition

Are you sure that this isn't your swap-partition? Beside from that I would recommend LVM as mentioned before by slashdot.

share|improve this answer

I've resized my partition successfully without the loss of any data using the method described here, which generally is about deleting the current partition and creating a new one with the same start and a greater end.

But that is probably not the recommended way, especially when the partition to be resized is in between other partitions, because, in my case I had to remove all my partitions (primary storage and swap) and had to recreate them all.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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