FS#38710 - [lvm2] can no longer mount my snapshot with lvm2 2.02.105-1

Attached to Project: Arch Linux
Opened by Robin (robin67) - Wednesday, 29 January 2014, 12:08 GMT
Last edited by Thomas Bächler (brain0) - Tuesday, 04 March 2014, 10:33 GMT
Task Type Bug Report
Category Upstream Bugs
Status Closed
Assigned To Eric Belanger (Snowman)
Thomas Bächler (brain0)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 2
Private No

Details

Description:
After upgrading lvm2 I am no longer able to mount some of the snapshots of my partitions.
Downgrading to 2.0.2.104-1 solved my problems.....

Additional info:
- lvm2 version 2.02.105-1 (lvm2-2.02.105-1-x86_64)
- in /etc/fstab the partition is mounted as: /dev/mapper/lvm-home /home ext4 defaults,relatime,errors=continue 0 1

Steps to reproduce:
[root@vps ~]# lvcreate --size 4G --snapshot --name snapup /dev/lvm/home -p r
Logical volume "snapup" created
[root@vps ~]# mount -r -t ext4 /dev/lvm/snapup /mnt/tmp
mount: wrong fs type, bad option, bad superblock on /dev/mapper/lvm-snapup,
missing codepage or helper program, or other error

In some cases useful info is found in syslog - try
dmesg | tail or so.

dmesg shows:
[ 3012.436519] EXT4-fs (dm-4): bad geometry: block count 3670016 exceeds size of device (262144 blocks)
This task depends upon

Closed by  Thomas Bächler (brain0)
Tuesday, 04 March 2014, 10:33 GMT
Reason for closing:  Fixed
Comment by Christian Hesse (eworm) - Thursday, 06 February 2014, 15:45 GMT
I do suffer the same and I've downgraded to version 2.02.104-1 as well.

Reporded it here, but did not find a real solution yet:
https://www.redhat.com/archives/linux-lvm/2014-January/msg00038.html

Robin, can you give output of 'lsblk --ascii'?
Comment by Robin (robin67) - Thursday, 06 February 2014, 18:54 GMT
Sure...

NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOIN
sr0 11:0 1 391.8M 0 rom
vda 254:0 0 50G 0 disk
|-vda1 254:1 0 152.6M 0 part /boot
|-vda2 254:2 0 24.9G 0 part
| |-lvm-root 253:0 0 5G 0 lvm /
| |-lvm-home 253:1 0 1G 0 lvm /home
| |-lvm-swap 253:2 0 512M 0 lvm [SWAP]
| `-lvm-var 253:3 0 14G 0 lvm /var
`-vda3 254:3 0 25G 0 part
Comment by Christian Hesse (eworm) - Thursday, 06 February 2014, 20:42 GMT
My first bet was that my stacked setup (LVM volume on LUKS encrypted partition) ist to blame... But that does not fit your setup.

Tried bisecting the problem but it suddenly disappeared... I hate bugs that are not perfectly reproducable. :-/
Comment by Christian Hesse (eworm) - Saturday, 08 February 2014, 17:44 GMT
We both use read only snapshots. I am pretty sure it depends on that.
Comment by Christian Hesse (eworm) - Monday, 10 February 2014, 13:54 GMT
We have a fix now! Zdenek Kabelac provided a patch, in addition I had to disable blkid_wiping to work around another problem (lvm giving: "WARNING: DM_snapshot_cow signature detected on /dev/cvg/snap-home at offset 0. Wipe it? [y/n]).
Comment by Christian Hesse (eworm) - Monday, 10 February 2014, 13:57 GMT Comment by Thomas Bächler (brain0) - Monday, 10 February 2014, 14:01 GMT
Actually providing the patch and a link to the original post with it would be more helpful than a useless PKGBUILD patch.

EDIT: Erm, oops, there's a URL in the PKGBUILD. Still, where is this from?
Comment by Christian Hesse (eworm) - Monday, 10 February 2014, 14:04 GMT Comment by Thomas Bächler (brain0) - Monday, 10 February 2014, 14:04 GMT
Further questions: What is --disable-blkid_wiping supposed to do? grepping the LVM2 source for 'blkid_wiping' returns nothing.
Comment by Christian Hesse (eworm) - Monday, 10 February 2014, 14:12 GMT
By default lvm links against libblkid now for wiping of know signatures. But it gives a warning/question when creating snapshots:

WARNING: DM_snapshot_cow signature detected on /dev/cvg/snap-home at offset 0. Wipe it? [y/n]

Disabling the new blkid_wiping code fixes this for now and uses the code known from version 2.02.104. Not sure what a correct fix would look like.
Are you sure you grepped the correct source? For me it matches in a number of files.
Comment by Thomas Bächler (brain0) - Monday, 10 February 2014, 14:19 GMT
I had an older version of the PKGBUILD on this machine (which, as it turns out, is no longer my main build machine), so I got confused.

I am entirely at a loss what they tried to do here. We're likely better off doing what you did in your PKGBUILD for the moment.
Comment by Christian Hesse (eworm) - Monday, 10 February 2014, 14:34 GMT
Just got another mail from Peter Rajnoha. The blkid_wiping fix is already in git:
https://www.redhat.com/archives/linux-lvm/2014-February/msg00021.html
https://git.fedorahosted.org/cgit/lvm2.git/commit/?id=ed166a3b1d3290ad887d8f83c24a8d8877713d3c

I updated the patch to apply to version 2.02.105, see the patch attached.
Comment by Thomas Bächler (brain0) - Wednesday, 12 February 2014, 09:02 GMT
Is the other fix upstream already, too?
Comment by Christian Hesse (eworm) - Wednesday, 12 February 2014, 09:38 GMT
No, it is not.
Comment by Christian Hesse (eworm) - Wednesday, 26 February 2014, 10:08 GMT Comment by Thomas Bächler (brain0) - Wednesday, 26 February 2014, 22:38 GMT
This should be fixed in 2.02.105-2, can you test please?
Comment by Christian Hesse (eworm) - Thursday, 27 February 2014, 06:16 GMT
Looks good to me and works just perfectly here. Thanks a lot!
Comment by Robin (robin67) - Thursday, 27 February 2014, 06:46 GMT
I just installed it and tested it with the example I used while registering this bug.

It seems to work again !! So I am happy .... Thanks for this

Loading...