Hi. I was running through a fairly routine Gentoo install on a 160G hard disk. My intention was to have two partitions on the disks: one for boot, and one to be an LVM physical volume. In a stroke of absent-mindedness, however, I forgot to create the boot partition and only created the LVM physical volume, and didn't realize it until the end of the installation.
Anyway, I just want to shrink the physical volume partition and add in another partition with fdisk. However, this doesn't seem to be working the way I intend. I ran
livecd dev # pvresize --setphysicalvolumesize 159G /dev/hda1
WARNING: /dev/hda1: Overriding real size. You could lose data.
Physical volume "/dev/hda1" changed
1 physical volume(s) resized / 0 physical volume(s) not resized
But then when I went to fdisk to add the new partition, fdisk just told me that there are no free sectors on the disk. I tried the same command as above, but with 155G instead of 159G, just to see what would happen, but fdisk still acts like there is no extra space.
So, I'm not sure then how to actually resize the partition to get the free space to add another partition.
Here's other terminal output that might be helpful:
livecd dev # fdisk /dev/hda
The number of cylinders for this disk is set to 19457.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Command (m for help): p
Disk /dev/hda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x1549f232
Device Boot Start End Blocks Id System
/dev/hda1 1 19457 156288321 83 Linux
livecd dev # pvscan
/dev/cdrom: open failed: Read-only file system
Attempt to close device '/dev/cdrom' which is not open.
PV /dev/hda1 VG vg0 lvm2 [155.00 GB / 10.00 GB free]
Total: 1 [155.00 GB] / in use: 1 [155.00 GB] / in no VG: 0 [0 ]
livecd dev # lvscan
ACTIVE '/dev/vg0/system' [10.00 GB] inherit
ACTIVE '/dev/vg0/home' [5.00 GB] inherit
ACTIVE '/dev/vg0/scratch' [100.00 GB] inherit
ACTIVE '/dev/vg0/archive' [30.00 GB] inherit