* [linux-lvm] lvm2, extending a physical volume
@ 2003-07-08 5:00 Jan Dittmer
2003-07-09 3:05 ` Heinz J . Mauelshagen
0 siblings, 1 reply; 6+ messages in thread
From: Jan Dittmer @ 2003-07-08 5:00 UTC (permalink / raw)
To: linux-lvm
Hi,
I posted this a while ago on lvm-devel, but received no answer.
I'm using kernel 2.5(.74-mm2) with LVM2 and have a RAID5 to which I
added a new disk with raidreconf. This worked fine, but lvm doesn't
recognize the extra disk space:
# pvdisplay
--- Physical volume ---
PV Name /dev/md0
VG Name myraid
PV Size 335.36 GB / not usable 0
Allocatable yes (but full)
PE Size (KByte) 4096
Total PE 85853
Free PE 0
Allocated PE 85853
PV UUID wZQg66-cWrF-VDi5-GcRN-aYVg-RQQ3-PPm5K5
but:
# cat /proc/mdstat
Personalities : [linear] [raid0] [raid1] [raid5] [multipath]
md0 : active raid5 hdc1[4] hdh1[3] hdf1[2] hdg1[1] hde1[0]
468872704 blocks level 5, 4k chunk, algorithm 2 [5/5] [UUUUU]
which translates to ~480 GB (5x 120GB)
Somewhere I found a post, that with vgcfgbackup / vgcfgrestore one is
able to resize the volume. But simply backing up and restoring the
descriptor just gets me to the same situation.
As I've another partition (which isn't that important) I tried to change
the backup manually, ie. I changed pe_count in the backup file and
restored it. This works fine - but how do I figure the correct PE count
for this bigger disk? I just don't want to poke around until it says,
'hey, too big, trashing your data'. There has to be a simple way, I
guess, which I totally overlook. It isn't that big of a change.
pvresize tells me it isn't implemented.
Thanks for any insight,
Jan
# vgdisplay --version
LVM version: 1.95.15 (2003-01-10)
Library version: 0.96.08-ioctl (2003-03-27)
Driver version: 1.0.6
--
Linux rubicon 2.5.74-mm2-jd4 #1 SMP Sun Jul 6 09:55:20 CEST 2003 i686
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [linux-lvm] lvm2, extending a physical volume
2003-07-08 5:00 [linux-lvm] lvm2, extending a physical volume Jan Dittmer
@ 2003-07-09 3:05 ` Heinz J . Mauelshagen
2003-07-12 16:10 ` Jan Dittmer
0 siblings, 1 reply; 6+ messages in thread
From: Heinz J . Mauelshagen @ 2003-07-09 3:05 UTC (permalink / raw)
To: linux-lvm
Jan,
you didn't overlook something. There's a bug in the
pvcreate -yff -u wZQg66-cWrF-VDi5-GcRN-aYVg-RQQ3-PPm5K5 /dev/md0
vgcfgrestore myraid
trick we'll fix ASAP (vgcfgrestore should keep the new size which it doesn't).
We're thinking about a pvresize command to make this smoother.
Regards,
Heinz -- The LVM Guy --
On Tue, Jul 08, 2003 at 11:59:32AM +0200, Jan Dittmer wrote:
> Hi,
>
> I posted this a while ago on lvm-devel, but received no answer.
> I'm using kernel 2.5(.74-mm2) with LVM2 and have a RAID5 to which I
> added a new disk with raidreconf. This worked fine, but lvm doesn't
> recognize the extra disk space:
>
> # pvdisplay
> --- Physical volume ---
> PV Name /dev/md0
> VG Name myraid
> PV Size 335.36 GB / not usable 0
> Allocatable yes (but full)
> PE Size (KByte) 4096
> Total PE 85853
> Free PE 0
> Allocated PE 85853
> PV UUID wZQg66-cWrF-VDi5-GcRN-aYVg-RQQ3-PPm5K5
>
> but:
>
> # cat /proc/mdstat
> Personalities : [linear] [raid0] [raid1] [raid5] [multipath]
>
> md0 : active raid5 hdc1[4] hdh1[3] hdf1[2] hdg1[1] hde1[0]
> 468872704 blocks level 5, 4k chunk, algorithm 2 [5/5] [UUUUU]
>
> which translates to ~480 GB (5x 120GB)
>
> Somewhere I found a post, that with vgcfgbackup / vgcfgrestore one is
> able to resize the volume. But simply backing up and restoring the
> descriptor just gets me to the same situation.
> As I've another partition (which isn't that important) I tried to change
> the backup manually, ie. I changed pe_count in the backup file and
> restored it. This works fine - but how do I figure the correct PE count
> for this bigger disk? I just don't want to poke around until it says,
> 'hey, too big, trashing your data'. There has to be a simple way, I
> guess, which I totally overlook. It isn't that big of a change.
> pvresize tells me it isn't implemented.
>
> Thanks for any insight,
>
> Jan
>
> # vgdisplay --version
> LVM version: 1.95.15 (2003-01-10)
> Library version: 0.96.08-ioctl (2003-03-27)
> Driver version: 1.0.6
>
> --
> Linux rubicon 2.5.74-mm2-jd4 #1 SMP Sun Jul 6 09:55:20 CEST 2003 i686
>
>
> _______________________________________________
> 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/
*** 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] 6+ messages in thread
* Re: [linux-lvm] lvm2, extending a physical volume
2003-07-09 3:05 ` Heinz J . Mauelshagen
@ 2003-07-12 16:10 ` Jan Dittmer
2003-07-12 18:00 ` Heinz J . Mauelshagen
0 siblings, 1 reply; 6+ messages in thread
From: Jan Dittmer @ 2003-07-12 16:10 UTC (permalink / raw)
To: linux-lvm
Hi,
would this be a reasonable course of action?
vgcfgbackup myraid
pvcreate -yff -u wZQg66-cWrF-VDi5-GcRN-aYVg-RQQ3-PPm5K5 /dev/md0
`take the size pvcreate reports and change the backup file accordingly`
vgcfgrestore myraid
Thanks,
Jan
Heinz J . Mauelshagen wrote:
> Jan,
>
> you didn't overlook something. There's a bug in the
>
> pvcreate -yff -u wZQg66-cWrF-VDi5-GcRN-aYVg-RQQ3-PPm5K5 /dev/md0
> vgcfgrestore myraid
>
> trick we'll fix ASAP (vgcfgrestore should keep the new size which it doesn't).
>
> We're thinking about a pvresize command to make this smoother.
>
> Regards,
> Heinz -- The LVM Guy --
>
>
> On Tue, Jul 08, 2003 at 11:59:32AM +0200, Jan Dittmer wrote:
>
>>Hi,
>>
>>I posted this a while ago on lvm-devel, but received no answer.
>>I'm using kernel 2.5(.74-mm2) with LVM2 and have a RAID5 to which I
>>added a new disk with raidreconf. This worked fine, but lvm doesn't
>>recognize the extra disk space:
>>
>># pvdisplay
>> --- Physical volume ---
>> PV Name /dev/md0
>> VG Name myraid
>> PV Size 335.36 GB / not usable 0
>> Allocatable yes (but full)
>> PE Size (KByte) 4096
>> Total PE 85853
>> Free PE 0
>> Allocated PE 85853
>> PV UUID wZQg66-cWrF-VDi5-GcRN-aYVg-RQQ3-PPm5K5
>>
>>but:
>>
>># cat /proc/mdstat
>>Personalities : [linear] [raid0] [raid1] [raid5] [multipath]
>>
>>md0 : active raid5 hdc1[4] hdh1[3] hdf1[2] hdg1[1] hde1[0]
>> 468872704 blocks level 5, 4k chunk, algorithm 2 [5/5] [UUUUU]
>>
>>which translates to ~480 GB (5x 120GB)
>>
>>Somewhere I found a post, that with vgcfgbackup / vgcfgrestore one is
>>able to resize the volume. But simply backing up and restoring the
>>descriptor just gets me to the same situation.
>>As I've another partition (which isn't that important) I tried to change
>>the backup manually, ie. I changed pe_count in the backup file and
>>restored it. This works fine - but how do I figure the correct PE count
>>for this bigger disk? I just don't want to poke around until it says,
>>'hey, too big, trashing your data'. There has to be a simple way, I
>>guess, which I totally overlook. It isn't that big of a change.
>>pvresize tells me it isn't implemented.
>>
>>Thanks for any insight,
>>
>>Jan
>>
>># vgdisplay --version
>> LVM version: 1.95.15 (2003-01-10)
>> Library version: 0.96.08-ioctl (2003-03-27)
>> Driver version: 1.0.6
>>
>>--
>>Linux rubicon 2.5.74-mm2-jd4 #1 SMP Sun Jul 6 09:55:20 CEST 2003 i686
>>
>>
>>_______________________________________________
>>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/
>
>
> *** 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/
>
--
Linux rubicon 2.5.75-mm1-jd10 #1 SMP Sat Jul 12 19:40:28 CEST 2003 i686
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [linux-lvm] lvm2, extending a physical volume
2003-07-12 16:10 ` Jan Dittmer
@ 2003-07-12 18:00 ` Heinz J . Mauelshagen
2003-07-13 3:17 ` Jan Dittmer
0 siblings, 1 reply; 6+ messages in thread
From: Heinz J . Mauelshagen @ 2003-07-12 18:00 UTC (permalink / raw)
To: linux-lvm
On Sat, Jul 12, 2003 at 11:09:13PM +0200, Jan Dittmer wrote:
> Hi,
>
> would this be a reasonable course of action?
>
> vgcfgbackup myraid
> pvcreate -yff -u wZQg66-cWrF-VDi5-GcRN-aYVg-RQQ3-PPm5K5 /dev/md0
> `take the size pvcreate reports and change the backup file accordingly`
> vgcfgrestore myraid
Yes, this is the workaround.
(vgcfgbackup shouldn't be necessary though)
Regards,
Heinz -- The LVM Guy --
>
> Thanks,
>
> Jan
>
> Heinz J . Mauelshagen wrote:
> > Jan,
> >
> > you didn't overlook something. There's a bug in the
> >
> > pvcreate -yff -u wZQg66-cWrF-VDi5-GcRN-aYVg-RQQ3-PPm5K5 /dev/md0
> > vgcfgrestore myraid
> >
> > trick we'll fix ASAP (vgcfgrestore should keep the new size which it doesn't).
> >
> > We're thinking about a pvresize command to make this smoother.
> >
> > Regards,
> > Heinz -- The LVM Guy --
> >
> >
> > On Tue, Jul 08, 2003 at 11:59:32AM +0200, Jan Dittmer wrote:
> >
> >>Hi,
> >>
> >>I posted this a while ago on lvm-devel, but received no answer.
> >>I'm using kernel 2.5(.74-mm2) with LVM2 and have a RAID5 to which I
> >>added a new disk with raidreconf. This worked fine, but lvm doesn't
> >>recognize the extra disk space:
> >>
> >># pvdisplay
> >> --- Physical volume ---
> >> PV Name /dev/md0
> >> VG Name myraid
> >> PV Size 335.36 GB / not usable 0
> >> Allocatable yes (but full)
> >> PE Size (KByte) 4096
> >> Total PE 85853
> >> Free PE 0
> >> Allocated PE 85853
> >> PV UUID wZQg66-cWrF-VDi5-GcRN-aYVg-RQQ3-PPm5K5
> >>
> >>but:
> >>
> >># cat /proc/mdstat
> >>Personalities : [linear] [raid0] [raid1] [raid5] [multipath]
> >>
> >>md0 : active raid5 hdc1[4] hdh1[3] hdf1[2] hdg1[1] hde1[0]
> >> 468872704 blocks level 5, 4k chunk, algorithm 2 [5/5] [UUUUU]
> >>
> >>which translates to ~480 GB (5x 120GB)
> >>
> >>Somewhere I found a post, that with vgcfgbackup / vgcfgrestore one is
> >>able to resize the volume. But simply backing up and restoring the
> >>descriptor just gets me to the same situation.
> >>As I've another partition (which isn't that important) I tried to change
> >>the backup manually, ie. I changed pe_count in the backup file and
> >>restored it. This works fine - but how do I figure the correct PE count
> >>for this bigger disk? I just don't want to poke around until it says,
> >>'hey, too big, trashing your data'. There has to be a simple way, I
> >>guess, which I totally overlook. It isn't that big of a change.
> >>pvresize tells me it isn't implemented.
> >>
> >>Thanks for any insight,
> >>
> >>Jan
> >>
> >># vgdisplay --version
> >> LVM version: 1.95.15 (2003-01-10)
> >> Library version: 0.96.08-ioctl (2003-03-27)
> >> Driver version: 1.0.6
> >>
> >>--
> >>Linux rubicon 2.5.74-mm2-jd4 #1 SMP Sun Jul 6 09:55:20 CEST 2003 i686
> >>
> >>
> >>_______________________________________________
> >>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/
> > _______________________________________________
> > 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/
> >
>
>
> --
> Linux rubicon 2.5.75-mm1-jd10 #1 SMP Sat Jul 12 19:40:28 CEST 2003 i686
>
>
> _______________________________________________
> 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/
*** 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] 6+ messages in thread
* Re: [linux-lvm] lvm2, extending a physical volume
2003-07-12 18:00 ` Heinz J . Mauelshagen
@ 2003-07-13 3:17 ` Jan Dittmer
2003-07-13 3:27 ` Jan Dittmer
0 siblings, 1 reply; 6+ messages in thread
From: Jan Dittmer @ 2003-07-13 3:17 UTC (permalink / raw)
To: linux-lvm
Heinz J . Mauelshagen wrote:
> On Sat, Jul 12, 2003 at 11:09:13PM +0200, Jan Dittmer wrote:
>
>>Hi,
>>
>>would this be a reasonable course of action?
>>
>>vgcfgbackup myraid
>>pvcreate -yff -u wZQg66-cWrF-VDi5-GcRN-aYVg-RQQ3-PPm5K5 /dev/md0
>>`take the size pvcreate reports and change the backup file accordingly`
>>vgcfgrestore myraid
>
>
> Yes, this is the workaround.
> (vgcfgbackup shouldn't be necessary though)
>
Being on the careful side here (don't want to restore 300GB of data).
pvdisplay reports (after pvcreate):
--- NEW Physical volume ---
PV Name /dev/md0
VG Name
PV Size 447.15 GB
Allocatable NO
PE Size (KByte) 0
Total PE 0
Free PE 0
Allocated PE 0
PV UUID wZQg66-cWrF-VDi5-GcRN-aYVg-RQQ3-PPm5K5
So how do I get the PEs? Can I also create a new Volumegroup without damaging
anything? Or is there another way to get the total/free PEs?
Thanks for the insight,
Jan
--
Linux rubicon 2.5.75-mm1-jd10 #1 SMP Sat Jul 12 19:40:28 CEST 2003 i686
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [linux-lvm] lvm2, extending a physical volume
2003-07-13 3:17 ` Jan Dittmer
@ 2003-07-13 3:27 ` Jan Dittmer
0 siblings, 0 replies; 6+ messages in thread
From: Jan Dittmer @ 2003-07-13 3:27 UTC (permalink / raw)
To: linux-lvm
Jan Dittmer wrote:
> Heinz J . Mauelshagen wrote:
>
>> On Sat, Jul 12, 2003 at 11:09:13PM +0200, Jan Dittmer wrote:
>>
>>> Hi,
>>>
>>> would this be a reasonable course of action?
>>>
>>> vgcfgbackup myraid
>>> pvcreate -yff -u wZQg66-cWrF-VDi5-GcRN-aYVg-RQQ3-PPm5K5 /dev/md0
>>> `take the size pvcreate reports and change the backup file accordingly`
> So how do I get the PEs? Can I also create a new Volumegroup without
> damaging anything? Or is there another way to get the total/free PEs?
>
Ok, I did it by hand - took out a calculator and calculated the new size...
Jan
--
Linux rubicon 2.5.75-mm1-jd10 #1 SMP Sat Jul 12 19:40:28 CEST 2003 i686
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2003-07-13 3:27 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-08 5:00 [linux-lvm] lvm2, extending a physical volume Jan Dittmer
2003-07-09 3:05 ` Heinz J . Mauelshagen
2003-07-12 16:10 ` Jan Dittmer
2003-07-12 18:00 ` Heinz J . Mauelshagen
2003-07-13 3:17 ` Jan Dittmer
2003-07-13 3:27 ` Jan Dittmer
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.