Skip to contentSkip to conversation

How to grow a PV?

linux-lvm Thomas Kleffel 2 participants 7 messages Jun 12, 2003 – Jun 20, 2003

lore
Share & tools
lore
#0 lore raw

Hi!

I am running LVM1 ontop of software-RAID (md). I just added a disk to my raid, so my /dev/md0 is about 120G bigger now.

Now my question is: How can I tell LVM to include these additional space into the PV that's already there (on /dev/md0)?

I know it has to be possible because I did it several times (my raid has 9 disks now - it hat 4 disks, some time ago) - I just can't rememer :((( Could someone please give me a hint?

Thanks in advance,

Thomas Kleffel

#1 lore raw
Quoted 4 lines · Thomas Kleffel

Hi!

I am running LVM1 ontop of software-RAID (md). I just added a disk to my raid, so my /dev/md0 is about 120G bigger now.

Sounds like you added a new disk to the end of a linear MD ?

You could have pvcreate'd it directly to add it to a Volume Group (not adding it to the MD at all).

Quoted 3 lines

Now my question is: How can I tell LVM to include these additional space into the PV that's already there (on /dev/md0)?

LVM2 supports PV resizing.

Quoted 17 lines

I know it has to be possible because I did it several times (my raid has 9 disks now - it hat 4 disks, some time ago) - I just can't rememer :((( Could someone please give me a hint?

Thanks in advance,

Thomas Kleffel

_______________________________________________
linux-lvm mailing list
[email protected]
http://lists.sistina.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

Signature · 15 lines
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
[email protected]                           +49 2626 141200
                                                       FAX 924446
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
#6 lore raw
In reply to Thomas Kleffel

Hi again,

after a bit of research I found out, that I resized my PV some time ago using the pvresize command, that was available in lvm_1.1-rc2.
At the moment I am using 1.0.7 (gentoo). My problem is now that lvm_1.1-rc2 seems to have disappeared. I read that it was buggy, but worked for me at least 4 times. Could someone please tell me, where I could get lvm_1.1? This would save me a lot of work.

Thanks in advance,

Thomas Kleffel

Quoted 8 lines · I wrote:

Hi!

I am running LVM1 ontop of software-RAID (md). I just added a disk to my raid, so my /dev/md0 is about 120G bigger now.

Now my question is: How can I tell LVM to include these additional space into the PV that's already there (on /dev/md0)?

I know it has to be possible because I did it several times (my raid has 9 disks now - it hat 4 disks, some time ago) - I just can't rememer :((( Could someone please give me a hint?

#2 lore raw
In reply to Heinz J . Mauelshagen

Hi!

Quoted 6 lines · Heinz J . Mauelshagen

Sounds like you added a new disk to the end of a linear MD ?

You could have pvcreate'd it directly to add it to a Volume Group (not adding it to the MD at all).

Not exactly - I added a new disk to a raid-5 MD. I wanted it to be in the raid-array for beeing protected from a single-disk-failure.

Quoted 2 lines

LVM2 supports PV resizing.

Ok, thanks - I'm going to try this now...

Bye,

Thomas

#3 lore raw

Hi again...

...I'm sorry for having to ask again...

Quoted 1 line · Heinz J . Mauelshagen

LVM2 supports PV resizing.

I just installed 1.95.15 and pvresize tells me "Command not implemented yet." "pvresize --version" gives me the following:

Quoted 3 lines
LVM version:       1.95.15 (2003-01-10)
Library version:      0.96.08-ioctrl (2003-03-27)
Driver version:      1.0.10

Did I fetch an old version? Or do I need to get some bleeding-edge-stuff from the CVS? Or am I simply too stupid? :)

Thanks for your help,

Thomas Kleffel

#4 lore raw
Quoted 3 lines · Thomas Kleffel

Hi again...

...I'm sorry for having to ask again...

No problem.

Quoted 9 lines
Quoted 1 line · Heinz J . Mauelshagen

LVM2 supports PV resizing.

I just installed 1.95.15 and pvresize tells me "Command not implemented yet."
"pvresize --version" gives me the following:

Quoted 7 lines
Quoted 3 lines
LVM version:       1.95.15 (2003-01-10)
Library version:      0.96.08-ioctrl (2003-03-27)
Driver version:      1.0.10

Did I fetch an old version? Or do I need to get some bleeding-edge-stuff from the CVS?
Or am I simply too stupid? :)

No, you need to use pvcreate+vgcfgrestore with LVM2. Make a copy of your LVM metadata before you try it ;) (dd if=/dev/md0 of=md0.vgda bs)1k count=4k)

Quoted 13 lines

Thanks for your help,

Thomas Kleffel

_______________________________________________
linux-lvm mailing list
[email protected]
http://lists.sistina.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

Signature · 15 lines
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
[email protected]                           +49 2626 141200
                                                       FAX 924446
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
#5 lore raw

Hi!

Quoted 8 lines
Quoted 8 lines

I just installed 1.95.15 and pvresize tells me "Command not implemented yet."
"pvresize --version" gives me the following:

Quoted 3 lines
LVM version:       1.95.15 (2003-01-10)
Library version:      0.96.08-ioctrl (2003-03-27)
Driver version:      1.0.10
Quoted 7 lines
Quoted 3 lines

Did I fetch an old version? Or do I need to get some bleeding-edge-stuff from the CVS?
Or am I simply too stupid? :)

No, you need to use pvcreate+vgcfgrestore with LVM2. Make a copy of your LVM metadata before you try it ;) (dd if=/dev/md0 of=md0.vgda bs)1k count=4k)

It worked perfectly :)
Thank you!

Regard,

Thomas