FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora User

 
 
LinkBack Thread Tools
 
Old 02-05-2011, 09:15 PM
Nikolaus Rath
 
Default Resizing PVs (was: Installation Impressions)

Sam Sharpe <lists.redhat@samsharpe.net> writes:
> On 5 February 2011 20:53, Nikolaus Rath <Nikolaus@rath.org> wrote:
>> JFTR, unfortunately PVs cannot be made smaller. The whole idea of LVM is
>> to do all the resize operations *within* the containers.
>
> JFTR, unfortunately, you'll need to raise a bug against the pvresize
> manpage then...
>
> http://linux.die.net/man/8/pvresize
>
> ---
> Shrink the PV on /dev/sda1 prior to shrinking the partition with fdisk
> (ensure that the PV size is appropriate for your intended new
> partition size):
>
> pvresize --setphysicalvolumesize 40G /dev/sda1
> ---
>
> When filing the report, please state why your assertion "for the
> record" is correct over the maintainer's.

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.

From the same manpage that you looked up:

,----
| pvresize will refuse to shrink PhysicalVolume if it has allocated
| extents after where its new end would be. In the future, it should
| relocate these elsewhere in the volume group if there is sufficient free
| space, like pvmove does.
`----

Unfortunately, pvmove can only move extends to other PVs but not to a
different location in the same PV.


Why so aggressive?


-Nikolaus

--
»Time flies like an arrow, fruit flies like a Banana.«

PGP fingerprint: 5B93 61F8 4EA2 E279 ABF6 02CF A9AD B7F8 AE4E 425C
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 
Old 02-05-2011, 09:28 PM
Sam Sharpe
 
Default Resizing PVs (was: Installation Impressions)

On 5 February 2011 22:15, Nikolaus Rath <Nikolaus@rath.org> wrote:
> 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.

That's interesting. I do consider it resizing... It's not the function
of the pvresize command to move the LVs around so that it is possible
to downsize the PV. That's something that the admin must do.

If I use fdisk to resize a partition, is it fdisk's job to resize the
filesystem?

> From the same manpage that you looked up:
>
> ,----
> | pvresize will refuse to shrink PhysicalVolume if it has allocated
> | extents after where its new end would be. In the future, it should
> | relocate these elsewhere in the volume group if there is sufficient free
> | space, like pvmove does.
> `----

Yup, that is true - so you need to free up those extents first. Often
this is done by adding a second temporary PV to the VG.

> Unfortunately, pvmove can only move extends to other PVs but not to a
> different location in the same PV.

Yes, so it won't do exactly what you want in one command, so you have
to do it a different way. I have in the past added a second PV,
Extended the VG to this PV, then moved enough LVs to that second PV to
make reducing the original PV feasible. But the fact remains, that you
can shrink a Physical Volume.

> Why so aggressive?

I wasn't being particularly aggressive, but I do actually dislike
people saying (or abbreviating) "just for the record" when they are
incorrect or the facts are disputed. The only thing that goes in the
official record are the facts.

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

Thread Tools




All times are GMT. The time now is 12:58 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org