All of lore.kernel.org
 help / color / mirror / Atom feed
* [linux-lvm] successes & resizing
@ 2001-05-16  3:21 Todd Underwood
  2001-05-16 10:10 ` Heinz J. Mauelshagen
  2001-05-16 16:55 ` Andreas Dilger
  0 siblings, 2 replies; 5+ messages in thread
From: Todd Underwood @ 2001-05-16  3:21 UTC (permalink / raw)
  To: linux-lvm

folx, 

i resolved the problem i posted about last week:  unable to mount root
device in trying to set up lvmroot using a bootable real ext2 partition
and initrd. they key (and this maybe a FAQ but i didn't see it) was
getting my scsi driver loaded into the initrd.  this was as simple as
unzipping the initrd-lvm-2.4.3.gz file, mouting on the loopback.  copying
the scsi module into place in /lib/modules and adding a modprobe to
linuxrc.  after that, all was good.  this may be worth documenting
somewhere (i was considering taking the existing info about lvm root and
doing a HOWTO given that i've set it up 5 or 8 times in the last two
weeks).

i have a separate question about ext2 resizing on a separate system:  when
i try to resize the root (using the ext2online resize patch to 2.4.3) i
get:

Filesystem           1k-blocks      Used Available Use% Mounted on
/dev/rootvg/root        495844    250577    219667  54% /
/dev/rootvg/usr        2590504   1444748   1014072  59% /usr
/dev/rootvg/home       1032088        20    979640   1% /home
/dev/rootvg/var         495844    105794    364450  23% /var
/dev/hda1               101089      6029     89841   7% /boot
bash-2.04# e2fsadm -L +200M / 
e2fsadm -- invalid logical volume name "/dev/root"


e2fsadm [-d|--debug] [-h|--help] [-n|--nofsck]
	{[-l|--extents] [+|-]LogicalExtentsNumber |
	 [-L|--size] [+|-]LogicalVolumeSize[kKmMgGtT]}
	[-t|--test] [-v|--verbose] [--version] LogicalVolumePath

bash-2.04# e2fsadm -L +200M /dev/rootvg/root 
lvextend -- extending logical volume "/dev/rootvg/root" to 700 MB
lvextend -- doing automatic backup of volume group "rootvg"
lvextend -- logical volume "/dev/rootvg/root" successfully extended

ext2online v1.1.17 - 2001/03/18 for EXT2FS 0.5b
new filesystem size 716800
ext2online: group 0, block 4 not reserved

ext2online: unable to resize /dev/rootvg/root past 524288 blocks


------------------------

any suggestions?

todd underwood
vice president & 
   chief technology officer
oso grande technologies, inc.
todd@osogrande.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [linux-lvm] successes & resizing
  2001-05-16  3:21 [linux-lvm] successes & resizing Todd Underwood
@ 2001-05-16 10:10 ` Heinz J. Mauelshagen
  2001-05-16 16:55 ` Andreas Dilger
  1 sibling, 0 replies; 5+ messages in thread
From: Heinz J. Mauelshagen @ 2001-05-16 10:10 UTC (permalink / raw)
  To: linux-lvm

On Tue, May 15, 2001 at 09:21:29PM -0600, Todd Underwood wrote:
> folx, 
> 
> i resolved the problem i posted about last week:  unable to mount root
> device in trying to set up lvmroot using a bootable real ext2 partition
> and initrd. they key (and this maybe a FAQ but i didn't see it) was
> getting my scsi driver loaded into the initrd.  this was as simple as
> unzipping the initrd-lvm-2.4.3.gz file, mouting on the loopback.  copying
> the scsi module into place in /lib/modules and adding a modprobe to
> linuxrc.  after that, all was good.  this may be worth documenting
> somewhere (i was considering taking the existing info about lvm root and
> doing a HOWTO given that i've set it up 5 or 8 times in the last two
> weeks).

I'ld appreciate if you'ld enhance the HOWTO and send it to me in order
to put it up on the web.

> 
> i have a separate question about ext2 resizing on a separate system:  when
> i try to resize the root (using the ext2online resize patch to 2.4.3) i
> get:
> 
> Filesystem           1k-blocks      Used Available Use% Mounted on
> /dev/rootvg/root        495844    250577    219667  54% /
> /dev/rootvg/usr        2590504   1444748   1014072  59% /usr
> /dev/rootvg/home       1032088        20    979640   1% /home
> /dev/rootvg/var         495844    105794    364450  23% /var
> /dev/hda1               101089      6029     89841   7% /boot
> bash-2.04# e2fsadm -L +200M / 
> e2fsadm -- invalid logical volume name "/dev/root"
> 
> 
> e2fsadm [-d|--debug] [-h|--help] [-n|--nofsck]
> 	{[-l|--extents] [+|-]LogicalExtentsNumber |
> 	 [-L|--size] [+|-]LogicalVolumeSize[kKmMgGtT]}
> 	[-t|--test] [-v|--verbose] [--version] LogicalVolumePath
> 
> bash-2.04# e2fsadm -L +200M /dev/rootvg/root 
> lvextend -- extending logical volume "/dev/rootvg/root" to 700 MB
> lvextend -- doing automatic backup of volume group "rootvg"
> lvextend -- logical volume "/dev/rootvg/root" successfully extended
> 
> ext2online v1.1.17 - 2001/03/18 for EXT2FS 0.5b
> new filesystem size 716800
> ext2online: group 0, block 4 not reserved
> 
> ext2online: unable to resize /dev/rootvg/root past 524288 blocks

You only can extent ext2 filesystems within constraints given when you
create them. In particular the block group descriptors are limited.

You could resize that filesystem offline using Ted Tso's resize2fs though.

BTW: your root LV now has 700M which makes me assume that you extended it to
     500M before without extending the fs. You should reduce it to 500M
     after you extended the fs to that size.

Regards,
Heinz    -- The LVM Guy --

> 
> 
> ------------------------
> 
> any suggestions?
> 
> todd underwood
> vice president & 
>    chief technology officer
> oso grande technologies, inc.
> todd@osogrande.com
> 
> 
> _______________________________________________
> linux-lvm mailing list
> linux-lvm@sistina.com
> http://lists.sistina.com/mailman/listinfo/linux-lvm

*** 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] 5+ messages in thread

* Re: [linux-lvm] successes & resizing
  2001-05-16  3:21 [linux-lvm] successes & resizing Todd Underwood
  2001-05-16 10:10 ` Heinz J. Mauelshagen
@ 2001-05-16 16:55 ` Andreas Dilger
  2001-05-16 21:05   ` Luca Berra
  2001-05-17  0:10   ` Todd Underwood
  1 sibling, 2 replies; 5+ messages in thread
From: Andreas Dilger @ 2001-05-16 16:55 UTC (permalink / raw)
  To: linux-lvm

Todd Underwood writes:
> i have a separate question about ext2 resizing on a separate system:  when
> i try to resize the root (using the ext2online resize patch to 2.4.3) i
> get:
> 
> Filesystem           1k-blocks      Used Available Use% Mounted on
> /dev/rootvg/root        495844    250577    219667  54% /
> /dev/rootvg/usr        2590504   1444748   1014072  59% /usr
> /dev/rootvg/home       1032088        20    979640   1% /home
> /dev/rootvg/var         495844    105794    364450  23% /var
> /dev/hda1               101089      6029     89841   7% /boot
> bash-2.04# e2fsadm -L +200M / 
> e2fsadm -- invalid logical volume name "/dev/root"

That is because in /proc/mounts, "/" is pointing to "/dev/root".  Sorry,
not much I can do about that - you need to specify the real device name
for root.

> bash-2.04# e2fsadm -L +200M /dev/rootvg/root 
> lvextend -- extending logical volume "/dev/rootvg/root" to 700 MB
> lvextend -- doing automatic backup of volume group "rootvg"
> lvextend -- logical volume "/dev/rootvg/root" successfully extended
> 
> ext2online v1.1.17 - 2001/03/18 for EXT2FS 0.5b
> new filesystem size 716800
> ext2online: group 0, block 4 not reserved
> 
> ext2online: unable to resize /dev/rootvg/root past 524288 blocks

Yes, please see ext2prepare(8) or ext2online(8), starting with the
paragraph "Because of the original design of the ext2 filesystem...
there are certain limitations to the amount of resizing that can be
done online..."  Clearly, you have a 1kB block filesystem for root,
because it started life at (just) less than 512MB in size.  You
could still online resize up to the 512MB limit without any other action.

To increase the filesystem size past 512MB, you need to (unfortunately)
boot from a rescue floppy which supports LVM so you can play with the
unmounted root filesystem (you may be able to simply change the LVM
initrd to go to a shell instead of booting the system... maybe that should
be an option for lvmcreate_initrd?).

Use ext2resize to resize the root filesystem to fill the current LV
(just run it with no size parameter will do the trick).

ALSO, run ext2prepare on the filesystem to prepare it for some nice
large size like 8GB (or whatever) so that the next time you need to do
online resizing of that filesystem you can do so (up to 8GB at least).
Don't make it _too_ large on a 1kB filesystem, as it starts sucking up
space at an increasing rate.

You should do this on your other filesystems as well, while you are there,
so that you don't run into the problem again later (for non-root fs it is
easier to fix, but still is a hassle if you can't unmount the fs).

For 4kB block filesystems, you may as well prepare them for 256GB or
whatever your max LV size is, it only costs a couple of kB in filesystem
space (ok, maybe 1MB or so, depending on the current filesystem size).
Use "dumpe2fs -h <dev>" to see the block size of the filesystems.

Cheers, Andreas
-- 
Andreas Dilger  \ "If a man ate a pound of pasta and a pound of antipasto,
                 \  would they cancel out, leaving him still hungry?"
http://www-mddsp.enel.ucalgary.ca/People/adilger/               -- Dogbert

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [linux-lvm] successes & resizing
  2001-05-16 16:55 ` Andreas Dilger
@ 2001-05-16 21:05   ` Luca Berra
  2001-05-17  0:10   ` Todd Underwood
  1 sibling, 0 replies; 5+ messages in thread
From: Luca Berra @ 2001-05-16 21:05 UTC (permalink / raw)
  To: linux-lvm

On Wed, May 16, 2001 at 10:55:53AM -0600, Andreas Dilger wrote:
> Todd Underwood writes:
> > i have a separate question about ext2 resizing on a separate system:  when
> > i try to resize the root (using the ext2online resize patch to 2.4.3) i
> > get:
...
> > bash-2.04# e2fsadm -L +200M / 
> > e2fsadm -- invalid logical volume name "/dev/root"
> 
> That is because in /proc/mounts, "/" is pointing to "/dev/root".  Sorry,
> not much I can do about that - you need to specify the real device name
> for root.

curious, my /proc/mounts is correct wrt device names
i have:
[vc/2]root@Moskowskaya:~# cat /proc/mounts
/dev/vg01/lvol1 / ext2 rw 0 0
....

could this be due to the LVM_HD_NAME that was rejected from the kernel
some time ago?

L.

-- 
Luca Berra -- bluca@comedia.it
        Communication Media & Services S.r.l.
 /"\
 \ /     ASCII RIBBON CAMPAIGN
  X        AGAINST HTML MAIL
 / \

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [linux-lvm] successes & resizing
  2001-05-16 16:55 ` Andreas Dilger
  2001-05-16 21:05   ` Luca Berra
@ 2001-05-17  0:10   ` Todd Underwood
  1 sibling, 0 replies; 5+ messages in thread
From: Todd Underwood @ 2001-05-17  0:10 UTC (permalink / raw)
  To: linux-lvm

andreas,

as usual, thanks for the cogent, complete and useful reply.  i suspected
there were size limitations related to the options supplied to mke2fs at
create time.  i'll work with the filesystem offline to prepare it for
bigger sizes.

e2fsadm and ext2online are excellent tools and i highly recommend them.

thanks,

todd underwood
vice president & 
   chief technology officer
oso grande technologies, inc.
todd@osogrande.com

On Wed, 16 May 2001, Andreas Dilger wrote:

> Date: Wed, 16 May 2001 10:55:53 -0600 (MDT)
> From: Andreas Dilger <adilger@turbolinux.com>
> Reply-To: linux-lvm@sistina.com
> To: linux-lvm@sistina.com
> Subject: Re: [linux-lvm] successes & resizing
> 
> Todd Underwood writes:
> > i have a separate question about ext2 resizing on a separate system:  when
> > i try to resize the root (using the ext2online resize patch to 2.4.3) i
> > get:
> > 
> > Filesystem           1k-blocks      Used Available Use% Mounted on
> > /dev/rootvg/root        495844    250577    219667  54% /
> > /dev/rootvg/usr        2590504   1444748   1014072  59% /usr
> > /dev/rootvg/home       1032088        20    979640   1% /home
> > /dev/rootvg/var         495844    105794    364450  23% /var
> > /dev/hda1               101089      6029     89841   7% /boot
> > bash-2.04# e2fsadm -L +200M / 
> > e2fsadm -- invalid logical volume name "/dev/root"
> 
> That is because in /proc/mounts, "/" is pointing to "/dev/root".  Sorry,
> not much I can do about that - you need to specify the real device name
> for root.
> 
> > bash-2.04# e2fsadm -L +200M /dev/rootvg/root 
> > lvextend -- extending logical volume "/dev/rootvg/root" to 700 MB
> > lvextend -- doing automatic backup of volume group "rootvg"
> > lvextend -- logical volume "/dev/rootvg/root" successfully extended
> > 
> > ext2online v1.1.17 - 2001/03/18 for EXT2FS 0.5b
> > new filesystem size 716800
> > ext2online: group 0, block 4 not reserved
> > 
> > ext2online: unable to resize /dev/rootvg/root past 524288 blocks
> 
> Yes, please see ext2prepare(8) or ext2online(8), starting with the
> paragraph "Because of the original design of the ext2 filesystem...
> there are certain limitations to the amount of resizing that can be
> done online..."  Clearly, you have a 1kB block filesystem for root,
> because it started life at (just) less than 512MB in size.  You
> could still online resize up to the 512MB limit without any other action.
> 
> To increase the filesystem size past 512MB, you need to (unfortunately)
> boot from a rescue floppy which supports LVM so you can play with the
> unmounted root filesystem (you may be able to simply change the LVM
> initrd to go to a shell instead of booting the system... maybe that should
> be an option for lvmcreate_initrd?).
> 
> Use ext2resize to resize the root filesystem to fill the current LV
> (just run it with no size parameter will do the trick).
> 
> ALSO, run ext2prepare on the filesystem to prepare it for some nice
> large size like 8GB (or whatever) so that the next time you need to do
> online resizing of that filesystem you can do so (up to 8GB at least).
> Don't make it _too_ large on a 1kB filesystem, as it starts sucking up
> space at an increasing rate.
> 
> You should do this on your other filesystems as well, while you are there,
> so that you don't run into the problem again later (for non-root fs it is
> easier to fix, but still is a hassle if you can't unmount the fs).
> 
> For 4kB block filesystems, you may as well prepare them for 256GB or
> whatever your max LV size is, it only costs a couple of kB in filesystem
> space (ok, maybe 1MB or so, depending on the current filesystem size).
> Use "dumpe2fs -h <dev>" to see the block size of the filesystems.
> 
> Cheers, Andreas
> -- 
> Andreas Dilger  \ "If a man ate a pound of pasta and a pound of antipasto,
>                  \  would they cancel out, leaving him still hungry?"
> http://www-mddsp.enel.ucalgary.ca/People/adilger/               -- Dogbert
> _______________________________________________
> linux-lvm mailing list
> linux-lvm@sistina.com
> http://lists.sistina.com/mailman/listinfo/linux-lvm
> 
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2001-05-17  0:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-05-16  3:21 [linux-lvm] successes & resizing Todd Underwood
2001-05-16 10:10 ` Heinz J. Mauelshagen
2001-05-16 16:55 ` Andreas Dilger
2001-05-16 21:05   ` Luca Berra
2001-05-17  0:10   ` Todd Underwood

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.