linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
* [linux-lvm] repair "lvextend-instead-of-e2fsadm" usage
@ 2000-08-01 16:20 Jens Benecke
  0 siblings, 0 replies; 3+ messages in thread
From: Jens Benecke @ 2000-08-01 16:20 UTC (permalink / raw)
  To: LVM List

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

Hi,

thanks to all for the last hints ... it works (sort of). Now I've done
something stupid - I've installed a new HDD and

	pvcreate /dev/hdb1
	vgextend /dev/vg01 /dev/hdb1
	vgdisplay /dev/vg01           -> 3737 free 4MB extents
	lvextend +l 3737 /dev/vg01/home

instead of using "e2fsadm" to resize the file system as well.

Is there a way to use resize2fs to get the same result, or would I have to
(can I?) "lvreduce -l -3737 ..." the volume group first? How does the
"reducing" work, does it just cut off the end?


The Trouble Is(tm), umounting the /home partition would include explaining
to 200 scientists why and how long they cannot access their precious data,
and I *really* don't want to go into details here. =;()


Thanks!

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

* Re: [linux-lvm] repair "lvextend-instead-of-e2fsadm" usage
  2000-08-01 17:04 Andreas Dilger
@ 2000-08-01 18:21 ` Jens Benecke
  0 siblings, 0 replies; 3+ messages in thread
From: Jens Benecke @ 2000-08-01 18:21 UTC (permalink / raw)
  To: Linux LVM mailing list

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

On Tue, Aug 01, 2000 at 11:04:27AM -0600, Andreas Dilger wrote:
> Jens, writes:

> > ...  The Trouble Is(tm), umounting the /home partition would include
> > explaining to 200 scientists why and how long they cannot access their
> > precious data, and I *really* don't want to go into details here. =;()
 
> resize2fs /dev/vg01/home

That's what I did. I managed to shutdown the database and umount /home and
do this by staying at work till 8pm =;()

Thanks. :)
 
> (i.e. don't specify the size) and it will extend the filesystem to the
> full size of the partition.  Note that using resize2fs will be much
> faster than doing e2fsadm, because you don't really need an fsck before
> doing the resize, but e2fsadm does it anyways.

well... resize2fs told me I should check the FS, and because this is
production data, I did it. Just to be sure.
 
> If you have the online resize patch in your kernel already, but didn't do

I didn't even know it existed. =;)

> I have updated e2fsadm to call either ext2online or (resize2fs or
> ext2resize) depending on what is available and if the filesystem is
> mounted or not.  I will send a patch to linux-lvm shortly.

OK. Great work :)

What I am still somewhat missing in LVM is "cosmetics".  I suppose there is
no easy way to integrate all those tools into one consistent UI (needn't be
"G"UI) so that they are not used in the wrong order ... or is there?
 

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

* Re: [linux-lvm] repair "lvextend-instead-of-e2fsadm" usage
@ 2000-08-01 17:04 Andreas Dilger
  2000-08-01 18:21 ` Jens Benecke
  0 siblings, 1 reply; 3+ messages in thread
From: Andreas Dilger @ 2000-08-01 17:04 UTC (permalink / raw)
  To: Linux LVM mailing list

Jens, writes:
> thanks to all for the last hints ... it works (sort of). Now I've done
> something stupid - I've installed a new HDD and
> 
> 	pvcreate /dev/hdb1
> 	vgextend /dev/vg01 /dev/hdb1
> 	vgdisplay /dev/vg01           -> 3737 free 4MB extents
> 	lvextend +l 3737 /dev/vg01/home
> 
> instead of using "e2fsadm" to resize the file system as well.
> 
> Is there a way to use resize2fs to get the same result, or would I have to
> (can I?) "lvreduce -l -3737 ..." the volume group first? How does the
> "reducing" work, does it just cut off the end?
> 
> The Trouble Is(tm), umounting the /home partition would include explaining
> to 200 scientists why and how long they cannot access their precious data,
> and I *really* don't want to go into details here. =;()

In either case, you will still have to unmount the filesystem in order to
do the resize, unless you have my online resize patch in your kernel
already.

If you _unmount_ your filesystem, you can simply use:

resize2fs /dev/vg01/home

(i.e. don't specify the size) and it will extend the filesystem to the
full size of the partition.  Note that using resize2fs will be much
faster than doing e2fsadm, because you don't really need an fsck before
doing the resize, but e2fsadm does it anyways.

If you have the online resize patch in your kernel already, but didn't do
a "prepare" on the filesystem for resizing, you will still be able to do
a resize to the next 16GB boundary, which may or may not be enough to use
up all of the newly allocated PEs.

I have updated e2fsadm to call either ext2online or (resize2fs or ext2resize)
depending on what is available and if the filesystem is mounted or not.
I will send a patch to linux-lvm shortly.

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

end of thread, other threads:[~2000-08-01 18:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-08-01 16:20 [linux-lvm] repair "lvextend-instead-of-e2fsadm" usage Jens Benecke
2000-08-01 17:04 Andreas Dilger
2000-08-01 18:21 ` Jens Benecke

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).