On Mon, Sep 22, 2003 at 01:48:09PM +0200, Måns Rullgård wrote: > "Heinz J . Mauelshagen" <mauelshagen@sistina.com> writes: > > >> Is it possible to reduce the size of a PV, freeing some space at the > >> end? I can make sure that the end is unused, of course. > > > > No such command implemented yet. > > > > Hack: > > you can use LVM2 and change the text format of the metadata by hand > > before running vgcfgrestore to store it back onto the PVs. > > > > If you want to follow this non-supported path, you want to take a > > copy of the original metadata file in /etc/lvm/backup/ to be able to > > back out gain. > > I'm already using lvm2. I noticed the pvresize command, but it just > says it's not implemented yet. Any chance it will be some time soon? We've got higher priority stuff in the works. Probably later this year. > > As for editing the metadata, I'm a little confused about the meaning > of some fields. After running vgcfgbackup, I have this in the file: > > physical_volumes { > > pv0 { > id = "eZV4mb-jk4z-pyfm-tGbJ-mBSW-drRT-ZHtgmn" > device = "/dev/discs/disc0/part2" # Hint only > > status = ["ALLOCATABLE"] > pe_start = 65920 > pe_count = 1189 # 37.1562 Gigabytes > } > } > > What is the meaning of the pe_start field? If I wanted to reduce the > size by, say, 1 GB, would it be correct to reduce pe_count by 32, the > PE size being 32 MB? pe_start is the sector offset into the device. Yes, you need to reduce pe_count by 32 making it 1157 and vgcfgrestore. You need to have recent LVM2 code so that vgcfgrestore updates the pe_count properly (and of course, the 32 PEs need to be empty). > > -- > Måns Rullgård > mru@users.sf.net > > > _______________________________________________ > linux-lvm mailing list > linux-lvm@sistina.com > http://lists.sistina.com/mailman/listinfo/linux-lvm > read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/ -- Regards, Heinz -- The LVM Guy -- *** Software bugs are stupid. Nevertheless it needs not so stupid people to solve them *** =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Heinz Mauelshagen Sistina Software Inc. Senior Consultant/Developer Am Sonnenhang 11 56242 Marienrachdorf Germany Mauelshagen@Sistina.com +49 2626 141200 FAX 924446 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- _______________________________________________ linux-lvm mailing list linux-lvm@sistina.com http://lists.sistina.com/mailman/listinfo/linux-lvm read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/