* [linux-lvm] Strange...
@ 2000-08-29 7:18 Ulf Bartelt
2000-08-29 16:22 ` [linux-lvm] Dazed & Confused Andreas Dilger
2000-08-29 17:58 ` [linux-lvm] Strange Nils Juergens
0 siblings, 2 replies; 11+ messages in thread
From: Ulf Bartelt @ 2000-08-29 7:18 UTC (permalink / raw)
To: linux-lvm
Hi!
I just wanted to resize /home/ftp...
Here is what happened:
(root@kira:/0)~# mount
/dev/hda2 on / type ext2 (rw,errors=remount-ro)
proc on /proc type proc (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/hda1 on /boot type ext2 (rw,errors=remount-ro)
/dev/vgkira/tmp on /tmp type ext2 (rw,errors=remount-ro)
/dev/vgkira/usr on /usr type ext2 (rw,errors=remount-ro)
/dev/vgkira/var on /var type ext2 (rw,errors=remount-ro)
/dev/vgkira/opt on /opt type ext2 (rw,errors=remount-ro)
/dev/vgkira/home on /home type ext2 (rw,errors=remount-ro)
/dev/vgkira/ftp on /home/ftp type ext2 (ro,errors=remount-ro)
/dev/vgkira/install on /home/ftp/install type ext2
(rw,errors=remount-ro)
/dev/vgkira/ftp2 on /home/ftp2 type ext2 (rw,errors=remount-ro)
/dev/vgkira/sys on /sys type ext2 (rw,errors=remount-ro)
(root@kira:/0)~# umount /home/ftp/install/
(root@kira:/0)~# umount /home/ftp
(root@kira:/0)~# e2fsadm -L+1G /dev/vgkira/ftp
e2fsadm -- ERROR: "/dev/vgkira/ftp" is mounted on "/home/ftp2"
e2fsadm -- please umount it to resize
(root@kira:/0)~# mount
/dev/hda2 on / type ext2 (rw,errors=remount-ro)
proc on /proc type proc (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/hda1 on /boot type ext2 (rw,errors=remount-ro)
/dev/vgkira/tmp on /tmp type ext2 (rw,errors=remount-ro)
/dev/vgkira/usr on /usr type ext2 (rw,errors=remount-ro)
/dev/vgkira/var on /var type ext2 (rw,errors=remount-ro)
/dev/vgkira/opt on /opt type ext2 (rw,errors=remount-ro)
/dev/vgkira/home on /home type ext2 (rw,errors=remount-ro)
/dev/vgkira/ftp2 on /home/ftp2 type ext2 (rw,errors=remount-ro)
/dev/vgkira/sys on /sys type ext2 (rw,errors=remount-ro)
(root@kira:/0)~#
This happened using lvm-0.7 on a 2.2.13 kernel...
Since the last successfull resize operations, I merged 2 VGs. Formerly
my LVs were spread accross 2 PVs, one per harddisk...
...I see this behaviour for the first time now...
...I retried it after a reboot, but the effect is the same...
...or is it too early in the morning and I�d better get some cups of
coffee??? ;-)
Bye for now...
Ulf.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [linux-lvm] Dazed & Confused
2000-08-29 7:18 [linux-lvm] Strange Ulf Bartelt
@ 2000-08-29 16:22 ` Andreas Dilger
2000-08-29 18:32 ` [linux-lvm] rpm Jan Niehusmann
2000-08-31 18:15 ` [linux-lvm] Dazed & Confused Marcelo Tosatti
2000-08-29 17:58 ` [linux-lvm] Strange Nils Juergens
1 sibling, 2 replies; 11+ messages in thread
From: Andreas Dilger @ 2000-08-29 16:22 UTC (permalink / raw)
To: Ulf Bartelt
Cc: linux-lvm, "Paul Jakma", paul, "Brian Poole", raj,
"David Mallette", malletted
Ulf Bartelt writes:
> /dev/vgkira/ftp on /home/ftp type ext2 (ro,errors=remount-ro)
> /dev/vgkira/ftp2 on /home/ftp2 type ext2 (rw,errors=remount-ro)
>
> (root@kira:/0)~# e2fsadm -L+1G /dev/vgkira/ftp
> e2fsadm -- ERROR: "/dev/vgkira/ftp" is mounted on "/home/ftp2"
> e2fsadm -- please umount it to resize
This is a bug in how e2fsadm checks to see if a filesystem is mounted.
I have fixed this in my version of e2fsadm, as well as adding support
for ext2resize and ext2online, so you don't even need to unmount the
filesystem to resize it (if you have the ext2online kernel patch).
See ftp.lustre.org:/pub/adilger for an SRPM which has a patch to fix
all known LVM user-tools bugs, as well as a kernel patch for 0.8final
on 2.2.16. I was told by Les Hazelton that my LVM kernel patch will
apply cleanly to kernel-source-2.2.17-0.16mdk.i586.rpm, from the
mandrake cooker section on rpmfind.net.
Cheers, Andreas
^ permalink raw reply [flat|nested] 11+ messages in thread
* [linux-lvm] rpm
2000-08-29 16:22 ` [linux-lvm] Dazed & Confused Andreas Dilger
@ 2000-08-29 18:32 ` Jan Niehusmann
[not found] ` <200009010540.XAA04818@lynx.turbolabs.com>
2000-08-31 18:15 ` [linux-lvm] Dazed & Confused Marcelo Tosatti
1 sibling, 1 reply; 11+ messages in thread
From: Jan Niehusmann @ 2000-08-29 18:32 UTC (permalink / raw)
To: Andreas Dilger; +Cc: linux-lvm
On Tue, Aug 29, 2000 at 10:22:06AM -0600, Andreas Dilger wrote:
> See ftp.lustre.org:/pub/adilger for an SRPM which has a patch to fix
> all known LVM user-tools bugs, as well as a kernel patch for 0.8final
> on 2.2.16. I was told by Les Hazelton that my LVM kernel patch will
> apply cleanly to kernel-source-2.2.17-0.16mdk.i586.rpm, from the
> mandrake cooker section on rpmfind.net.
I compared your .srpm with the one I created for mandrake. There where only
minor differences(*), but I noticed you removed dependence on the local lvm.h,
while I don't use linux/lvm.h any more.
I think it's better not to use linux/lvm.h because kernel headers may belong
to an older kernel version without lvm support. (Linus said on linux-kernel
that he prefers that /usr/include/linux and /usr/src/linux are of the kernel
version used when glibc was compiled)
On mandrake, the standard kernel doesn't support lvm, but on 7.2 it will
probably be possible to install a 2.4 kernel optionally. linux/lvm.h will
not be available at build time.
What do you think?
Jan
(*) I did miss some minor bugfixes, and I'll upload an updated SRPM, soon.
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: [linux-lvm] Dazed & Confused
2000-08-29 16:22 ` [linux-lvm] Dazed & Confused Andreas Dilger
2000-08-29 18:32 ` [linux-lvm] rpm Jan Niehusmann
@ 2000-08-31 18:15 ` Marcelo Tosatti
2000-09-01 8:01 ` Andreas Dilger
1 sibling, 1 reply; 11+ messages in thread
From: Marcelo Tosatti @ 2000-08-31 18:15 UTC (permalink / raw)
To: Andreas Dilger; +Cc: linux-lvm
On Tue, 29 Aug 2000, Andreas Dilger wrote:
> Ulf Bartelt writes:
> > /dev/vgkira/ftp on /home/ftp type ext2 (ro,errors=remount-ro)
> > /dev/vgkira/ftp2 on /home/ftp2 type ext2 (rw,errors=remount-ro)
> >
> > (root@kira:/0)~# e2fsadm -L+1G /dev/vgkira/ftp
> > e2fsadm -- ERROR: "/dev/vgkira/ftp" is mounted on "/home/ftp2"
> > e2fsadm -- please umount it to resize
>
> This is a bug in how e2fsadm checks to see if a filesystem is mounted.
> I have fixed this in my version of e2fsadm, as well as adding support
> for ext2resize and ext2online, so you don't even need to unmount the
> filesystem to resize it (if you have the ext2online kernel patch).
>
> See ftp.lustre.org:/pub/adilger for an SRPM which has a patch to fix
> all known LVM user-tools bugs, as well as a kernel patch for 0.8final
> on 2.2.16. I was told by Les Hazelton that my LVM kernel patch will
> apply cleanly to kernel-source-2.2.17-0.16mdk.i586.rpm, from the
> mandrake cooker section on rpmfind.net.
While looking at your patch I found something which seems to be wrong.
The function lvm_snapshot_COW returns 1 on success. lvm_map() returns
lvm_snapshot_COW() return code. ll_rw_block calls lvm_map_ptr() (which is
lvm_map()) and expects 0 on success:
+ if ((lvm_map_ptr) (bh[i], rw) != 0) {
+ printk(KERN_ERR
+ "Bad lvm_map in ll_rw_block\n");
+ goto sorry;
+ }
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: [linux-lvm] Dazed & Confused
2000-08-31 18:15 ` [linux-lvm] Dazed & Confused Marcelo Tosatti
@ 2000-09-01 8:01 ` Andreas Dilger
0 siblings, 0 replies; 11+ messages in thread
From: Andreas Dilger @ 2000-09-01 8:01 UTC (permalink / raw)
To: Marcelo Tosatti; +Cc: linux-lvm
Marcelo Tosatti, writes:
> While looking at your patch I found something which seems to be wrong.
>
> The function lvm_snapshot_COW returns 1 on success. lvm_map() returns
> lvm_snapshot_COW() return code. ll_rw_block calls lvm_map_ptr() (which is
> lvm_map()) and expects 0 on success:
>
> + if ((lvm_map_ptr) (bh[i], rw) != 0) {
> + printk(KERN_ERR
> + "Bad lvm_map in ll_rw_block\n");
> + goto sorry;
> + }
You are correct. I think that I had changed lvm-snap.c at one time so
that lvm_snapshot_COW() returned 0 on success like normal kernel
functions, but those changes were lost. Just change the "return 1" to
"return 0" on line 290 of lvm-snap.c.
Note however, that this is exactly opposite of what is done in 2.4 code.
Cheers, Andreas
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [linux-lvm] Strange...
2000-08-29 7:18 [linux-lvm] Strange Ulf Bartelt
2000-08-29 16:22 ` [linux-lvm] Dazed & Confused Andreas Dilger
@ 2000-08-29 17:58 ` Nils Juergens
2000-08-30 7:08 ` Ulf Bartelt
1 sibling, 1 reply; 11+ messages in thread
From: Nils Juergens @ 2000-08-29 17:58 UTC (permalink / raw)
To: linux-lvm
On Tue, 29.08.00, Ulf Bartelt <ulf@twc.de> wrote:
> (root@kira:/0)~# umount /home/ftp/install/
> (root@kira:/0)~# umount /home/ftp
> (root@kira:/0)~# e2fsadm -L+1G /dev/vgkira/ftp
> e2fsadm -- ERROR: "/dev/vgkira/ftp" is mounted on "/home/ftp2"
> e2fsadm -- please umount it to resize
>
Have you tried using "lvextend" by hand? That should work.
In that case you might try ext2resize instead of resize2fs.
You don't even need to supply the exact size of the LV to ext2resize.
"ext2resize <devicename>" will automagically extend the filesystem to
the size of the LV.
cu,
Nils
--
> Nils Juergens | nils@muon.de | icq 7090774 <
> If we all work hard, we can turn this company <
> around 360 degrees -- gruntbert(LOTD) <
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [linux-lvm] Strange...
2000-08-29 17:58 ` [linux-lvm] Strange Nils Juergens
@ 2000-08-30 7:08 ` Ulf Bartelt
2000-09-01 8:25 ` Andreas Dilger
0 siblings, 1 reply; 11+ messages in thread
From: Ulf Bartelt @ 2000-08-30 7:08 UTC (permalink / raw)
To: linux-lvm
Hi!
Nils Juergens wrote:
>
> On Tue, 29.08.00, Ulf Bartelt <ulf@twc.de> wrote:
> > (root@kira:/0)~# umount /home/ftp/install/
> > (root@kira:/0)~# umount /home/ftp
> > (root@kira:/0)~# e2fsadm -L+1G /dev/vgkira/ftp
> > e2fsadm -- ERROR: "/dev/vgkira/ftp" is mounted on "/home/ftp2"
> > e2fsadm -- please umount it to resize
> Have you tried using "lvextend" by hand? That should work.
>
> In that case you might try ext2resize instead of resize2fs.
> You don't even need to supply the exact size of the LV to ext2resize.
> "ext2resize <devicename>" will automagically extend the filesystem to
> the size of the LV.
Neither mount nor /proc/mounts claimed the LV to be mounted.
I tried and solved the problem this way:
rename the LV /dev/vgkira/ftp to /dev/vgkira/ptf
(necessary lvchange commands not mentioned)
run e2fsadm on the renamed LV
rename th LV back
use the LV as usual
I had no time to look in the sources but I for now I guess e2fsadm fails
if used on a LV with a name that is the beginning of a LV name that
still is in use...
This was the case having LV names ftp and ftp2...
Bye!
Ulf.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [linux-lvm] Strange...
2000-08-30 7:08 ` Ulf Bartelt
@ 2000-09-01 8:25 ` Andreas Dilger
0 siblings, 0 replies; 11+ messages in thread
From: Andreas Dilger @ 2000-09-01 8:25 UTC (permalink / raw)
To: Ulf Bartelt; +Cc: linux-lvm
Ulf Bartelt, you write:
> I had no time to look in the sources but I for now I guess e2fsadm fails
> if used on a LV with a name that is the beginning of a LV name that
> still is in use...
>
> This was the case having LV names ftp and ftp2...
Correct - it was doing strncmp() using the length of the LV name, so it
was broken in a case like yours. I fixed this and a few other issues.
Cheers, Andreas
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2000-09-01 17:53 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-08-29 7:18 [linux-lvm] Strange Ulf Bartelt
2000-08-29 16:22 ` [linux-lvm] Dazed & Confused Andreas Dilger
2000-08-29 18:32 ` [linux-lvm] rpm Jan Niehusmann
[not found] ` <200009010540.XAA04818@lynx.turbolabs.com>
2000-09-01 11:29 ` [linux-lvm] lvm.h kernel/userspace differences Jan Niehusmann
2000-09-01 11:47 ` [linux-lvm] " Jan Niehusmann
2000-09-01 17:53 ` Andreas Dilger
2000-08-31 18:15 ` [linux-lvm] Dazed & Confused Marcelo Tosatti
2000-09-01 8:01 ` Andreas Dilger
2000-08-29 17:58 ` [linux-lvm] Strange Nils Juergens
2000-08-30 7:08 ` Ulf Bartelt
2000-09-01 8:25 ` 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.