linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
* [linux-lvm] how to determine minimum partition size based on PV size
@ 2010-01-28 19:24 Joe Harvell
  2010-02-03 20:04 ` Gabriel
  0 siblings, 1 reply; 2+ messages in thread
From: Joe Harvell @ 2010-01-28 19:24 UTC (permalink / raw)
  To: linux-lvm

I need to reduce the size of an existing PV so that I can shrink the
partition it resides on an reclaim the storage.  I have already shrunk
the file systems and done an lvreduce.

I have three questions:

1. Is the value of the '--setphysicalvolumesize' argument to the
'pvresize' command the size the physical volume (contents and metadata)
will occupy on disk after the operation?  Or is it the specifying the
new capacity of the PV to hold data?
2. How do I determine the minimum size I can specify to pvreduce and
still have all of the original contents of the PV in the newly sized PV?
3. How do I determine the size the newly modified PV occupies on disk so
that I can reduce the partition it lives on to its minimum size?

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [linux-lvm] how to determine minimum partition size based on PV size
  2010-01-28 19:24 [linux-lvm] how to determine minimum partition size based on PV size Joe Harvell
@ 2010-02-03 20:04 ` Gabriel
  0 siblings, 0 replies; 2+ messages in thread
From: Gabriel @ 2010-02-03 20:04 UTC (permalink / raw)
  To: LVM general discussion and development

On Thu, Jan 28, 2010 at 9:24 PM, Joe Harvell
<jharvell+lists.lvm@dogpad.net> wrote:
> I need to reduce the size of an existing PV so that I can shrink the
> partition it resides on an reclaim the storage. �I have already shrunk
> the file systems and done an lvreduce.

before working on the PV, you also need to reduce the size of the
volume group the LV resides on.

> I have three questions:
>
> 1. Is the value of the '--setphysicalvolumesize' argument to the
> 'pvresize' command the size the physical volume (contents and metadata)
> will occupy on disk after the operation? �Or is it the specifying the
> new capacity of the PV to hold data?

In my understanding, the parameter specifies the total size of the PV.
The sum of PVs sizes (seen with pvdisplay) should be equal or larger
than the size of the VG residing on them.

> 2. How do I determine the minimum size I can specify to pvreduce and
> still have all of the original contents of the PV in the newly sized PV?

Multiply the number of allocated PEs to the size of a PE.

> 3. How do I determine the size the newly modified PV occupies on disk so
> that I can reduce the partition it lives on to its minimum size?

pvdisplay?


Sorry for the late reply, HTH.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-02-03 20:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-28 19:24 [linux-lvm] how to determine minimum partition size based on PV size Joe Harvell
2010-02-03 20:04 ` Gabriel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).