* [linux-lvm] LVM 1.0.7, kernel 2.4.21 and snapshots over ext3 filesystem
@ 2003-07-01 12:09 Alberto Picon Couselo
2003-07-01 16:17 ` Wolfgang Weisselberg
0 siblings, 1 reply; 6+ messages in thread
From: Alberto Picon Couselo @ 2003-07-01 12:09 UTC (permalink / raw)
To: linux-lvm
Hello everybody. I'm having a lot problems trying to enable snapshots on an
EXT3 Logical Volume. I was using LVM 1.0.4 and I decided to upgrade to LVM
1.0.7 and Linux kernel 2.4.21 on a Debian 3.0 to fix it. I have downloaded
the following sources:
Sistina WebPage LVM Sources: lvm 1.0.7
LinuxKernel Kernel 2.4.21 sources from http://www.kernel.org
After executing ./configure script of LVM, I built VFS patch for 2.4.21,
lvm-1.0.7-2.4.21.patch, and I patched the kernel (2.4.21 at /usr/src/linux)
using "patch -p1 < /usr/src/LVM/1.0.7/PATCHES/lvm-1.0.7-2.4.21.patch". I
compiled and installed LVM package using "make" and "make install". After
that, I enabled LVM as a module and FileSystems->Vistual Memory Filesystem
option in the kernel using "make menuconfig". I compiled the kernel and
after reboor LVM seems to work correctly.
However, when I create a snapshot volume:
$:/usr/src/linux# lvcreate -L500M -s -n spoolbackup /dev/storage/spool
lvcreate -- WARNING: the snapshot will be automatically disabled once it
gets full
lvcreate -- INFO: using default snapshot chunk size of 64 KB for
"/dev/storage/spoolbackup"
lvcreate -- doing automatic backup of "storage"
lvcreate -- logical volume "/dev/storage/spoolbackup" successfully created
And I try to mount it:
$:/usr/src/linux# mount -t ext3 -r /dev/storage/spoolbackup /mnt/temp/
mount: wrong fs type, bad option, bad superblock on
/dev/storage/spoolbackup,
or too many mounted file systems
What's happenning?. I have upgraded LVM to 1.0.7, compiled VFS-lock kernel
patch for LVM using LVM native utility, compiled the kernel, and everything
seems to work fine. However, snapshots do not mount correctly.
Please, please, help me,
Thanks in advance,
Alberto Picon
Alberto Picón Couselo
Departamento Informática y Telecomunicaciones
Asociación SER (Ser, Estar, Responder)
------------------------------------------------------------------
Teléfono: (91)554.36.37 - Móvil: 615.22.77.55 - FAX: (91)534.27.59
Email: albertopicon@asociacionser.org
------------------------------------------------------------------
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [linux-lvm] LVM 1.0.7, kernel 2.4.21 and snapshots over ext3 filesystem
2003-07-01 12:09 [linux-lvm] LVM 1.0.7, kernel 2.4.21 and snapshots over ext3 filesystem Alberto Picon Couselo
@ 2003-07-01 16:17 ` Wolfgang Weisselberg
2003-07-02 8:05 ` Alberto Picon Couselo
0 siblings, 1 reply; 6+ messages in thread
From: Wolfgang Weisselberg @ 2003-07-01 16:17 UTC (permalink / raw)
To: linux-lvm
Alberto Picon Couselo wrote 57 lines:
> Hello everybody. I'm having a lot problems trying to enable snapshots on an
> EXT3 Logical Volume. I was using LVM 1.0.4 and I decided to upgrade to LVM
> 1.0.7 and Linux kernel 2.4.21 on a Debian 3.0 to fix it.
It works here in exactly the same configuration.
> What's happenning?. I have upgraded LVM to 1.0.7, compiled VFS-lock kernel
> patch for LVM using LVM native utility, compiled the kernel, and everything
> seems to work fine. However, snapshots do not mount correctly.
My bet is that you first patched the kernel for VFS-lock and
*then* patched the kernel for LVM. This undoes (parts of)
the VFS-lock. The reason is as follows:
- AFAICS the LVM kernel patch generator has functions as they
should be in the kernel
- this means the 'patch' is dynamically build by comparing
the current kernel with the functions LVM wants there.
- so if the VFS-lock patch is in the kernel, LVM will
'correct' it, undoing it's efforts.
So I do the following dance to generate my kernel:
(NOTE: I store my semi-current kernel sources at
/usr/src/$VERSION/. YMMV.
I also rename my kernels to ...-lvm in the makefile)
| OLD_VERSION=2.4.20
| NEW_VERSION=2.4.21
| LVM_VERSION=1.0.7
| VFS_LOCK_PATCH=linux-2.4.21-VFS-lock.patch
| LVM_PATCH=lvm-$LVM_VERSION-$NEW_VERSION.patch
|
|
| # make a dir for the version, i.e.
| mkdir -p /usr/src/$NEW_VERSION
| cd /usr/src/$NEW_VERSION
|
| tar -xjf /usr/src/linux-$OLD_VERSION.tar.bz2 &&
| mv linux-$OLD_VERSION linux-$NEW_VERSION-lvm &&
| cd linux-$NEW_VERSION-lvm &&
| bzcat /usr/src/KERNELPATCHES/patch-$NEW_VERSION.bz2 | patch -p1 && echo OK
| # add more patches?
|
| cd /usr/src/LVM/LVM/$LVM_VERSION
| make distclean
| ./configure --with-kernel_dir=/usr/src/$NEW_VERSION/linux-$NEW_VERSION-lvm
| cd PATCHES
| make
| cp $LVM_PATCH /usr/src/KERNELPATCHES
| cd /usr/src/$NEW_VERSION/linux-$NEW_VERSION-lvm
|
| cat /usr/src/KERNELPATCHES/$LVM_PATCH | patch -p1 && echo OK
|
| cat /usr/src/KERNELPATCHES/$VFS_LOCK_PATCH | patch -p1 && echo OK
|
| vim Makefile +/EXTRAVERSION # add -lvm
|
| cp /boot/config-2.4.21-lvm .config # or your base config!
| make oldconfig # for new questions
| # make menuconfig # if needed
|
| ### NOTE: IO-APIC seems to make these dma 30 timeout errors!
|
| export PATCH_THE_KERNEL=YES
| make-kpkg --initrd --uc --us buildpackage &&
| make-kpkg modules_clean modules_config modules_image --uc --us
|
| cd ..
| mv ../nvidia-kernel-*_i386.deb .
| ls *.deb
|
| # if nvidia fails, check /usr/src/modules. And unpack the new nvidia
| # modules (see their README.Debian).
|
| # beware! no bad nvidia allowed!
|
| dpkg --install *.deb
|
| #update /etc/lilo.conf && /sbin/lilo if you want.
Mayhaps that does help you.
-Wolfgang
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [linux-lvm] LVM 1.0.7, kernel 2.4.21 and snapshots over ext3 filesystem
@ 2003-07-02 8:05 ` Alberto Picon Couselo
2003-07-04 15:31 ` Wolfgang Weisselberg
0 siblings, 1 reply; 6+ messages in thread
From: Alberto Picon Couselo @ 2003-07-02 8:05 UTC (permalink / raw)
To: linux-lvm
Wolfgang, thank you very, very much for your advice.
As you told me, I've downloaded "fresh" copies of Linux 2.4.21 kernel, LVM
1.0.7 and linux-2.4.21-VFS-lock.patch (at
http://evms.sourceforge.net/patches/1.2.1/2.4.21/).
Following your instructions, I generated and patched the kernel using
lvm-1.0.7-2.4.21.patch. After that, I tried to patch the kernel using
linux-2.4.21-VFS-lock.patch and I received an error message from patch
program requiring me a file path to patch evms.c source file. I do not
have installed evms package, so I decided to skip that patch, and continue
patching lvm module and I recompiled the whole kernel using my custom
configuration (make menuconfig; Load configuration option...).
Now, I'm able to create a snapshot and mount it, but I receive a strange
warning message (even if I mount it readonly):
$~# mount -t ext3 -r /dev/storage/snap /mnt/temporal/
Can't write to read-only device 3a:04
kjournald starting. Commit interval 5 seconds
Can't write to read-only device 3a:04
EXT3-fs: mounted filesystem with ordered data mode.
Anyway, the snapshot is mounted and it's visible... So, it seems to
work... What's your opinion about this?
Thanks a lot for you help and advice,
Alberto Picon
--
Alberto Picon Couselo
Depto. Telecomunicaciones e Informatica
Asociacion SER
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [linux-lvm] LVM 1.0.7, kernel 2.4.21 and snapshots over ext3 filesystem
@ 2003-07-03 11:14 C R Ritson
2003-07-04 15:59 ` Wolfgang Weisselberg
0 siblings, 1 reply; 6+ messages in thread
From: C R Ritson @ 2003-07-03 11:14 UTC (permalink / raw)
To: linux-lvm
> Date: Tue, 1 Jul 2003 23:16:54 +0200
> To: linux-lvm@sistina.com
> Subject: Re: [linux-lvm] LVM 1.0.7, kernel 2.4.21 and
>
> My bet is that you first patched the kernel for VFS-lock and
> *then* patched the kernel for LVM. This undoes (parts of)
> the VFS-lock. The reason is as follows:
>
> - AFAICS the LVM kernel patch generator has functions as they
> should be in the kernel
> - this means the 'patch' is dynamically build by comparing
> the current kernel with the functions LVM wants there.
> - so if the VFS-lock patch is in the kernel, LVM will
> 'correct' it, undoing it's efforts.
That is strange - my exprience with kernel 2.4.20 and LVM 1.0.7 was as
follows:
With no VFS-lock patch I get problems with snapshots as described.
Attempting to apply the VFS-lock patch AFTER the LVM generated patch
gives me an un-compilable tree with with unresolved reverences to
fsync_dev_lockfs and unlockfs.
On one test machine I am running a 2.4.20 kernel in which the VFS-lock
patch was applied BEFORE the LVM patch. Here, I am taking a snapshot at
about 23:30 every night, and backing that up to tape to ensure that
backup sees a stable volume, then leaving the snapshot around for the
next 24 hours to allow users to recover from sinple file deletions and
corruptions themselves.
Would Heinz care to comment on these two apparently conflicting results?
Chris Ritson (Computing Officer)
Rm 618, Claremont Bridge, EMAIL: C.R.Ritson@newcastle.ac.uk
School of Computing Science, PHONE: +44 191 222 8175
University of Newcastle, FAX : +44 191 222 8232
Newcastle on Tyne, UK NE1 7RU. http://www.cs.ncl.ac.uk/~c.r.ritson/
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [linux-lvm] LVM 1.0.7, kernel 2.4.21 and snapshots over ext3 filesystem
2003-07-02 8:05 ` Alberto Picon Couselo
@ 2003-07-04 15:31 ` Wolfgang Weisselberg
0 siblings, 0 replies; 6+ messages in thread
From: Wolfgang Weisselberg @ 2003-07-04 15:31 UTC (permalink / raw)
To: linux-lvm
Alberto Picon Couselo wrote 42 lines:
> Wolfgang, thank you very, very much for your advice.
You are welcome.
> Now, I'm able to create a snapshot and mount it, but I receive a strange
> warning message (even if I mount it readonly):
> $~# mount -t ext3 -r /dev/storage/snap /mnt/temporal/
> Can't write to read-only device 3a:04
> kjournald starting. Commit interval 5 seconds
> Can't write to read-only device 3a:04
> EXT3-fs: mounted filesystem with ordered data mode.
Well ... it is saying:
"Hey, this is a read-only fs!"
twice. Once after mounting and once after starting the
kernelthread for the journalling.
Now, the snapshots are read-only :-) so the complaint is
valid, but not impressive. I get even a few more warnings in
my syslog (but none to STDOUT/STDERR):
| kernel: Can't write to read-only device 3a:06
| kernel: kjournald starting. Commit interval 5 seconds
| kernel: EXT3-fs: lvm(58,6): orphan cleanup on readonly fs
| kernel: ext3_orphan_cleanup: deleting unreferenced inode 17
| kernel: ext3_orphan_cleanup: deleting unreferenced inode 163842
| kernel: EXT3-fs: lvm(58,6): 2 orphan inodes deleted
| kernel: EXT3-fs: recovery complete.
| kernel: lvm - lvm_map: ll_rw_blk write for readonly LV /dev/base_vg/SNAP-test
| last message repeated 10 times
| kernel: Can't write to read-only device 3a:06
| last message repeated 2 times
| kernel: EXT3-fs: mounted filesystem with ordered data mode.
Of course, the FS was not clean when I snap-shot it. (bang!)
> Anyway, the snapshot is mounted and it's visible... So, it seems to
> work... What's your opinion about this?
AFAICT it works.
-Wolfgang
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [linux-lvm] LVM 1.0.7, kernel 2.4.21 and snapshots over ext3 filesystem
2003-07-03 11:14 C R Ritson
@ 2003-07-04 15:59 ` Wolfgang Weisselberg
0 siblings, 0 replies; 6+ messages in thread
From: Wolfgang Weisselberg @ 2003-07-04 15:59 UTC (permalink / raw)
To: linux-lvm
C R Ritson C.R.Ritson-at-newcastle.ac.uk |LVM Mailinglist linux-lvm/Allow| wrote 45 lines:
> > My bet is that you first patched the kernel for VFS-lock and
> > *then* patched the kernel for LVM. This undoes (parts of)
> > the VFS-lock. The reason is as follows:
> That is strange - my exprience with kernel 2.4.20 and LVM 1.0.7 was as
> follows:
> Attempting to apply the VFS-lock patch AFTER the LVM generated patch
> gives me an un-compilable tree with with unresolved reverences to
> fsync_dev_lockfs and unlockfs.
I have compiled quite a few kernels exactly after my cheatsheet
(from at least 2.4.21-rc1 up to my currently running 2.4.21-lvm)
and it works. At times I may have to hand-patch because of
trivial changes to get the VFS-lock patch in, but ... that's it.
> On one test machine I am running a 2.4.20 kernel in which the VFS-lock
> patch was applied BEFORE the LVM patch. Here, I am taking a snapshot at
> Would Heinz care to comment on these two apparently conflicting results?
It MIGHT be that LVM 1.0.7 is in sync (or at least not damaging)
to the VFS-lock patch for 2.4.20. I *have* had problems in the
past (I tried VFS-lock and the LVM and it failed), but I cannot
vouch that they are there for kernel 2.4.20/LVM 1.0.7.
-Wolfgang
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2003-07-04 15:59 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-07-01 12:09 [linux-lvm] LVM 1.0.7, kernel 2.4.21 and snapshots over ext3 filesystem Alberto Picon Couselo
2003-07-01 16:17 ` Wolfgang Weisselberg
2003-07-02 8:05 ` Alberto Picon Couselo
2003-07-04 15:31 ` Wolfgang Weisselberg
-- strict thread matches above, loose matches on Subject: below --
2003-07-03 11:14 C R Ritson
2003-07-04 15:59 ` Wolfgang Weisselberg
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.