[dm-devel] can we fix some dm snapshot crashes please? :)

Michael Tokarev mjt at tls.msk.ru
Fri May 7 14:10:45 UTC 2021


07.05.2021 15:31, Zdenek Kabelac wrote:
> Dne 07. 05. 21 v 12:31 Michael Tokarev napsal(a):
...
>>   sz=$(blockdev --getsize /dev/loop0)
>>   dmsetup create base --table "0 $sz snapshot-origin /dev/loop0"
>>   # and now the crash
>>   mkfs.ext4 /dev/mapper/base

> Yes reproducible - can you please open BZ report here:
> 
> https://bugzilla.redhat.com/enter_bug.cgi?product=LVM%20and%20device-mapper

Ok, will do, thanks!

> I assume you are aware you are trying to using snapshot target in wrong way,
> but it should not be crashing kernel.

Actually I'm not aware about the wrong way. The documentation is a bit lacking
in this area. There are a few (maybe 2 or 3) guides describing the steps to do,
most involves first using an 1:1 linear table, next replacing it on-the-fly with
snapshot-origin table, but nowhere it is told that I can't create snapshot-origin
directly, or that I need at least one snapshot device, or that the origin of the
snapshot-origin table should be a dm device, or many many other variations.

I just tried to create a snapshot to be able to revert changes if something goes
wrong, and since I don't use lvm I thought that plain dmsetup should do, but
discovered that it doesn't quite work and it actually is a dangerous thing to use.. :)

Thanks!

/mjt





More information about the dm-devel mailing list