* RE: Re: [linux-lvm] LVM2 on hardware RAID
@ 2006-08-11 18:11 Musil, William
2006-08-14 21:35 ` paddy
0 siblings, 1 reply; 6+ messages in thread
From: Musil, William @ 2006-08-11 18:11 UTC (permalink / raw)
To: LVM general discussion and development
[-- Attachment #1: Type: text/plain, Size: 3686 bytes --]
Thanks for the reply.
I would intend to do it offline. Not sure what you mean by dd in a shell.
Could you elaborate?
Do you mean, make a backup, drop and recreate the pv, vg, lv, and
filesystems, and recover backup?
I was hoping not to have to do this, kinda defeats the purpose.
I was trying to get away with managing all of my filesystems within lvm as
LV's, trying to keep the pv's as simple as possible.
William T. Musil
Manager, Technical Services
LabVantage Solutions, Inc.
1160 US Highway 22 East, Bridgewater, NJ 08807
p| 908.333.0111
f | 908.707.1179
e| wmusil@labvantage.com
i | www.labvantage.com
The information in this e-mail is confidential and may contain legally
privileged information. It is intended solely for the person or entity to
which it is addressed. Access to this e-mail by anyone else is unauthorized.
If you are not the intended recipient, any disclosure, copying, distribution,
action taken, or action omitted to be taken in reliance on it, is prohibited
and may be unlawful. If you received this e-mail in error, please contact the
sender and delete the material from any computer.
-----Original Message-----
From: linux-lvm-bounces@redhat.com
[mailto:linux-lvm-bounces@redhat.com]On Behalf Of paddy
Sent: Friday, August 11, 2006 1:25 PM
To: linux-lvm@redhat.com
Subject: Re: [linux-lvm] LVM2 on hardware RAID
On Fri, Aug 11, 2006 at 12:48:42PM -0400, Musil, William wrote:
> Hello all.
>
> I have an issue, that I am not sure how to address.
>
> How can I resize the physical volume if I change the geometry of the disk
> (non-destructive resize of RAID volume at the hardware level)
> I can see that the OS has picked up the new size of the disk and I would
like
> to resize the existing pv. I don't know how.
>
> I started with a hardware raid 5 (400GB), linux automatically recognizes
disk
> as /dev/sdb
>
> a simplistic representation of the setup is as follows
>
> pvcreate /dev/sdb
> vgcreate VolGroup10 /dev/sdb
> lvcreate -n LogVol10 VolGroup10
> mkfs.ext3 /dev/mapper/VolGroup10-LogVol10
>
> I have added a disk and expand the array to 600GB I can still see every
thing
> but I don't know how to extend the PV.
>
> filesystems OK
> logical volumes OK
> volume groups OK
>
> linux sees /dev/sdb as 600GB
> pvs shows pv /dev/sdb is 400GB. I wish to, non-destructively, reinitialize
> /dev/sdb so that pvs shows 600GB. how?
online or offline ?
I'm not aware of any tool that will resize your PV online. I can't
immediately
think that it would be hugely difficult, but it's a piece of work :-)
as for offline, you could do that in an afternoon with shell and dd :-)
Other possible strategies include, having partitioned your raid in the first
place (yes I know this is silly, but you can see what I mean), or perhaps
converting to some other VM software that can do what you need (like, will
EVMS do this??) Perhaps there is a way to emulate the 'having partitioned
first strategy' and make the new 200G addressable as a seperate block
device, at which point a pvmerge command would come in handy :-)
(of course that would be easier if the PEs were PE size aligned to the
underlying device, but you could take account of that in where you
started your new PV :-)
Or perhaps some kind soul will point you to something I have missed.
Good Luck.
Regards,
Paddy
--
Perl 6 will give you the big knob. -- Larry Wall
_______________________________________________
linux-lvm mailing list
linux-lvm@redhat.com
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Musil, William.vcf --]
[-- Type: text/x-vcard; name="Musil, William.vcf", Size: 185 bytes --]
BEGIN:VCARD
VERSION:2.1
N:Musil;William
FN:Musil, William
ADR;WORK:;Bridgewater
LABEL;WORK:Bridgewater
EMAIL;PREF;INTERNET:WMusil@labvantage.com
REV:20040303T185224Z
END:VCARD
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: RE: [linux-lvm] LVM2 on hardware RAID
@ 2006-08-11 19:37 Musil, William
2006-08-14 22:36 ` paddy
0 siblings, 1 reply; 6+ messages in thread
From: Musil, William @ 2006-08-11 19:37 UTC (permalink / raw)
To: LVM general discussion and development
[-- Attachment #1.1: Type: text/plain, Size: 3498 bytes --]
Thank you Greg, that was exactly what I needed. I was looking at pvextend. My
mistake.
I can now create another lv in the resized vg. Thanks again.
William T. Musil
Manager, Technical Services
LabVantage Solutions, Inc.
1160 US Highway 22 East, Bridgewater, NJ 08807
p| 908.333.0111
f | 908.707.1179
e| wmusil@labvantage.com
i | www.labvantage.com
The information in this e-mail is confidential and may contain legally
privileged information. It is intended solely for the person or entity to
which it is addressed. Access to this e-mail by anyone else is unauthorized.
If you are not the intended recipient, any disclosure, copying, distribution,
action taken, or action omitted to be taken in reliance on it, is prohibited
and may be unlawful. If you received this e-mail in error, please contact the
sender and delete the material from any computer.
-----Original Message-----
From: linux-lvm-bounces@redhat.com [mailto:linux-lvm-bounces@redhat.com]On
Behalf Of Greg Hartzog
Sent: Friday, August 11, 2006 3:27 PM
To: 'LVM general discussion and development'
Subject: RE: [linux-lvm] LVM2 on hardware RAID
I believe you will do the following:
"pvresive /dev/sdb"
That will make the volume group now be 600GB.
Then use "lvextend" to enlarge the logical volumes, and whatever the proper
tool is to extend the EXT3 filesystem.
Best to have the logical volumes & volume group offline ("vgchange -a n")
before starting resizing.
Just my $0.02.
_____
From: linux-lvm-bounces@redhat.com [mailto:linux-lvm-bounces@redhat.com] On
Behalf Of Musil, William
Sent: Friday, August 11, 2006 12:49 PM
To: linux-lvm@redhat.com
Subject: [linux-lvm] LVM2 on hardware RAID
Hello all.
I have an issue, that I am not sure how to address.
How can I resize the physical volume if I change the geometry of the disk
(non-destructive resize of RAID volume at the hardware level)
I can see that the OS has picked up the new size of the disk and I would like
to resize the existing pv. I don't know how.
I started with a hardware raid 5 (400GB), linux automatically recognizes disk
as /dev/sdb
a simplistic representation of the setup is as follows
pvcreate /dev/sdb
vgcreate VolGroup10 /dev/sdb
lvcreate -n LogVol10 VolGroup10
mkfs.ext3 /dev/mapper/VolGroup10-LogVol10
I have added a disk and expand the array to 600GB I can still see every thing
but I don't know how to extend the PV.
filesystems OK
logical volumes OK
volume groups OK
linux sees /dev/sdb as 600GB
pvs shows pv /dev/sdb is 400GB. I wish to, non-destructively, reinitialize
/dev/sdb so that pvs shows 600GB. how?
William T. Musil
Manager, Technical Services
LabVantage Solutions, Inc.
1160 US Highway 22 East, Bridgewater, NJ 08807
p| 908.333.0111
f | 908.707.1179
e| wmusil@labvantage.com
i | www.labvantage.com
The information in this e-mail is confidential and may contain legally
privileged information. It is intended solely for the person or entity to
which it is addressed. Access to this e-mail by anyone else is unauthorized.
If you are not the intended recipient, any disclosure, copying, distribution,
action taken, or action omitted to be taken in reliance on it, is prohibited
and may be unlawful. If you received this e-mail in error, please contact the
sender and delete the material from any computer.
<<Musil, William.vcf>>
[-- Attachment #1.2: Type: text/html, Size: 14155 bytes --]
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Musil, William.vcf --]
[-- Type: text/x-vcard; name="Musil, William.vcf", Size: 185 bytes --]
BEGIN:VCARD
VERSION:2.1
N:Musil;William
FN:Musil, William
ADR;WORK:;Bridgewater
LABEL;WORK:Bridgewater
EMAIL;PREF;INTERNET:WMusil@labvantage.com
REV:20040303T185224Z
END:VCARD
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Re: [linux-lvm] LVM2 on hardware RAID
2006-08-11 18:11 Musil, William
@ 2006-08-14 21:35 ` paddy
0 siblings, 0 replies; 6+ messages in thread
From: paddy @ 2006-08-14 21:35 UTC (permalink / raw)
To: LVM general discussion and development
On Fri, Aug 11, 2006 at 02:11:43PM -0400, Musil, William wrote:
> Thanks for the reply.
>
> I would intend to do it offline.
In which case I would think it should be reasonably easy, even if you have
to write a simple program to do it.
> Not sure what you mean by dd in a shell.
> Could you elaborate?
sorry, I guess it's just my personal shorthand for block device manipulations
that you could do with just bash and dd(1). In this case you'd likely be
better of in C.
From what I recall, the layout of a PV is fairly straight-forward, with a
bunch of metadata at the front and then PEs after that. You would need to
change that metadata, and you may well need to extend the table that maps
PEs to LEs, which could even mean stealing a PE or so from the data section
to extend the metadata section (dunno off the top of my head). IIRC,
recent lvm layouts have PEs PE size aligned to the start of the PV, which
is a gift from the point of view of this problem (and what I was alluding
to in the context of a hypothetical pvmerge).
To recap, you would need to change the metadata, you may need to relocate
some PEs and renumber the PEs if you need more space for the metadata.
there might be some hazards with the vgcfgbackup system that would need
watching out for.
As I said in my other mail just now, I am surprised that it doesn't
already exist, so perhaps it does, or perhaps I've overlooked some
complication.
> Do you mean, make a backup, drop and recreate the pv, vg, lv, and
> filesystems, and recover backup?
Naturally I can only advise you to have proper backups before attempting
anything 'interesting', just like everyone else does. You do have backups
don't you? ;-)
What you describe might well be easier and more sensible than writing a
pvresize, although I'd rather write the util myself ;-)
> I was hoping not to have to do this, kinda defeats the purpose.
Agreed. It should be possible to do this with a minimum of actual moving
blocks about, unless you're greatly concerned to keep an lv contiguous
or something.
> I was trying to get away with managing all of my filesystems within lvm as
> LV's, trying to keep the pv's as simple as possible.
Yeah, I've been using HM's LVM since about 0.7, and I don't know how I lived
without it before :-)
That said, I would advise you to weigh the pros and cons of things like
root on LVM or swap on LVM carefully. I found it fun to do that kind
of thing at first, but I've tended to shy away from it of late :-)
Originally I implemented a version that had a single blank block at
the begining, much like say ext2, so that I could still have a
partition table and have the whole disk a PV. Found a couple of 'bugs' in
the user space code doing that :-) But I quickly became convinced from
conversation on the list that HM wouldn't take a patch for that :-(
And I was patching the kernel for that and devfs and some nfs stuff, and
I soon learnt that keeping up with that becomes a serious chore.
I recently had what seemed to be a nasty event that was dm related, which
is why I joined the list, but it's a bit of a chore to write up and my
supply of round tuits has been a bit short since then. Upon reflection
I think I fell into the same old mistake again: the kernel was from
sometime around 2.6.10 and patched for one or two things, so I hadn't
upgraded it. I'm wondering now whether it was that bio bug that got
fixed at around 2.6.12. But anyway, it made me revisit a few
fundamental thoughts about keeping it simple and keeping good backups :-)
Apologies for waffling on so, but I hope this helps :-)
Regards,
Paddy
--
Perl 6 will give you the big knob. -- Larry Wall
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: RE: [linux-lvm] LVM2 on hardware RAID
2006-08-11 19:37 RE: [linux-lvm] LVM2 on hardware RAID Musil, William
@ 2006-08-14 22:36 ` paddy
2006-08-14 22:57 ` Zak Kipling
0 siblings, 1 reply; 6+ messages in thread
From: paddy @ 2006-08-14 22:36 UTC (permalink / raw)
To: LVM general discussion and development
On Fri, Aug 11, 2006 at 03:37:29PM -0400, Musil, William wrote:
> Thank you Greg, that was exactly what I needed. I was looking at pvextend. My
> mistake.
> I can now create another lv in the resized vg. Thanks again.
William, I'm really glad you got a result.
I dont' have a pvresize or a pvextend, what version are you guys using ?
Regards,
Paddy
--
Perl 6 will give you the big knob. -- Larry Wall
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [linux-lvm] LVM2 on hardware RAID
2006-08-14 22:36 ` paddy
@ 2006-08-14 22:57 ` Zak Kipling
2006-08-14 23:46 ` paddy
0 siblings, 1 reply; 6+ messages in thread
From: Zak Kipling @ 2006-08-14 22:57 UTC (permalink / raw)
To: LVM general discussion and development
paddy wrote:
> I dont' have a pvresize or a pvextend, what version are you guys using ?
pvresize should be in 2.02.00 and later, according to WHATS_NEW.
I'm puzzled that you can't find it in etch (testing) though, since
(according to packages.debian.org) it has 2.02.06 -- and the files list
for the package includes /lib/lvm-200/pvresize. Sarge (stable), however,
only has 2.01.04 which won't have pvresize.
Zak.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [linux-lvm] LVM2 on hardware RAID
2006-08-14 22:57 ` Zak Kipling
@ 2006-08-14 23:46 ` paddy
0 siblings, 0 replies; 6+ messages in thread
From: paddy @ 2006-08-14 23:46 UTC (permalink / raw)
To: LVM general discussion and development
On Mon, Aug 14, 2006 at 11:57:43PM +0100, Zak Kipling wrote:
> paddy wrote:
>
> > I dont' have a pvresize or a pvextend, what version are you guys using ?
>
> pvresize should be in 2.02.00 and later, according to WHATS_NEW.
>
> I'm puzzled that you can't find it in etch (testing) though, since
> (according to packages.debian.org) it has 2.02.06 -- and the files list
> for the package includes /lib/lvm-200/pvresize. Sarge (stable), however,
> only has 2.01.04 which won't have pvresize.
ok, turns out I have 2.01.04-5 on that box. I looked at packages.debian.org
and I agree that's what it says, and the developer info says it migrated in
june ...
ok ... how's this for daft ...
# apt-get update
# dselect select
perhaps if I 'dselect update' ?
(better yet, I'd better get used to aptitude, which is a shame 'cos I like
dselect)
mystery solved.
Thanks!
(I'll go take a look at the code now, see if it's as simple as I thought :-)
Regards,
Paddy
--
Perl 6 will give you the big knob. -- Larry Wall
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2006-08-14 23:46 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-11 19:37 RE: [linux-lvm] LVM2 on hardware RAID Musil, William
2006-08-14 22:36 ` paddy
2006-08-14 22:57 ` Zak Kipling
2006-08-14 23:46 ` paddy
-- strict thread matches above, loose matches on Subject: below --
2006-08-11 18:11 Musil, William
2006-08-14 21:35 ` paddy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).