* [linux-lvm] extending a logical volume
@ 2002-01-21 12:10 Pierrick PONS
2002-01-21 12:43 ` lembark
2002-01-21 20:29 ` Andreas Dilger
0 siblings, 2 replies; 23+ messages in thread
From: Pierrick PONS @ 2002-01-21 12:10 UTC (permalink / raw)
To: linux-lvm
I've read the extending logical volume section and I can't believe this.
According to the doc, it would be impossible to extend a logical volume
without unmounting it first.
I'm using a ext3 (with a 2.4.17 kernel) filesystem and I'd like to extend my
logical volume without unmounting it first. This would be used on a production
server, so I can't unmount any logical volume.
I've seen that a ext2online patch does exist, maybe this fonctionnality is
still implemented in a newer kernel ?
Could you give me, if it exists, a method to extend the size without unmount
the logical volume ?
Thank's a lot.
Pierrick
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [linux-lvm] extending a logical volume
2002-01-21 12:10 [linux-lvm] extending a logical volume Pierrick PONS
@ 2002-01-21 12:43 ` lembark
2002-01-21 14:13 ` Brad Langhorst
2002-01-21 20:34 ` Andreas Dilger
2002-01-21 20:29 ` Andreas Dilger
1 sibling, 2 replies; 23+ messages in thread
From: lembark @ 2002-01-21 12:43 UTC (permalink / raw)
To: linux-lvm
-- Pierrick PONS <ppons@cvf.fr> on 01/21/02 19:09:31 +0100
> I've read the extending logical volume section and I can't believe this.
> According to the doc, it would be impossible to extend a logical volume
> without unmounting it first.
> I'm using a ext3 (with a 2.4.17 kernel) filesystem and I'd like to extend my
> logical volume without unmounting it first. This would be used on a
> production server, so I can't unmount any logical volume.
>
> I've seen that a ext2online patch does exist, maybe this fonctionnality is
> still implemented in a newer kernel ?
>
> Could you give me, if it exists, a method to extend the size without unmount
> the logical volume ?
>
> Thank's a lot.
Put it another way: You can lvextend a mounted volume.
There isn't any good way to extend the file system while
it's mounted. Adding the cyl groups to a mounted file
system would blow up several parts of the VFS layer.
Since extending the LVM takes O(ms) to finish there
isn't much gain in doing it mounted anyway.
The simplest way to handle it is unmounting, fsck-ing
and re-mounting the thing immediately after your weekly
backup, when users have to be off the system anyway
[if you want to tell me that the system is too important
to offline for a backup I'd strongly suggest finding a
9-story window near the console, it'll be easier to
handle it yourself than have the users do it for you
after a crash looses all of the data].
If the sytsem is used for real-time processing then
simply switch to the backup server for 10 minutes,
extend and validate the system then switch back.
Total time for, say, 100GB file system doubling in
size would be 60 seconds on any reasonably fast I/O
system, nearly all of which is spent extending the
filesystem.
Even HP's LVM -- probably the most forgiving of all --
has to be dismounted for extendfs; lvextend can be run
any time you like.
--
Steven Lembark 2930 W. Palmer
Workhorse Computing Chicago, IL 60647
+1 800 762 1582
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [linux-lvm] extending a logical volume
2002-01-21 12:43 ` lembark
@ 2002-01-21 14:13 ` Brad Langhorst
2002-01-21 14:50 ` Harri Haataja
` (2 more replies)
2002-01-21 20:34 ` Andreas Dilger
1 sibling, 3 replies; 23+ messages in thread
From: Brad Langhorst @ 2002-01-21 14:13 UTC (permalink / raw)
To: linux-lvm
--- lembark@wrkhors.com wrote:
>
>
> -- Pierrick PONS <ppons@cvf.fr> on 01/21/02 19:09:31
> +0100
>
> > I've read the extending logical volume section and
> I can't believe this.
> > According to the doc, it would be impossible to
> extend a logical volume
um - i think i just did this...
lvextend -L +10G /dev/vg1/data
followed by
resize-reiserfs
no corruption (at least not that I've noticed)
maybe i'm misunderstanding...
brad
__________________________________________________
Do You Yahoo!?
Send FREE video emails in Yahoo! Mail!
http://promo.yahoo.com/videomail/
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [linux-lvm] extending a logical volume
2002-01-21 14:13 ` Brad Langhorst
@ 2002-01-21 14:50 ` Harri Haataja
2002-01-21 15:01 ` lembark
` (2 more replies)
2002-01-21 14:56 ` lembark
2002-01-21 14:59 ` Pierrick PONS
2 siblings, 3 replies; 23+ messages in thread
From: Harri Haataja @ 2002-01-21 14:50 UTC (permalink / raw)
To: linux-lvm
On Mon, Jan 21, 2002 at 12:13:14PM -0800, Brad Langhorst wrote:
> --- lembark@wrkhors.com wrote:
> > -- Pierrick PONS <ppons@cvf.fr> on 01/21/02 19:09:31
> > +0100
> >
> > > I've read the extending logical volume section and
> > I can't believe this.
> > > According to the doc, it would be impossible to
> > extend a logical volume
>
> um - i think i just did this...
>
> lvextend -L +10G /dev/vg1/data
> followed by
> resize-reiserfs
>
> no corruption (at least not that I've noticed)
I do this all the time with XFS, Reiser and even ext3.
At least reiser also shrinks, I think.
--
I presented the idea of entropy informally recently as "when you put a frog
in a blender, the bits that are no longer frog".
-- Alan Rosentahl, Scary Devil Monastery
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [linux-lvm] extending a logical volume
2002-01-21 14:13 ` Brad Langhorst
2002-01-21 14:50 ` Harri Haataja
@ 2002-01-21 14:56 ` lembark
2002-01-21 20:40 ` Andreas Dilger
2002-01-21 14:59 ` Pierrick PONS
2 siblings, 1 reply; 23+ messages in thread
From: lembark @ 2002-01-21 14:56 UTC (permalink / raw)
To: linux-lvm
-- Brad Langhorst <bwlang@yahoo.com> on 01/21/02 12:13:14 -0800
>
> --- lembark@wrkhors.com wrote:
>>
>>
>> -- Pierrick PONS <ppons@cvf.fr> on 01/21/02 19:09:31
>> +0100
>>
>> > I've read the extending logical volume section and
>> I can't believe this.
>> > According to the doc, it would be impossible to
>> extend a logical volume
>
> um - i think i just did this...
>
> lvextend -L +10G /dev/vg1/data
> followed by
> resize-reiserfs
>
> no corruption (at least not that I've noticed)
>
> maybe i'm misunderstanding...
There has been a bit if mail on the reiser list about
corruption from expanding in-use file systems. Frankly,
for the number of [milli?]seconds it takes to do the
expansion offline it seems easier to do it unmounted.
I'm also not sure that ext3 supports online extension
(thought the original post was about ext3), and ext2
or msdos file systems certianly don't.
You also don't know if anyone is using the volume for
a networked file system, which may screw things up
if the caching is too aggressive.
--
Steven Lembark 2930 W. Palmer
Workhorse Computing Chicago, IL 60647
+1 800 762 1582
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [linux-lvm] extending a logical volume
2002-01-21 14:13 ` Brad Langhorst
2002-01-21 14:50 ` Harri Haataja
2002-01-21 14:56 ` lembark
@ 2002-01-21 14:59 ` Pierrick PONS
2002-01-21 15:04 ` lembark
2 siblings, 1 reply; 23+ messages in thread
From: Pierrick PONS @ 2002-01-21 14:59 UTC (permalink / raw)
To: linux-lvm
>
> --- lembark@wrkhors.com wrote:
> >
> >
> > -- Pierrick PONS <ppons@cvf.fr> on 01/21/02 19:09:31
> > +0100
> >
> > > I've read the extending logical volume section and
> > I can't believe this.
> > > According to the doc, it would be impossible to
> > extend a logical volume
>
> um - i think i just did this...
>
> lvextend -L +10G /dev/vg1/data
> followed by
> resize-reiserfs
>
> no corruption (at least not that I've noticed)
>
> maybe i'm misunderstanding...
>
> brad
>
>
I think it's because you're under reiserfs.
I have chosen ext3 file system instead of reiserfs because in case of current
failure some data may have problems if there are data accesses on. That's what
I was said.
Pierrick
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [linux-lvm] extending a logical volume
2002-01-21 14:50 ` Harri Haataja
@ 2002-01-21 15:01 ` lembark
2002-01-21 18:47 ` [linux-lvm] Whats wrong with this picture? James Hawtin
2002-01-21 15:22 ` [linux-lvm] extending a logical volume mitch
2002-01-21 18:27 ` James Hawtin
2 siblings, 1 reply; 23+ messages in thread
From: lembark @ 2002-01-21 15:01 UTC (permalink / raw)
To: linux-lvm
-- Harri Haataja <harri.haataja@smilehouse.com> on 01/21/02 22:48:17 +0200
>> lvextend -L +10G /dev/vg1/data
>> followed by
>> resize-reiserfs
>>
>> no corruption (at least not that I've noticed)
>
> I do this all the time with XFS, Reiser and even ext3.
> At least reiser also shrinks, I think.
The lvextend is almost always safe, extending a mounted
file system can cause real pain if it glitches at all.
There are just too many ways for the system to get fried
if it croaks while someone is both writing a file and the
system is being updated and neither reiser nor ext3 nor
xfs nor lvm at this point seem solid enough to recover
gracefully from heavy duty failures at that point (at
least from what I've seen going by on the mailing lists).
--
Steven Lembark 2930 W. Palmer
Workhorse Computing Chicago, IL 60647
+1 800 762 1582
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [linux-lvm] extending a logical volume
2002-01-21 14:59 ` Pierrick PONS
@ 2002-01-21 15:04 ` lembark
0 siblings, 0 replies; 23+ messages in thread
From: lembark @ 2002-01-21 15:04 UTC (permalink / raw)
To: linux-lvm
> I have chosen ext3 file system instead of reiserfs because in case of current
> failure some data may have problems if there are data accesses on. That's
> what I was said.
I'd suggest checking carefully before attempting to extend
a mounted ext3 filesystem. Even if the doc's claim it's
supported you can get into nasty logic races caused by not
wanting to buffer either the journal or cyl groups as they
are written. Theoretically it's all meta-data, but in reality
it takes time to write and failures during that process
can leave buffered cyl group information in core if the
system croaks.
--
Steven Lembark 2930 W. Palmer
Workhorse Computing Chicago, IL 60647
+1 800 762 1582
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [linux-lvm] extending a logical volume
2002-01-21 14:50 ` Harri Haataja
2002-01-21 15:01 ` lembark
@ 2002-01-21 15:22 ` mitch
2002-01-21 15:37 ` Harri Haataja
2002-01-21 18:27 ` James Hawtin
2 siblings, 1 reply; 23+ messages in thread
From: mitch @ 2002-01-21 15:22 UTC (permalink / raw)
To: linux-lvm
> > > I can't believe this.
> > > > According to the doc, it would be impossible to
> > > extend a logical volume
> >
> > um - i think i just did this...
> >
> > lvextend -L +10G /dev/vg1/data
> > followed by
> > resize-reiserfs
> >
> > no corruption (at least not that I've noticed)
>
> I do this all the time with XFS, Reiser and even ext3.
> At least reiser also shrinks, I think.
>
>
Sorry to sound stupid, but using what tools? resize-reiserfs for Reiser,
but what to use for ext3?
--Mitch
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [linux-lvm] extending a logical volume
2002-01-21 15:22 ` [linux-lvm] extending a logical volume mitch
@ 2002-01-21 15:37 ` Harri Haataja
0 siblings, 0 replies; 23+ messages in thread
From: Harri Haataja @ 2002-01-21 15:37 UTC (permalink / raw)
To: linux-lvm
On Mon, Jan 21, 2002 at 03:29:45PM -0600, mitch@mdmiller.com wrote:
> > > > I can't believe this.
> > > > > According to the doc, it would be impossible to
> > > > extend a logical volume
> > >
> > > um - i think i just did this...
> > >
> > > lvextend -L +10G /dev/vg1/data
> > > followed by
> > > resize-reiserfs
> > >
> > > no corruption (at least not that I've noticed)
> >
> > I do this all the time with XFS, Reiser and even ext3.
> > At least reiser also shrinks, I think.
> >
> Sorry to sound stupid, but using what tools? resize-reiserfs for Reiser,
> but what to use for ext3?
Come to think of it, that may be false. I don't have certain memory of
extn resizing. Sorry. Might try, though. Then it would be resize2fs or
something like that.
resize_reiserfs and xfs_growfs I'm quite certain I have used (how else
have I grown those part^Wvolumes I have?
--
Lusers annoy you; Backups are crap; | -- David P. Murphy
Morons employ you; And samba won't map. | in the S.D.M.
Printers need cable; Installs restart; | (parodying Dorothy
Servers aren't stable; You might as well LART. | Parker's "Resume")
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [linux-lvm] extending a logical volume
2002-01-21 14:50 ` Harri Haataja
2002-01-21 15:01 ` lembark
2002-01-21 15:22 ` [linux-lvm] extending a logical volume mitch
@ 2002-01-21 18:27 ` James Hawtin
2 siblings, 0 replies; 23+ messages in thread
From: James Hawtin @ 2002-01-21 18:27 UTC (permalink / raw)
To: linux-lvm
On Mon, 21 Jan 2002, Harri Haataja wrote:
> On Mon, Jan 21, 2002 at 12:13:14PM -0800, Brad Langhorst wrote:
> > --- lembark@wrkhors.com wrote:
> > > -- Pierrick PONS <ppons@cvf.fr> on 01/21/02 19:09:31
> > > +0100
> > >
> > > > I've read the extending logical volume section and
> > > I can't believe this.
> > > > According to the doc, it would be impossible to
> > > extend a logical volume
> >
> > um - i think i just did this...
> >
> > lvextend -L +10G /dev/vg1/data
> > followed by
> > resize-reiserfs
> >
> > no corruption (at least not that I've noticed)
>
> I do this all the time with XFS, Reiser and even ext3.
> At least reiser also shrinks, I think.
>
I had a resize reiserfs go really bad on 2.4.9 + patches, noticed it
after a couple of days. Personally i don't trust it, but thats just
probably me, I aways try to rebuild filesystems.
James
^ permalink raw reply [flat|nested] 23+ messages in thread
* [linux-lvm] Whats wrong with this picture?
2002-01-21 15:01 ` lembark
@ 2002-01-21 18:47 ` James Hawtin
2002-01-21 20:37 ` Andreas Dilger
0 siblings, 1 reply; 23+ messages in thread
From: James Hawtin @ 2002-01-21 18:47 UTC (permalink / raw)
To: linux-lvm
--- Physical volume ---
PV Name /dev/ide/host2/bus1/target0/lun0/part4
VG Name sunset_vg
PV Size 11.24 GB / NOT usable 51.50 MB [LVM: 125.00 KB]
PV# 2
PV Status available
Allocatable yes (but full)
Cur LV 4
PE Size (KByte) 32768
Total PE 358
Free PE 0
Allocated PE 358
PV UUID 0jqg8y-LkA2-vZ1w-jHpv-cSY6-t7sh-BcmDS6
My PE size 32M yet my unusable space is > 32M
I tested this with different PE sizes and found that the unusable space
reported is aways in the range >= 1PE and < 2PE
I would have expected it in the range >=0PE and <1PE
Why is this not so?
James
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [linux-lvm] extending a logical volume
2002-01-21 12:10 [linux-lvm] extending a logical volume Pierrick PONS
2002-01-21 12:43 ` lembark
@ 2002-01-21 20:29 ` Andreas Dilger
2002-01-22 5:09 ` Pierrick PONS
1 sibling, 1 reply; 23+ messages in thread
From: Andreas Dilger @ 2002-01-21 20:29 UTC (permalink / raw)
To: Pierrick PONS; +Cc: linux-lvm
On Jan 21, 2002 19:09 +0100, Pierrick PONS wrote:
> I've read the extending logical volume section and I can't believe this.
> According to the doc, it would be impossible to extend a logical volume
> without unmounting it first.
LV resize != fs resize.
> I'm using a ext3 (with a 2.4.17 kernel) filesystem and I'd like to extend my
> logical volume without unmounting it first. This would be used on a
> production server, so I can't unmount any logical volume.
Currently, you cannot online resize ext3, but that is only because the code
which I wrote to do this for 2.2 was never released, and it has not been
ported to 2.4/2.5 yet.
> I've seen that a ext2online patch does exist, maybe this fonctionnality is
> still implemented in a newer kernel ?
No, still only available as a patch. The ext2 online resizing patch is
very solid. The ext3 code is, by necessity, a total rewrite of the code
to work with ext3 journaling, but the fundamental concepts are the same.
> Could you give me, if it exists, a method to extend the size without unmount
> the logical volume ?
Use ext2 + ext2online patch (not great, because you probably crash more
often than you need to resize), use ext3 but no online resizing (offline
resizing works just fine with ext2resize), or work on porting the ext3
resizing code to 2.4.
Cheers, Andreas
--
Andreas Dilger
http://sourceforge.net/projects/ext2resize/
http://www-mddsp.enel.ucalgary.ca/People/adilger/
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [linux-lvm] extending a logical volume
2002-01-21 12:43 ` lembark
2002-01-21 14:13 ` Brad Langhorst
@ 2002-01-21 20:34 ` Andreas Dilger
2002-01-22 4:37 ` Heinz J . Mauelshagen
1 sibling, 1 reply; 23+ messages in thread
From: Andreas Dilger @ 2002-01-21 20:34 UTC (permalink / raw)
To: lembark; +Cc: linux-lvm
On Jan 21, 2002 12:40 -0600, lembark@wrkhors.com wrote:
> The simplest way to handle it is unmounting, fsck-ing
> and re-mounting the thing immediately after your weekly
> backup, when users have to be off the system anyway
> [if you want to tell me that the system is too important
> to offline for a backup I'd strongly suggest finding a
> 9-story window near the console, it'll be easier to
> handle it yourself than have the users do it for you
> after a crash looses all of the data].
I agree about the backups. Most people don't think about
backups until it is too late. I disagree about only doing
resizing at some late hour in the night though. Many times
there are unexpected demands on storage, and the sysadmin
doesn't have control over the cause, but gets blamed for
the effect (i.e. running out of space). Hence, online fs
resizing is a critical operation for an enterprise system.
> Even HP's LVM -- probably the most forgiving of all --
> has to be dismounted for extendfs; lvextend can be run
> any time you like.
??? That was only with the old HP LVM filesystem (UFS I think).
If you formatted with the new filesystem (can't remember the name),
you could do online resizing. AIX has had online resizing forever,
and so has XFS. None of these allow even offline shrinking though,
which ext2/ext3 does.
Cheers, Andreas
--
Andreas Dilger
http://sourceforge.net/projects/ext2resize/
http://www-mddsp.enel.ucalgary.ca/People/adilger/
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [linux-lvm] Whats wrong with this picture?
2002-01-21 18:47 ` [linux-lvm] Whats wrong with this picture? James Hawtin
@ 2002-01-21 20:37 ` Andreas Dilger
2002-01-22 3:22 ` James Hawtin
0 siblings, 1 reply; 23+ messages in thread
From: Andreas Dilger @ 2002-01-21 20:37 UTC (permalink / raw)
To: James Hawtin; +Cc: linux-lvm
On Jan 22, 2002 00:45 +0000, James Hawtin wrote:
> --- Physical volume ---
> PV Name /dev/ide/host2/bus1/target0/lun0/part4
> VG Name sunset_vg
> PV Size 11.24 GB / NOT usable 51.50 MB [LVM: 125.00 KB]
> PV# 2
> PV Status available
> Allocatable yes (but full)
> Cur LV 4
> PE Size (KByte) 32768
> Total PE 358
> Free PE 0
> Allocated PE 358
> PV UUID 0jqg8y-LkA2-vZ1w-jHpv-cSY6-t7sh-BcmDS6
>
> My PE size 32M yet my unusable space is > 32M
>
> I tested this with different PE sizes and found that the unusable space
> reported is aways in the range >= 1PE and < 2PE
>
> I would have expected it in the range >=0PE and <1PE
>
> Why is this not so?
Because the Sistina folks changed it in a recent tools release to have
a _full_ empty PE available for future expansion. IMHO that is a bit
of a waste, especially if you have large PEs. I would much rather that
it reserve some minimum amount of free space (e.g. 4MB or whatever) and
then it doesn't need to waste so much.
Cheers, Andreas
--
Andreas Dilger
http://sourceforge.net/projects/ext2resize/
http://www-mddsp.enel.ucalgary.ca/People/adilger/
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [linux-lvm] extending a logical volume
2002-01-21 14:56 ` lembark
@ 2002-01-21 20:40 ` Andreas Dilger
0 siblings, 0 replies; 23+ messages in thread
From: Andreas Dilger @ 2002-01-21 20:40 UTC (permalink / raw)
To: lembark; +Cc: linux-lvm
On Jan 21, 2002 14:53 -0600, lembark@wrkhors.com wrote:
> I'm also not sure that ext3 supports online extension
> (thought the original post was about ext3), and ext2
> or msdos file systems certianly don't.
Actually, both _could_ support online resizing if I ever got
my butt in gear. As it is, only ext2 supports it, but ext3
has untested code to do it for 2.2 kernels.
> You also don't know if anyone is using the volume for
> a networked file system, which may screw things up
> if the caching is too aggressive.
No, never seen a problem with this. Nobody shrinks filesystems
online, so at worst you might not fully utilize the newly allocated
space. In the end, however, applications rarely check the total
free space in a filesystem, but rather just write until the write
command returns ENOSPC.
Cheers, Andreas
--
Andreas Dilger
http://sourceforge.net/projects/ext2resize/
http://www-mddsp.enel.ucalgary.ca/People/adilger/
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [linux-lvm] Whats wrong with this picture?
2002-01-21 20:37 ` Andreas Dilger
@ 2002-01-22 3:22 ` James Hawtin
0 siblings, 0 replies; 23+ messages in thread
From: James Hawtin @ 2002-01-22 3:22 UTC (permalink / raw)
To: Andreas Dilger; +Cc: linux-lvm
On Mon, 21 Jan 2002, Andreas Dilger wrote:
> Because the Sistina folks changed it in a recent tools release to have
> a _full_ empty PE available for future expansion. IMHO that is a bit
> of a waste, especially if you have large PEs. I would much rather that
> it reserve some minimum amount of free space (e.g. 4MB or whatever) and
> then it doesn't need to waste so much.
>
> Cheers, Andreas
Thats ok I guess, I kind of agree with you, They should have reserved a
finite amount of space. After all someone might have a pe of 512k which
could prove to be not enough and land them in trouble. If they have
reserved one PE the output of pvdisplay should say (1 PE reserved) cos its
not unusable, they have reserved it!
James
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [linux-lvm] extending a logical volume
2002-01-21 20:34 ` Andreas Dilger
@ 2002-01-22 4:37 ` Heinz J . Mauelshagen
0 siblings, 0 replies; 23+ messages in thread
From: Heinz J . Mauelshagen @ 2002-01-22 4:37 UTC (permalink / raw)
To: linux-lvm
On Mon, Jan 21, 2002 at 07:33:31PM -0700, Andreas Dilger wrote:
> On Jan 21, 2002 12:40 -0600, lembark@wrkhors.com wrote:
> > The simplest way to handle it is unmounting, fsck-ing
> > and re-mounting the thing immediately after your weekly
> > backup, when users have to be off the system anyway
> > [if you want to tell me that the system is too important
> > to offline for a backup I'd strongly suggest finding a
> > 9-story window near the console, it'll be easier to
> > handle it yourself than have the users do it for you
> > after a crash looses all of the data].
>
> I agree about the backups. Most people don't think about
> backups until it is too late. I disagree about only doing
> resizing at some late hour in the night though. Many times
> there are unexpected demands on storage, and the sysadmin
> doesn't have control over the cause, but gets blamed for
> the effect (i.e. running out of space). Hence, online fs
> resizing is a critical operation for an enterprise system.
>
> > Even HP's LVM -- probably the most forgiving of all --
> > has to be dismounted for extendfs; lvextend can be run
> > any time you like.
>
> ??? That was only with the old HP LVM filesystem (UFS I think).
> If you formatted with the new filesystem (can't remember the name),
Andreas,
they got a Veritas license for vxfs and that could be online grown but
you couldn't shrink it without purchasing an additional license.
> you could do online resizing. AIX has had online resizing forever,
> and so has XFS. None of these allow even offline shrinking though,
> which ext2/ext3 does.
>
> Cheers, Andreas
> --
> Andreas Dilger
> http://sourceforge.net/projects/ext2resize/
> http://www-mddsp.enel.ucalgary.ca/People/adilger/
>
>
> _______________________________________________
> linux-lvm mailing list
> linux-lvm@sistina.com
> http://lists.sistina.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://www.sistina.com/lvm/Pages/howto.html
--
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] 23+ messages in thread
* Re: [linux-lvm] extending a logical volume
2002-01-21 20:29 ` Andreas Dilger
@ 2002-01-22 5:09 ` Pierrick PONS
2002-01-22 6:17 ` James Hawtin
0 siblings, 1 reply; 23+ messages in thread
From: Pierrick PONS @ 2002-01-22 5:09 UTC (permalink / raw)
To: linux-lvm
> On Jan 21, 2002 19:09 +0100, Pierrick PONS wrote:
> > I've read the extending logical volume section and I can't believe this.
> > According to the doc, it would be impossible to extend a logical volume
> > without unmounting it first.
>
> LV resize != fs resize.
>
Yes you're right. It's possible to extend LV online but it's not the same for
file systems.
> > I'm using a ext3 (with a 2.4.17 kernel) filesystem and I'd like to extend my
> > logical volume without unmounting it first. This would be used on a
> > production server, so I can't unmount any logical volume.
>
> Currently, you cannot online resize ext3, but that is only because the code
> which I wrote to do this for 2.2 was never released, and it has not been
> ported to 2.4/2.5 yet.
>
It would be a really goud feature .... :-)
> > I've seen that a ext2online patch does exist, maybe this fonctionnality is
> > still implemented in a newer kernel ?
>
> No, still only available as a patch. The ext2 online resizing patch is
> very solid. The ext3 code is, by necessity, a total rewrite of the code
> to work with ext3 journaling, but the fundamental concepts are the same.
>
> > Could you give me, if it exists, a method to extend the size without unmount
> > the logical volume ?
>
> Use ext2 + ext2online patch (not great, because you probably crash more
> often than you need to resize), use ext3 but no online resizing (offline
> resizing works just fine with ext2resize), or work on porting the ext3
> resizing code to 2.4.
>
hmmm, I'm not good enough to code this :-(
So you'd rather use ext3 with offline resizing.
That is a real problem because LVM would be used on a 24/24 available data
server with nfs accesses . Datas should be get as often as the other servers
need to.
Maybe I should have a look at reiserfs + resize-reiserfs instead of using ext3
. What a pitty, ext3 is easy to install and is jouralised.
> Cheers, Andreas
> --
> Andreas Dilger
> http://sourceforge.net/projects/ext2resize/
> http://www-mddsp.enel.ucalgary.ca/People/adilger/
>
>
>
Thank you Andreas .
Pierrick
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [linux-lvm] extending a logical volume
2002-01-22 5:09 ` Pierrick PONS
@ 2002-01-22 6:17 ` James Hawtin
2002-01-22 13:04 ` Andreas Dilger
0 siblings, 1 reply; 23+ messages in thread
From: James Hawtin @ 2002-01-22 6:17 UTC (permalink / raw)
To: linux-lvm
I really which the filesystem people would add support for lvm,
partitulary when "shrinking". At the moment you have to strink then FS,
then strink the LVM, it scares the hell out of me that I will get the
sizes wrong and badness would happen, ie part of the resized fs becomes
unaddressable. (all it needs is someone to take a different definition of
MB for example).
James
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [linux-lvm] extending a logical volume
2002-01-22 6:17 ` James Hawtin
@ 2002-01-22 13:04 ` Andreas Dilger
2002-01-23 9:09 ` Pierrick PONS
0 siblings, 1 reply; 23+ messages in thread
From: Andreas Dilger @ 2002-01-22 13:04 UTC (permalink / raw)
To: linux-lvm
On Jan 22, 2002 12:16 +0000, James Hawtin wrote:
> I really which the filesystem people would add support for lvm,
> partitulary when "shrinking". At the moment you have to strink then FS,
> then strink the LVM, it scares the hell out of me that I will get the
> sizes wrong and badness would happen, ie part of the resized fs becomes
> unaddressable. (all it needs is someone to take a different definition of
> MB for example).
Please see "e2fsadm". It will resize the LV and the ext2 fs properly.
Note also, that if it happens that you resize the LV smaller than the
fs, it is possible to just resize the LV larger again to get the end
of the fs back. In some cases, LVM will not assign the same PE to the
LV, so you will need to restore the LVM config from backup.
Cheers, Andreas
--
Andreas Dilger
http://sourceforge.net/projects/ext2resize/
http://www-mddsp.enel.ucalgary.ca/People/adilger/
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [linux-lvm] extending a logical volume
2002-01-22 13:04 ` Andreas Dilger
@ 2002-01-23 9:09 ` Pierrick PONS
2002-01-23 11:40 ` Andreas Dilger
0 siblings, 1 reply; 23+ messages in thread
From: Pierrick PONS @ 2002-01-23 9:09 UTC (permalink / raw)
To: linux-lvm
To conclude on this subject, here is what I've done.
I've extended my ext3 partition offline and not online.
These commands are easy but maybe they will help some persons. They would have
helped me ...
lvextend -L+200 /dev/testlvm/testlv
lvscan
umount /dev/testlvm/testlv
e2fsck -f /dev/testlvm/testlv
resize2fs -d -p /dev/testlvm/testlv
mount /dev/testlvm/testlv /mnt/lvm
df -k
Hope this will help some user, if it's not the case sorry to put a so newbie
post.
Regards.
--
Pierrick PONS
CVF Bordeaux
mail: ppons@cvf.fr
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [linux-lvm] extending a logical volume
2002-01-23 9:09 ` Pierrick PONS
@ 2002-01-23 11:40 ` Andreas Dilger
0 siblings, 0 replies; 23+ messages in thread
From: Andreas Dilger @ 2002-01-23 11:40 UTC (permalink / raw)
To: linux-lvm
On Jan 23, 2002 16:08 +0100, Pierrick PONS wrote:
> To conclude on this subject, here is what I've done.
> I've extended my ext3 partition offline and not online.
> These commands are easy but maybe they will help some persons.
> They would have helped me ...
>
>
> lvextend -L+200 /dev/testlvm/testlv
> lvscan
> umount /dev/testlvm/testlv
>
> e2fsck -f /dev/testlvm/testlv
> resize2fs -d -p /dev/testlvm/testlv
> mount /dev/testlvm/testlv /mnt/lvm
> df -k
This is all done for you with the "e2fsadm" command included with the
LVM user tools (including e2fsck):
umount /dev/testlvm/testlv
e2fsadm -L+200 /dev/testlvm/testlv
mount /dev/testlvm/testlv
Cheers, Andreas
--
Andreas Dilger
http://sourceforge.net/projects/ext2resize/
http://www-mddsp.enel.ucalgary.ca/People/adilger/
^ permalink raw reply [flat|nested] 23+ messages in thread
end of thread, other threads:[~2002-01-23 11:40 UTC | newest]
Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-01-21 12:10 [linux-lvm] extending a logical volume Pierrick PONS
2002-01-21 12:43 ` lembark
2002-01-21 14:13 ` Brad Langhorst
2002-01-21 14:50 ` Harri Haataja
2002-01-21 15:01 ` lembark
2002-01-21 18:47 ` [linux-lvm] Whats wrong with this picture? James Hawtin
2002-01-21 20:37 ` Andreas Dilger
2002-01-22 3:22 ` James Hawtin
2002-01-21 15:22 ` [linux-lvm] extending a logical volume mitch
2002-01-21 15:37 ` Harri Haataja
2002-01-21 18:27 ` James Hawtin
2002-01-21 14:56 ` lembark
2002-01-21 20:40 ` Andreas Dilger
2002-01-21 14:59 ` Pierrick PONS
2002-01-21 15:04 ` lembark
2002-01-21 20:34 ` Andreas Dilger
2002-01-22 4:37 ` Heinz J . Mauelshagen
2002-01-21 20:29 ` Andreas Dilger
2002-01-22 5:09 ` Pierrick PONS
2002-01-22 6:17 ` James Hawtin
2002-01-22 13:04 ` Andreas Dilger
2002-01-23 9:09 ` Pierrick PONS
2002-01-23 11:40 ` Andreas Dilger
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.