[linux-lvm] Can I create a PV that only uses a portion of a partition?
Bryn M. Reeves
breeves at redhat.com
Mon Mar 10 15:12:02 UTC 2008
-----BEGIN PGP SIGNED MESSAGE-----
Luca Berra wrote:
> On Fri, Mar 07, 2008 at 01:34:16PM -0500, Lionel Kernux wrote:
>> I was short-sighted when I created the PV and VG on this machine and
>> basically made one giant PV and one giant VG allocating it. Now I'd
>> like to be more granular.
> creating multiple PV on the same disk makes no sense.
> if you were to do this you could well do without LVM and avoid the
Not necessarily; Lionel could have perfectly valid reasons for wanting
to have multiple volume groups on the same disk.
> I'm thinking the only way is to pvresize to shrink the PV, then shrink
> the partition, then create some new partitions in the recovered space,
> then create some new PV's from the new partitions, then create some
> new VG's from the new PV's.
Yes, this approach should work fine - the only catch is if there are
extents already allocated in the area of the partition that you want to
shrink. In this case you can use pvmove with /path/to/dev:start-end
arguments to relocate any troublesome extents.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org
-----END PGP SIGNATURE-----
More information about the linux-lvm