[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: shrink lvm to get spare space



In <[🔎] 20090426220025.GA12546@m364d1.ece.northwestern.edu>, Zhengquan Zhang 
wrote:
>On Sun, Apr 26, 2009 at 04:50:16PM -0500, Boyd Stephen Smith Jr. wrote:
>> 3. Shrink the physical volume.  (I'm not even sure LVM supports this. 
>> If this is your only physical volume, and you are using the extents
>> toward the end, I don't think you'll be able to move the data.)
>Could you please explain a little bit why I need to do this? Will there
>be space unformatted after I do the first two steps?

>> 4. Shrink the partition.  (I'm comfortable with fdisk, but gparted is
>> the recommendation I've heard the most.)
>If I don't do this, will there be spare space unformatted after I do the
>first two steps?

It will be "unformatted" as soon as you run resize2fs.  (I think; LVM might 
use some space at the end of a pv.)

However, this space is still "claimed" by LVM, and it will fail or, at 
least, complain if that space is not available to it.  You must reduce the 
size of the physical volume to prevent LVM from expecting that space to be 
available.  (It will still claim the device, so you'll be unable to reload 
the partition table while the vg that the pv is in is active.)
-- 
Boyd Stephen Smith Jr.           	 ,= ,-_-. =.
bss@iguanasuicide.net            	((_/)o o(\_))
ICQ: 514984 YM/AIM: DaTwinkDaddy 	 `-'(. .)`-'
http://iguanasuicide.net/        	     \_/

Attachment: signature.asc
Description: This is a digitally signed message part.


Reply to: