* [linux-lvm] Resizing PV @ 2003-09-22 5:23 Måns Rullgård 2003-09-22 5:45 ` Heinz J . Mauelshagen 0 siblings, 1 reply; 7+ messages in thread From: Måns Rullgård @ 2003-09-22 5:23 UTC (permalink / raw) To: linux-lvm 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. -- M�ns Rullg�rd mru@users.sf.net ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [linux-lvm] Resizing PV 2003-09-22 5:23 [linux-lvm] Resizing PV Måns Rullgård @ 2003-09-22 5:45 ` Heinz J . Mauelshagen 2003-09-22 6:49 ` [linux-lvm] " Måns Rullgård 0 siblings, 1 reply; 7+ messages in thread From: Heinz J . Mauelshagen @ 2003-09-22 5:45 UTC (permalink / raw) To: linux-lvm On Mon, Sep 22, 2003 at 12:21:59PM +0200, Måns Rullgård wrote: > > 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. > > -- > 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 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- ^ permalink raw reply [flat|nested] 7+ messages in thread
* [linux-lvm] Re: Resizing PV 2003-09-22 5:45 ` Heinz J . Mauelshagen @ 2003-09-22 6:49 ` Måns Rullgård 2003-09-22 8:06 ` Heinz J . Mauelshagen 0 siblings, 1 reply; 7+ messages in thread From: Måns Rullgård @ 2003-09-22 6:49 UTC (permalink / raw) To: linux-lvm "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? 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? -- M�ns Rullg�rd mru@users.sf.net ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [linux-lvm] Re: Resizing PV 2003-09-22 6:49 ` [linux-lvm] " Måns Rullgård @ 2003-09-22 8:06 ` Heinz J . Mauelshagen 2003-09-22 8:14 ` Måns Rullgård 0 siblings, 1 reply; 7+ messages in thread From: Heinz J . Mauelshagen @ 2003-09-22 8:06 UTC (permalink / raw) To: linux-lvm 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 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- ^ permalink raw reply [flat|nested] 7+ messages in thread
* [linux-lvm] Re: Resizing PV 2003-09-22 8:06 ` Heinz J . Mauelshagen @ 2003-09-22 8:14 ` Måns Rullgård 2003-09-22 8:25 ` Heinz J . Mauelshagen 0 siblings, 1 reply; 7+ messages in thread From: Måns Rullgård @ 2003-09-22 8:14 UTC (permalink / raw) To: linux-lvm "Heinz J . Mauelshagen" <mauelshagen@sistina.com> writes: > pe_start is the sector offset into the device. OK, I thought it might be, but I wasn't sure. > 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 How recent? Is this new enough? LVM version: 2.00.03 (2003-07-13) Library version: 1.00.02-ioctl (2003-07-12) Driver version: 4.0.0 I'm using whatever device-mapper is in Linux 2.6.0-test5. > properly (and of course, the 32 PEs need to be empty). -- M�ns Rullg�rd mru@users.sf.net ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [linux-lvm] Re: Resizing PV 2003-09-22 8:14 ` Måns Rullgård @ 2003-09-22 8:25 ` Heinz J . Mauelshagen 2003-09-23 3:47 ` Måns Rullgård 0 siblings, 1 reply; 7+ messages in thread From: Heinz J . Mauelshagen @ 2003-09-22 8:25 UTC (permalink / raw) To: linux-lvm On Mon, Sep 22, 2003 at 03:12:55PM +0200, Måns Rullgård wrote: > "Heinz J . Mauelshagen" <mauelshagen@sistina.com> writes: > > > pe_start is the sector offset into the device. > > OK, I thought it might be, but I wasn't sure. > > > 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 > > How recent? Is this new enough? > > LVM version: 2.00.03 (2003-07-13) > Library version: 1.00.02-ioctl (2003-07-12) > Driver version: 4.0.0 Should do it. > > I'm using whatever device-mapper is in Linux 2.6.0-test5. That's ok. device-mapper isn't involved in such userspace metadata updates to the PVs. > > > 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 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- ^ permalink raw reply [flat|nested] 7+ messages in thread
* [linux-lvm] Re: Resizing PV 2003-09-22 8:25 ` Heinz J . Mauelshagen @ 2003-09-23 3:47 ` Måns Rullgård 0 siblings, 0 replies; 7+ messages in thread From: Måns Rullgård @ 2003-09-23 3:47 UTC (permalink / raw) To: linux-lvm "Heinz J . Mauelshagen" <mauelshagen@sistina.com> writes: >> > pe_start is the sector offset into the device. >> >> OK, I thought it might be, but I wasn't sure. >> >> > 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 >> >> How recent? Is this new enough? >> >> LVM version: 2.00.03 (2003-07-13) >> Library version: 1.00.02-ioctl (2003-07-12) >> Driver version: 4.0.0 > > Should do it. It seemed to work. Thanks for the help. -- M�ns Rullg�rd mru@users.sf.net ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2003-09-23 3:47 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2003-09-22 5:23 [linux-lvm] Resizing PV Måns Rullgård 2003-09-22 5:45 ` Heinz J . Mauelshagen 2003-09-22 6:49 ` [linux-lvm] " Måns Rullgård 2003-09-22 8:06 ` Heinz J . Mauelshagen 2003-09-22 8:14 ` Måns Rullgård 2003-09-22 8:25 ` Heinz J . Mauelshagen 2003-09-23 3:47 ` Måns Rullgård
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox