hasenhei n00b
Joined: 23 May 2005 Posts: 17
|
Posted: Tue Apr 10, 2007 1:54 pm Post subject: Question: LVM2 VG resizing and movement of PE within VG |
|
|
Hi all,
I have some problem with using my harddisk space after giving all space to LVM.
My situation on /dev/sda (the only disk in my laptop):
/dev/sda1 some partition (about 25 % of all space)
/dev/sda2 LVM (about 75 % of all space)
I created a VG00 on /dev/sda2 and 3 LVs (LV01-LV03) which ate about 80% of the VG space.
Later I removed LV01, so the first 600 PE in this VG are free again.
My problem:
I want some of the diskspace back from LVM, let's say I want a /dev/sda3-VFAT-partition I can use through windows (please no suggestions for workarounds, I want to learn about LVM
My trials:
1. try:
pvresize --setphysicalvolumesize XXG -t /dev/sda2
--> "cannot resize to YY extends as later ones are allocated."
This in fact is true as a "lvdisplay -m" tells me that LV03 is using PE after #YY.
2. try:
OK, maybe we need to move these PE after #YY to somewhere before it... I've removed LV01, so there's a lot of free space...
pvmove -n /dev/VG00/LV03 /dev/sda2:OO-ZZ /dev/sda2:AA-BB
-->"No extends available for allocation"
My questions:
1. How can I move the allocated PE to some unallocated PE within this VG ?
2. If I would be able to move the allocated PE before PE YY, would I be able to resize the VG (and then be able to resize the partition it resides on) ?
Or is the answer, that I will never be able to claim the "unused" space back (well, I know it is not unused as the VG uses it) from the VG, without prior moving of the PE to another physical device ?
Thank you for your help ! |
|