Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

After years i decided to upgrade from Fedora 15 to 18, but as per the guidelines only 2 versions can be jumped, so i decided to settle with Fedora 17 and ran preupgrade , all was going fine, till after sometime, it told me that i didnt had any space, so i canceled the initial process, made some space and tried again.

This time- after reboot- when it was copying files, it encountered error(s) on couple of files, for which I had to boot back to terminal an uninstall the terminal.

Eventually the setup completed and post the final boot the kernel 3.6 panic'd - unable to mount VFS

After long tries of different ways, still nothing worked, so I decided to download the Live ISO from their server and install it.

I selected- install on free space - assuming it would overwrite its files, but it didnt and created new partitions.

So, now the whole disk is running out of space

To manage that, I manually deleted the left overs of the old installation,while only keeping the backup.

All set and done, the df -h is showing close to 50% free space in old LVM , but when i open the same in gparted its still showin 99% full.

I ran e2fsck of the dev/Volgroup00/root, it also came clean.

All the partitions are ext4 type.

Please help me in reclaiming this lost space.

share|improve this question
add comment

1 Answer

There are several places you can have "free disk space".

  1. You can have disk space that is not in a partition (unpartitioned space).
  2. You can have an unused partition.
  3. You can have free space in a LVM physical volume. Generally, a LVM physical volume sits on top of a partition.
  4. You can have free space in a filesystem. A filesystem sits on top of a LVM logical volume.

Its trivial to convert between (1) and (2), by creating and deleting partitions (assuming you haven't exceeded the maximum number of partitions, of course). The sum of all of the free space in all the physical volumes in a volume group is the free space in the volume group, so close enough to the same thing for our discussion.

Call the first two the partition level (probably what you're seeing in gparted). Call #3 the VG level (vgs will show this, or vgdisplay, or pvdisplay, etc.). Call #4 the FS level (df shows this).

The key thing is, levels do not see into each other. If you try to make a new partition, it doesn't matter how much free space is in the filesystem on partition 1, you can't use it for partition 2.

This is what it sounds like you've run in to.

You can convert free disk space between levels, but its often non-trivial. For example, you can use resize2fs to shrink a filesystem, and then shrink the logical volume it sits on (converting free space from the FS level to the VG level). You could then shrink one of the LVM PVs and resize the partition, converting free space at the PV level to the partition level. (These operations are all non-trivial, and risk data loss if done wrong).

You can do the reverse by adding a partition, creating a PV on it, adding the PV to the volume group, using lvextend to extend the LV the filesystem sits on, and finally using resize2fs to add that space to the filesystem's free space. (These operations are pretty safe.)

share|improve this answer
add comment

Your Answer

 
discard

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.