All of lore.kernel.org
 help / color / mirror / Atom feed
* [linux-lvm] Generic resize tool
@ 2000-08-01 18:42 Andreas Dilger
  2000-08-01 19:53 ` Eric M. Hopper
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Andreas Dilger @ 2000-08-01 18:42 UTC (permalink / raw)
  To: Linux LVM mailing list

Hello,
I'm wondering if people are interested in having a more generic resize tool
than the current e2fsadm.  I've updated e2fsadm to have support for the
GNU ext2resize tools (ext2resize and ext2online) in addition to resize2fs,
but I was wondering about adding support for reiserfs resizing as well.
At this point e2fsadm isn't a very good name for it anymore.

I was thinking if renaming it to "chfs" the same as AIX LVM tool which
handles both LV and FS resizing, among other things, and does not sound
fs-specific.

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

* Re: [linux-lvm] Generic resize tool
  2000-08-01 18:42 [linux-lvm] Generic resize tool Andreas Dilger
@ 2000-08-01 19:53 ` Eric M. Hopper
  2000-08-01 21:11   ` Mark Allen
  2000-08-02  3:23 ` Dale Kemp
  2000-08-02 10:04 ` Jens Benecke
  2 siblings, 1 reply; 7+ messages in thread
From: Eric M. Hopper @ 2000-08-01 19:53 UTC (permalink / raw)
  To: Linux LVM mailing list

[-- Attachment #1: Type: text/plain, Size: 1414 bytes --]

On Tue, Aug 01, 2000 at 12:42:38PM -0600, Andreas Dilger wrote:
> Hello,
> I'm wondering if people are interested in having a more generic resize
> tool than the current e2fsadm.  I've updated e2fsadm to have support
> for the GNU ext2resize tools (ext2resize and ext2online) in addition
> to resize2fs, but I was wondering about adding support for reiserfs
> resizing as well.  At this point e2fsadm isn't a very good name for it
> anymore.
> 
> I was thinking if renaming it to "chfs" the same as AIX LVM tool which
> handles both LV and FS resizing, among other things, and does not
> sound fs-specific.

	I would expect that chfs would allow you to change a partition
from ext2 to reiserfs, and maybe change the size in the bargain.

	I like resizefs better.  It could also be fsresize.  It depends
on whether you like the mkfs, or fsck traditions better.  Of course, you
could just call it 'resize' like mount calls itself 'mount'.  But,
there's already a X program called 'resize' for resetting your TERMCAP
variable and stty settings after xterm resizes.

Have fun (if at all possible),
-- 
Its name is Public Opinion.  It is held in reverence. It settles everything.
Some think it is the voice of God.  Loyalty to petrified opinion never yet
broke a chain or freed a human soul.     ---Mark Twain
-- Eric Hopper (hopper@omnifarious.mn.org http://www.omnifarious.org/~hopper) --

[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]

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

* Re: [linux-lvm] Generic resize tool
  2000-08-01 19:53 ` Eric M. Hopper
@ 2000-08-01 21:11   ` Mark Allen
  0 siblings, 0 replies; 7+ messages in thread
From: Mark Allen @ 2000-08-01 21:11 UTC (permalink / raw)
  To: Eric M. Hopper; +Cc: Linux LVM mailing list

"Eric M. Hopper" wrote:
> 
> On Tue, Aug 01, 2000 at 12:42:38PM -0600, Andreas Dilger wrote:
> > Hello,
> > I'm wondering if people are interested in having a more generic resize
> > tool than the current e2fsadm.  I've updated e2fsadm to have support
> > for the GNU ext2resize tools (ext2resize and ext2online) in addition
> > to resize2fs, but I was wondering about adding support for reiserfs
> > resizing as well.  At this point e2fsadm isn't a very good name for it
> > anymore.
> >
> > I was thinking if renaming it to "chfs" the same as AIX LVM tool which
> > handles both LV and FS resizing, among other things, and does not
> > sound fs-specific.
> 
>         I would expect that chfs would allow you to change a partition
> from ext2 to reiserfs, and maybe change the size in the bargain.
> 
>         I like resizefs better.  It could also be fsresize.  It depends
> on whether you like the mkfs, or fsck traditions better.  Of course, you
> could just call it 'resize' like mount calls itself 'mount'.  But,
> there's already a X program called 'resize' for resetting your TERMCAP
> variable and stty settings after xterm resizes.

There is also the GNU "parted" utility which already has a nice API and
stuff for resizing FAT partitions. It needs help "moving" ext2
partitions (specifically, moving the first sectors of an ext2 filesystem
suck) and it would be nice to collect all other functionality like
dealing with reiserfs and LVMs into one place, one library.  The
project's homepage is http://www.gnu.org/software/parted .

Andrew Clausen is the project leader. I'm sure he wouldn't turn away an
offer of help. :-)

Mark

--
mallen@tuxtops.com
http://www.tuxtops.com
Tuxtops: the Linux on Laptops company

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

* Re: [linux-lvm] Generic resize tool
  2000-08-01 18:42 [linux-lvm] Generic resize tool Andreas Dilger
  2000-08-01 19:53 ` Eric M. Hopper
@ 2000-08-02  3:23 ` Dale Kemp
  2000-08-02 10:04 ` Jens Benecke
  2 siblings, 0 replies; 7+ messages in thread
From: Dale Kemp @ 2000-08-02  3:23 UTC (permalink / raw)
  To: Linux LVM

Andreas Dilger wrote:

> Hello,
> I'm wondering if people are interested in having a more generic resize tool
> than the current e2fsadm.  I've updated e2fsadm to have support for the
> GNU ext2resize tools (ext2resize and ext2online) in addition to resize2fs,
> but I was wondering about adding support for reiserfs resizing as well.
> At this point e2fsadm isn't a very good name for it anymore.
>
> I was thinking if renaming it to "chfs" the same as AIX LVM tool which
> handles both LV and FS resizing, among other things, and does not sound
> fs-specific.
>
> Cheers, Andreas

Earlier in discusions I suggested some common ground between volume
managers and filesystems, so that we can move forward in this area.

For the resize situation I suggest a simular way to mkfs which simply adds
a dot extension for each program, ie.

mkfs -t ext2    calls mkfs.ext2
mkfs -t minux calls mkfs.minux

I suggest we simply have:

resizefs -t ext2    calls resizefs.ext2
resizefs -t jfs calls resizefs.jfs

(Note resizefs.jfs can have its own unique options just like mkfs.<X> has,
all thats needed are some common elements)

Here we need a common set of options for resizing across all filesystems,
eg. --size [+|-]X[G|M|k]

eg.

resizefs -t ext2  --size +50M <partiton>

However we need volumes not just partitions.

resizevol -l lvm -t ext2 --size +50M /dev/lvm/lvol1

or,

resizevol -l ibmlvms -t jfs --size +50M lvol4

Exactly how this is implemented I haven't given too much thought,
but I would like IBM, SGI and LVM team get together on this but maybe
I'm dreaming again... Are you listening IBM? Lets get it tidy now not
later. I'm not asking IBM to give up there JFS/LVMS port (which is a very
good idea) I'm asking them to help work towards a better solution for
linux in general. If "chfs" is generic enough then we can make that the
"linux standard".

-- Dale.

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

* Re: [linux-lvm] Generic resize tool
  2000-08-01 18:42 [linux-lvm] Generic resize tool Andreas Dilger
  2000-08-01 19:53 ` Eric M. Hopper
  2000-08-02  3:23 ` Dale Kemp
@ 2000-08-02 10:04 ` Jens Benecke
  2000-08-02 17:55   ` Andreas Dilger
  2 siblings, 1 reply; 7+ messages in thread
From: Jens Benecke @ 2000-08-02 10:04 UTC (permalink / raw)
  To: Linux LVM mailing list

[-- Attachment #1: Type: text/plain, Size: 1216 bytes --]

On Tue, Aug 01, 2000 at 12:42:38PM -0600, Andreas Dilger wrote:

> Hello, I'm wondering if people are interested in having a more generic
> resize tool than the current e2fsadm.  I've updated e2fsadm to have
> support for the GNU ext2resize tools (ext2resize and ext2online) in
> addition to resize2fs, but I was wondering about adding support for
> reiserfs resizing as well.  At this point e2fsadm isn't a very good name
> for it anymore.
 
One suggestion, also for Heinz: PLEASE put a notice into "lvresize" that
you might actually be better off with e2fsadm, if the lv is formatted ext2.
So that you use

	pvcreate
	vgextend
	e2fsadm

instead of

	pvcreate
	vgextend
	lvextend

and then being stuck with not knowing how (and how much) to resize the FS
within.


Another question: If I shrink a LV, how do I know what PVs in the VG get
freed? i.e. I have  one big LV in VG00 = (hda1 hdb2 hdc1)  and I want to
remove hdb2 out of the VG. 


-- 
ciao, Jens (mailaddr im Header)                 http://www.pinguin.conetix.de
"Schiebe nie etwas auf Boshaftigkeit, was           http://www.hitch-hiker.de
ausreichend durch Dummheit erklärt werden kann."       http://www.linuxfaq.de

[-- Attachment #2: Type: application/pgp-signature, Size: 524 bytes --]

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

* Re: [linux-lvm] Generic resize tool
  2000-08-02 10:04 ` Jens Benecke
@ 2000-08-02 17:55   ` Andreas Dilger
  2000-08-03 19:26     ` Jens Benecke
  0 siblings, 1 reply; 7+ messages in thread
From: Andreas Dilger @ 2000-08-02 17:55 UTC (permalink / raw)
  To: Jens Benecke; +Cc: Linux LVM mailing list

Jens writes:
> One suggestion, also for Heinz: PLEASE put a notice into "lvresize" that
> you might actually be better off with e2fsadm, if the lv is formatted ext2.
> So that you use
> 
> 	pvcreate
> 	vgextend
> 	e2fsadm
> 
> instead of
> 
> 	pvcreate
> 	vgextend
> 	lvextend
> 
> and then being stuck with not knowing how (and how much) to resize the FS
> within.

Actually, the resize tools for ext2 (resize2fs, ext2resize, ext2online) will
all figure out the size of the device, so if you are resizing to the
full device size (the most common case) then you don't need to specify
the device size at all.

> Another question: If I shrink a LV, how do I know what PVs in the VG get
> freed? i.e. I have  one big LV in VG00 = (hda1 hdb2 hdc1)  and I want to
> remove hdb2 out of the VG. 

They are always taken from the end of the LV.  There is no other way to do
it.  What you would need to do is shrink the lv(s) enough to have free
PEs equal to the number of PEs on hdb2.  Then migrate any in-use PEs on
hdb2 to the other PVs using pvmove.

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

* Re: [linux-lvm] Generic resize tool
  2000-08-02 17:55   ` Andreas Dilger
@ 2000-08-03 19:26     ` Jens Benecke
  0 siblings, 0 replies; 7+ messages in thread
From: Jens Benecke @ 2000-08-03 19:26 UTC (permalink / raw)
  To: Andreas Dilger; +Cc: Linux LVM mailing list

On Wed, Aug 02, 2000 at 11:55:02AM -0600, Andreas Dilger wrote:
> Jens writes:
> > ... and then being stuck with not knowing how (and how much) to resize
> > the FS within.
> Actually, the resize tools for ext2 (resize2fs, ext2resize, ext2online)
> will all figure out the size of the device, so if you are resizing to the
> full device size (the most common case) then you don't need to specify
> the device size at all.

Yes, I realized that, but it doesn't SAY so anywhere.

See, I am trying to stay non-knowledgeable (or "semi-") for as long as
possible to be able to see beginner's problems and mistakes. If I really
dive into the stuff I will surely be able to solve any problem by
experimenting around, but that is not my short-term goal - rather, to
discover first-usage inconsistencies and misunderstandings and explain
them.

It's not functionality, its usability I'm worried about.
 
> > Another question: If I shrink a LV, how do I know what PVs in the VG
> > get freed? i.e. I have  one big LV in VG00 = (hda1 hdb2 hdc1)  and I
> > want to remove hdb2 out of the VG. 
> They are always taken from the end of the LV.  There is no other way to
> do it.  What you would need to do is shrink the lv(s) enough to have free
> PEs equal to the number of PEs on hdb2.  Then migrate any in-use PEs on
> hdb2 to the other PVs using pvmove.

Sounds logical. Thanks for pointing this out. :)

I guess in time, there will be a set of tools that allow you to point to a
PV and say "Remove this!" and everything else will be automagic. [just as
an example, of course there are just too many ways of combining the
available tools, to write a new tool for every specific task.]
 

-- 
ciao, Jens (mailaddr im Header)                 http://www.pinguin.conetix.de
"Schiebe nie etwas auf Boshaftigkeit, was           http://www.hitch-hiker.de
ausreichend durch Dummheit erkl�rt werden kann."       http://www.linuxfaq.de

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

end of thread, other threads:[~2000-08-03 19:26 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-08-01 18:42 [linux-lvm] Generic resize tool Andreas Dilger
2000-08-01 19:53 ` Eric M. Hopper
2000-08-01 21:11   ` Mark Allen
2000-08-02  3:23 ` Dale Kemp
2000-08-02 10:04 ` Jens Benecke
2000-08-02 17:55   ` Andreas Dilger
2000-08-03 19:26     ` Jens Benecke

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.