Super User is a question and answer site for computer enthusiasts and power users. 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 used GParted to resize/move a partition on disk. The initial size was 50MB, but I shrunk my C:\ partition in windows, and then moved the start back 50GB

This shows up in parted

Model: ATA TOSHIBA MK5061GS (scsi)
Disk /dev/sda: 500GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start   End     Size    Type      File system  Flags
 1      32.3kB  41.1MB  41.1MB  primary   fat16             
 2      41.9MB  830MB   789MB   primary   ntfs         boot 
 3      830MB   394GB   393GB   primary   ntfs              
 4      394GB   500GB   106GB   extended                    
 5      446GB   447GB   107MB   logical   ext3              
 6      447GB   500GB   53.6GB  logical                lvm  

So you can see that there is no gap between 3 and 4 here, which there would have been if I hadnt moved the partition, and expanded it from 50GB to 100GB.

however, when I do df -h

The logical volume still shows as 50GB (well, 40GB + 10GB swap), so I am not able to use that space.

Filesystem             Size   Used  Avail Use% Mounted on
                        42G    28G    13G  69% /
/dev/sda5              104M    28M    72M  28% /boot
tmpfs                  4.2G      0   4.2G   0% /dev/shm
/dev/sdb1              985G    22G   913G   3% /media/disk

How do I fix this?


share|improve this question
up vote 0 down vote accepted

If you enlarged /dev/sda6, you need to resize the volume group on it afterwards, for LVM to make use of it:

pvresize /dev/sda6

Just run it as root, no need to unmount anything, etc.

After that, you need to resize the logical volume, if you want your root filesystem to take all that new free space:

lvresize --resizefs -l +100%PVS /dev/mapper/VolGroup00-LogVol00

You can tweak -l parameter to specify how much you want your volume to grow, e.g. -l +10G will enlarge it 10GB.

Thanks to --resizefs parameter, the filesystem on this volume will be resized automatically.

share|improve this answer

You may need to run this command on a live system for the kernel to see the changes.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .