Details
-
Bug
-
Status: Done
-
Medium
-
Resolution: Fixed
-
8.0.26-18 (Q3 2021)
-
None
-
None
-
Yes
-
Yes
Description
Steps to reproduce:
Preparing compressed table
mysql> CREATE TABLE a( id int primary key auto_increment, a varchar(100), b varchar(100), c blob) COMPRESSION='zlib'; mysql> INSERT INTO a SET a = now(), b=now(), c=repeat(now(),3000); mysql> INSERT INTO a (a,b,c) SELECT a,b,c FROM a; … mysql> INSERT INTO a (a,b,c) SELECT a,b,c FROM a;
Taking a backup
# xtrabackup --backup --stream=xbstream > a.xbs
After extracting:
Extracting xbstream's output file
xbstream -x <a.xbs
sparse files work fine on EXT4, but not on XFS.
XFS
root@debian:/tmp/xfs/test# du -sh a.ibd 520M a.ibd root@debian:/tmp/xfs/test# du -sh --apparent-size a.ibd 520M a.ibd
EXT4
root@debian:/tmp/a/test# du -sh a.ibd 136M a.ibd root@debian:/tmp/a/test# du -sh --apparent-size a.ibd 520M a.ibd
`xtrabackup --copy-back` from XFS to EXT4 makes the file sparse again.
Potential workarounds:
- fallocate -d file.ibd
- cp --sparse
- rsync --prealocate --sparse