I setup default Fedora partitioning with LVM. Now, I would like to shrink my partition to create 1 new partition. Could you please help me understand why I am getting such error?
[root@host]# lvm pvresize /dev/sda2 --setphysicalvolumesize 60G
/dev/sda2: cannot resize to 1919 extents as 22340 are allocated.
0 physical volume(s) resized / 1 physical volume(s) not resized
Some details on my partitioning:
[root@host]# lvm pvs
PV VG Fmt Attr PSize PFree
/dev/sda2 vg_andrew lvm2 a-- 698.12g 0
[root@host]# pvs --segments
PV VG Fmt Attr PSize PFree Start SSize
/dev/sda2 vg_andrew lvm2 a-- 698.12g 0 0 310
/dev/sda2 vg_andrew lvm2 a-- 698.12g 0 310 20430
/dev/sda2 vg_andrew lvm2 a-- 698.12g 0 20740 1600
[root@host]# df -h
Filesystem Size Used Avail Use% Mounted on
rootfs 50G 6.5G 43G 14% /
devtmpfs 3.9G 0 3.9G 0% /dev
tmpfs 3.9G 816K 3.9G 1% /dev/shm
tmpfs 3.9G 1.1M 3.9G 1% /run
/dev/mapper/vg_andrew-lv_root 50G 6.5G 43G 14% /
tmpfs 3.9G 0 3.9G 0% /sys/fs/cgroup
tmpfs 3.9G 0 3.9G 0% /media
/dev/sda1 485M 96M 364M 21% /boot
/dev/mapper/vg_andrew-lv_home 629G 53G 545G 9% /home
Sorry if the answer is obvious, I am new to LVM. Thank you for your help.