[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [Woody] Mounting LVM-snapshots with ext3 + ACL + user_xattr-Patch



On Mon, 05 Jan 2004 15:19:43 +0100, Oliver Schade wrote:

> Dear all,
> 
> 
> I am using a Woody system, running a Vanilla 2.4.23 kernel from 
> ftp.kernel.org and the ACL+XATTR-Patch vom acl.bestbits.at.
> 
> Working with ext3 and ACLs on a logical volume works fine, fast and
> stable. But I have some troubles mounting a snapshot of a live lvm-
> volume named /dev/RAID5/TEMP:
> 
> fsb01:~# mount | grep TEMP
> /dev/RAID5/TEMP on /mnt/berlin/TEMP type ext3 (rw,acl,user_xattr)
> 
> To create a snapshot I used:
> 
> fsb01:~# lvcreate --size 250m --snapshot --name TEMP1500 /dev/RAID5/TEMP
> [... snipped ...]
> lvcreate -- logical volume "/dev/RAID5/TEMP1500" successfully created
> 
> The special device has been successfully created:
> 
> fsb01:~# ls -la /dev/RAID5/TEMP1500
> brw-rw----    1 root     disk      58,   9 Jan  5 15:20 /dev/RAID5/TEMP1500
> 
> However, mounting this snapshot fails:
> 
> fsb01:~# mount -o ro /dev/RAID5/TEMP1500 /mnt/berlin/Snapshots/TEMP
> mount: wrong fs type, bad option, bad superblock on /dev/RAID5/TEMP1500,
>        or too many mounted file systems
> 

This is a well known issue.  lvm snapshots don't work in the 2.4
kernel series. The reason is that ext3 needs to lock and flush the
ext3 journal *before* taking the snapshot.

There is a VFS locking patch for earlier kernels; I have modified it for
my kernel 2.4.22.  I don't see it on the debian distro, but on googling I
see a VFS Locking patch included in LVM 1.0.8 here:
http://fresh.t-systems-sfr.com/cgi-bin/warex?linux/src/lvm_1.0.8.tar.gz:a/LVM/1.0.8/PATCHES/linux-2.4.20-VFS-lock.patch

At first glance, it looks the same as the patch which I have modified for
lvm 1.0.7 and kernel 2.4.22, which is what I would expect.

The way I modded the patch was to look in the various sources for the code
to be patched and change the line numbers in the patch to be consistent.

"man patch" for how to apply it.

Seems to work OK, but I'm not recommending it to anyone but myself, so, if
it breaks, you get to keep all the pieces.

-- 
....................paul

Programming without a hex editor is like watchmaking without a hammer.




Reply to: