View Full Version : resize partition using parted failed

29th March 2006, 10:24 AM

I want to create an empty partition on my disk by shrinking an existing partition, I knew that "parted" has a function resize, which allows me to do this, however I found that, the file system for the root partition, which is numbered as 2, can not be detected, the resize also failed, does any one has any idea what is going on? the system works ok, i expected that the file system is ext3, but it is not detected.

These are the error messages:

(parted) print
Disk geometry for /dev/hda: 0kB - 160GB
Disk label type: msdos
Number Start End Size Type File system Flags
1 32kB 107MB 107MB primary ext3 boot
2 107MB 160GB 160GB primary lvm

(parted) resize 2 107MB 80GB
Error: Could not detect file system.


29th March 2006, 10:39 AM
I'm curious why you would want to shrink partition 2. By your output, partition 2 appears to be managed by lvm. If you want a new partition, why don't you simply create a new logical volume in the volume group. That is the very purpose of using lvm: to dynamically create, remove, and resize partitions.

29th March 2006, 10:40 AM
I did not know much about lvm, how do i use it actually? please advise, thanks

29th March 2006, 10:45 AM
the reason why i want to create a physical partition is that, i want to put /home at that partition, in order not to touch that partition during future fresh installation

29th March 2006, 11:06 AM
this link will get you started on using lvm:


Also, the reason parted could not detect the filsystem is because partition 2 is not actually a filesystem. Rather, it is a volume group. The filesystems reside inside the volume group as logical volumes. Unfortunatey, I do not believe you can shrink a volume group. To get /home on a separate static partition, you will need to start over.