[Linux-cluster] sparse-file clone breaks on GFS2

Pierre-Philipp Braun pbraun at nethence.com
Sat Sep 19 11:21:09 UTC 2020

Hello #linux-cluster

I am attempting to host thin-provisioned virtual disks on GFS2.  In that 
regard, I experience a weird and unexpected issue: when copying (or 
packing/extracting) a sparse file with a file-system on it, and which 
lives and gets cloned on a GFS2 mount point, it results in a corrupted file.

Is this a localized bug/issue I am having only here in my farm, or can 
you reproduce it on yours?  Here's how to reproduce.  On a GFS2 
file-system, creating a raw sparse file and an EXT4 file-system on it.

dd if=/dev/zero of=dummy.ext4 bs=1G count=0 seek=1
mkfs.ext4 dummy.ext4
md5sum dummy.ext4

c4bd385e82afcd322a4b32a02d652d79  dummy.ext4

cp --sparse=always dummy.ext4 dummy-clone.ext4
md5sum dummy-clone.ext4

d1966a954a17894a721142a27db0f5b5  dummy-clone.ext4

fsck.ext4 dummy-clone.ext4

e2fsck 1.45.6 (20-Mar-2020)
Superblock has an invalid journal (inode 8).

What could be the root cause of this issue?  Any ideas?

Thank you

More information about the Linux-cluster mailing list