All of lore.kernel.org
 help / color / mirror / Atom feed
* [linux-lvm] LVM2: Problems with "lvextend" on device with mounted filesystem
@ 2003-11-28  8:21 Uli Heller
  2003-12-01  7:57 ` Wolfgang Weisselberg
  0 siblings, 1 reply; 6+ messages in thread
From: Uli Heller @ 2003-11-28  8:21 UTC (permalink / raw)
  To: linux-lvm

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

I'm using LVM1 for quite a while now and it works fine with me.
This week, I tried to use linux-2.6.0-test11 so I had to move to
LVM2 and device mapper. It works - at least partially.

A) works OK for all existing LVs
B) online resizing does not work

At first, I thought that "reiserfs" might be responsible for
this. But after some tests, I don't think so any more.
Here is what i did to test:

1) Create a new logical volume:
~   lvcreate -L 100M -n ulilv systemvg
2) Display this new LV:
~   lvdisplay -c /dev/systemvg/ulilv
~     /dev/systemvg/ulilv:systemvg:3:1:-1:0:204800:25:-1:0:0:254:5
3) Try to write right behind the end of the LV:
~   dd if=/dev/zero of=/dev/systemvg/ulilv seek=204800 bs=512 count=5
~   dd: writing `/dev/systemvg/ulilv': No space left on device
~   1+0 records in
~   0+0 records out
~   --> This error message is OK
4) Extend the LV:
~   lvextend -L +100M /dev/systemvg/ulilv
5) Repeat step 3
~   dd if=/dev/zero of=/dev/systemvg/ulilv seek=204800 bs=512 count=5
~   5+0 records in
~   5+0 records out
~   --> OK, now the LV is large enough
6) Remove the LV
~   lvremove -f /dev/systemvg/ulilv

As expected - you might think.
Now a slight variation:

1 and 2) Like above
2.5)     Create and mount a file system on the LV:
~   mkreiserfs -f /dev/systemvg/ulilv
~   mount /dev/systemvg/ulilv /mnt
3,4,5)   Like above **BUT** step 5 now produces the same
~   error message as step 3! You have to "umount /mnt"
~   in order to be able to access the enlarged portion
~   of the LV.

I checked it with
- - linux-2.6.0-test11
- - linux-2.6.0-test5 (from SuSE-9.0)
and with "mkreiserfs" and with "mke2fs" on step 2.5).
Everything produces the same result.

With lvm1 and linux-2.4.21 from the rescue system
of SuSe-9.0 it works as expected (= no error message
on step 5).

I upgraded to
- - lvm2-2.00.08
- - device-mapper-1.00.07
but the error still exists.

Then I migrated to the new metadata format
with "vgconvert -M2 systemvg" but the error
still exists.

Thanks for any ideas/suggestions...

- --
Mit frohem Gru�e, Uli Heller

daemons point, Gesellschaft f�r Datenverarbeitung mbH
Zahn-Nopper-Str. 1-3                 Phone: +49-711-806708-0
70435 Stuttgart                      Fax:   +49-711-806708-19
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE/x1fKsi63wwMPCzwRAtYvAJ0byNDnlDga98nhBs/KNkVMMh98fQCgqO/T
/xwaHtQnvm8e88Zg+kflmYI=
=fZsA
-----END PGP SIGNATURE-----

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

* Re: [linux-lvm] LVM2: Problems with "lvextend" on device with mounted filesystem
  2003-11-28  8:21 [linux-lvm] LVM2: Problems with "lvextend" on device with mounted filesystem Uli Heller
@ 2003-12-01  7:57 ` Wolfgang Weisselberg
  0 siblings, 0 replies; 6+ messages in thread
From: Wolfgang Weisselberg @ 2003-12-01  7:57 UTC (permalink / raw)
  To: linux-lvm

Uli Heller wrote 90 lines:

[resorted, cut, mangled ...]
> 1) Create a new logical volume:
> 2) Display this new LV:
> 2.5)     Create and mount a file system on the LV:
> 3) Try to write right behind the end of the LV:
> ~   --> This error message is OK
> 4) Extend the LV:
> 5) Repeat step 3
[which generates an error]

> 3,4,5)   Like above **BUT** step 5 now produces the same
> ~   error message as step 3! You have to "umount /mnt"
> ~   in order to be able to access the enlarged portion
> ~   of the LV.

You never told reiserfs that it's partition had increased.  AFAIK
you can either remount it with the correct parameters or use some
tool to alert it.

-Wolfgang

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

* [linux-lvm] LVM2: Problems with "lvextend" on device with mounted filesystem
@ 2003-12-02  2:10 Uli Heller
  0 siblings, 0 replies; 6+ messages in thread
From: Uli Heller @ 2003-12-02  2:10 UTC (permalink / raw)
  To: linux-lvm

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

|
| You never told reiserfs that it's partition had increased.  AFAIK
| you can either remount it with the correct parameters or use some
| tool to alert it.
|
| -Wolfgang

Thank you for your reply!
I think you're pretty near to the point but you didn't
get it. Perhaps my explanation was to sparse.

At first, I tried to do the usual steps:
- - lvextend ...
- - resize_reiserfs ...
This did not work. So I was unsure if it is an error
in "reiserfs" or in LVM.

So I tried to figure out another test. The key point of
my test is to use the command "dd" to try to write some data
into the extended part of the LV.

Here is the result:
1. unused LVs (= not used by a mounted filesystem):
	You can write into the extended part immediately
	after executung "lvextend"
2. used LVs (= used by a mounted filesystem):
	You can not write into the extended part at first!
	You have to "umount" the filesystem!
This is true for linux-2.6.0-test11 and 2.6.0-test5
and LVM2. It is not true for linux-2.4.22-ac4 and LVM1
and various older versions. You can write into the extended
part immediately after executing "lvextend", no matter
wheather the LV is mounted or not.

I think that because of error 2 (it's an
error in my current opinion but perhaps I'm wrong),
I'm not able to do an online resize of the filesystem.

- --
Mit frohem Gru�e, Uli Heller
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE/zEbzsi63wwMPCzwRAox4AJ9c9E+wVzYyOcPjRENWjse6UZ7y9wCfZIUu
Hx6tLFNuJAq5S+e60uu4+JI=
=PE2B
-----END PGP SIGNATURE-----

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

* [linux-lvm] LVM2: Problems with "lvextend" on device with mounted filesystem
@ 2003-12-26 15:45 Piotr Kaczuba
  2003-12-26 21:01 ` Christophe Saout
  0 siblings, 1 reply; 6+ messages in thread
From: Piotr Kaczuba @ 2003-12-26 15:45 UTC (permalink / raw)
  To: linux-lvm

I can confirm this problem; I'm also not able to resize online a  
reiserfs filesystem since i've upgraded to kernel 2.6 and lvm2.  
resize_reiserfs says "run reiserfsck --check first" but reiserfsck  
detects no problems. Offline resizing works without any complaints. Lvm  
and reiserfs partitions were set up with linux 2.4 and lvm1 and back  
then online resizing was no big deal, but then I migrated to 2.6 and  
lvm2 and now I have always to unmount the partition first before  
resizing the filesystem wich is really annoying. lvmextend itself seems  
to do its job well, but then again only kernel and lvm have changed  
before the trouble has started. I didn't find any hints on the web  
about this issue but this thread on linux-lvm.

Piotr Kaczuba

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

* Re: [linux-lvm] LVM2: Problems with "lvextend" on device with mounted filesystem
  2003-12-26 15:45 Piotr Kaczuba
@ 2003-12-26 21:01 ` Christophe Saout
  0 siblings, 0 replies; 6+ messages in thread
From: Christophe Saout @ 2003-12-26 21:01 UTC (permalink / raw)
  To: linux-lvm; +Cc: Piotr Kaczuba

Am Fr, den 26.12.2003 schrieb Piotr Kaczuba um 22:44:

> I can confirm this problem; I'm also not able to resize online a  
> reiserfs filesystem since i've upgraded to kernel 2.6 and lvm2. 
> [...]

Known problem in vanilla 2.6, fixed in 2.6.0-mm1. The specific fix is:

http://people.sistina.com/~thornber/patches/2.6-stable/2.6.0-test10/2.6.0-test10-dm1/00001.patch

(the other patches in that directory don't hurt either, that's why it's
called stable ;))

--
Christophe Saout <christophe@saout.de>
Please avoid sending me Word or PowerPoint attachments.
See http://www.fsf.org/philosophy/no-word-attachments.html

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

* [linux-lvm] LVM2: Problems with "lvextend" on device with mounted filesystem
@ 2003-12-29  7:51 Piotr Kaczuba
  0 siblings, 0 replies; 6+ messages in thread
From: Piotr Kaczuba @ 2003-12-29  7:51 UTC (permalink / raw)
  To: linux-lvm

I can confirm this problem; I'm also not able to resize online a  
reiserfs filesystem since i've upgraded to kernel 2.6 and lvm2.  
resize_reiserfs says "run reiserfsck --check first" but reiserfsck  
detects no problems. Offline resizing works without any complaints. Lvm  
and reiserfs partitions were set up with linux 2.4 and lvm1 and back  
then online resizing was no big deal, but then I migrated to 2.6 and  
lvm2 and now I have always to unmount the partition first before  
resizing the filesystem wich is really annoying. lvmextend itself seems  
to do its job well, but then again only kernel and lvm have changed  
before the trouble has started. I didn't find any hints on the web  
about this issue but this thread on linux-lvm.

Piotr Kaczuba

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

end of thread, other threads:[~2003-12-29  7:51 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-11-28  8:21 [linux-lvm] LVM2: Problems with "lvextend" on device with mounted filesystem Uli Heller
2003-12-01  7:57 ` Wolfgang Weisselberg
  -- strict thread matches above, loose matches on Subject: below --
2003-12-02  2:10 Uli Heller
2003-12-26 15:45 Piotr Kaczuba
2003-12-26 21:01 ` Christophe Saout
2003-12-29  7:51 Piotr Kaczuba

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.