Re: Resizing PVs

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

 



On 6 February 2011 14:34, Nikolaus Rath <Nikolaus@xxxxxxxx> wrote:
> Chris Adams <cmadams@xxxxxxxxxx> writes:
>> Once upon a time, Nikolaus Rath <Nikolaus@xxxxxxxx> said:
>>> You can shrink a PV, but you will loose the extents that are stored in
>>> the space that you have truncated. I don't consider that resizing.
>>
>> Changing the size of something is called resizing.
>
> How would you distinguish between the resizing done by e.g. resize2fs
> and the one done by fdisk?

fdisk will be resizing a partition or block device. resize2fs resizes
a filesystem.

Those are all you need to reduce the size of a fs on a physical
partition. But if you want to shrink that fs to less than the size of
the current data within it, then you also need to do some work first.

In LVM, you would first need to shrink your FS with resize2fs, then
you need to reduce the LV with lvreduce, then that gives you space in
your VG. You can then use pvresize to reduce the size of the PV and
finally fdisk to reduce the size of the PV's partition. Easy... :o(

>>> Unfortunately, pvmove can only move extends to other PVs but not to a
>>> different location in the same PV.
>>
>> Not true.  It isn't as straightforward; you have to know a map of the
>> PEs and specify them to the pvmove command like (assuming the
>> destination PEs are not in use):
>>
>> pvmove /dev/sda2:1000-1100 /dev/sda2:100-200
>
> Oh, I didn't know about that. It seems that this thread finally produced
> some useful information as well, thanks!

I didn't know this either. This definitely trumps my way of
temporarily extending the VG with another PV.

-- 
Sam
-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines



[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux