[Bug 1969247] Re: fallocate with FALLOC_FL_ZERO_RANGE produces zero-size files on zfs in Jammy
Ah alright, that's fine then. Hopefully the Jammy version can move from proposed to release soon. Thanks! ** Tags removed: verification-failed-jammy ** Tags added: verification-done-jammy -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1969247 Title: fallocate with FALLOC_FL_ZERO_RANGE produces zero-size files on zfs in Jammy To manage notifications about this bug go to: https://bugs.launchpad.net/zfs/+bug/1969247/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
Re: [Bug 1969247] Re: fallocate with FALLOC_FL_ZERO_RANGE produces zero-size files on zfs in Jammy
Once an updated kernel is made available, this will just work. On Mon, 23 May 2022, 18:40 Lena Voytek, <1969...@bugs.launchpad.net> wrote: > That's fair, it does seem to work when using that method. However, for > this to be an actual fix it needs to work out of the box. Since mysql > still fails to install and fallocate still fails on kinetic after > installing with zfs, it isn't ready for normal users yet > > -- > You received this bug notification because you are subscribed to the bug > report. > https://bugs.launchpad.net/bugs/1969247 > > Title: > fallocate with FALLOC_FL_ZERO_RANGE produces zero-size files on zfs in > Jammy > > Status in Native ZFS for Linux: > Fix Released > Status in mysql-8.0 package in Ubuntu: > Invalid > Status in zfs-linux package in Ubuntu: > Fix Released > Status in zfs-linux source package in Jammy: > Fix Committed > > Bug description: > [Summary] > > When running Jammy on zfs or LXD with a zfs pool on a Jammy host, > fallocate creates a zero-sized file. > > The issue was originally found when installing mysql on LXD, where > fallocate would create a zero-sized ib_logfile1 file. The original > information in this bug is based on that. > > [Steps to Reproduce] > > touch foo.img > fallocate -z -l 10M foo.img > ls -la foo.img > > On a non-zfs Jammy system this will show something like: > -rw-r--r-- 1 root root 10M ... > > while on zfs it will show: > -rw-rw-r-- 1 root root 0 ... > > [Original Description] > I came across this error when testing various mysql setups in an LXD > container and managed to reproduce it consistently. I'm unable to reproduce > on Ubuntu desktop or server though since the prerequisites are probably > handled properly there. > > ProblemType: Package > DistroRelease: Ubuntu 20.04 > Package: mysql-server-8.0 8.0.28-0ubuntu0.20.04.3 > ProcVersionSignature: Ubuntu 5.15.0-25.25-generic 5.15.30 > Uname: Linux 5.15.0-25-generic x86_64 > ApportVersion: 2.20.11-0ubuntu27.23 > Architecture: amd64 > CasperMD5CheckResult: skip > Date: Fri Apr 15 21:31:09 2022 > Dmesg: > > ErrorMessage: installed mysql-server-8.0 package post-installation > script subprocess returned error exit status 1 > KernLog: > > Logs.var.log.daemon.log: > > MySQLConf.etc.mysql.conf.d.mysql.cnf: [mysql] > MySQLConf.etc.mysql.conf.d.mysqldump.cnf: >[mysqldump] >quick >quote-names >max_allowed_packet = 16M > MySQLConf.etc.mysql.my.cnf: Error: [Errno 40] Too many levels of > symbolic links: '/etc/mysql/my.cnf' > MySQLVarLibDirListing: ['ibdata1', 'ib_logfile0', '#innodb_temp', > 'debian-5.7.flag', '#ib_16384_0.dblwr', 'client-cert.pem', 'undo_001', > 'server-cert.pem', 'mysql.ibd', '#ib_16384_1.dblwr', 'client-key.pem', > 'ca-key.pem', 'sys', 'private_key.pem', 'mysql', 'undo_002', > 'binlog.index', 'performance_schema', 'ib_buffer_pool', 'auto.cnf', > 'ib_logfile1', 'public_key.pem', 'ca.pem', 'server-key.pem'] > ProcCmdline: BOOT_IMAGE=/boot/vmlinuz-5.15.0-25-generic > root=UUID=93666562-b5e4-4fb4-ba8c-7b42a3e6bf61 ro quiet splash > mem_sleep_default=deep vt.handoff=7 > Python3Details: /usr/bin/python3.8, Python 3.8.10, python3-minimal, > 3.8.2-0ubuntu2 > PythonDetails: N/A > RelatedPackageVersions: >dpkg 1.19.7ubuntu3 >apt 2.0.6 > SourcePackage: mysql-8.0 > Title: package mysql-server-8.0 8.0.28-0ubuntu0.20.04.3 failed to > install/upgrade: installed mysql-server-8.0 package post-installation > script subprocess returned error exit status 1 > UpgradeStatus: No upgrade log present (probably fresh install) > > To manage notifications about this bug go to: > https://bugs.launchpad.net/zfs/+bug/1969247/+subscriptions > > -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1969247 Title: fallocate with FALLOC_FL_ZERO_RANGE produces zero-size files on zfs in Jammy To manage notifications about this bug go to: https://bugs.launchpad.net/zfs/+bug/1969247/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1969247] Re: fallocate with FALLOC_FL_ZERO_RANGE produces zero-size files on zfs in Jammy
That's fair, it does seem to work when using that method. However, for this to be an actual fix it needs to work out of the box. Since mysql still fails to install and fallocate still fails on kinetic after installing with zfs, it isn't ready for normal users yet -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1969247 Title: fallocate with FALLOC_FL_ZERO_RANGE produces zero-size files on zfs in Jammy To manage notifications about this bug go to: https://bugs.launchpad.net/zfs/+bug/1969247/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1969247] Re: fallocate with FALLOC_FL_ZERO_RANGE produces zero-size files on zfs in Jammy
Unless you've also installed zfs-dkms and built the ZFS kernel modules using DKMS, you've not installed the fix completely on your system. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1969247 Title: fallocate with FALLOC_FL_ZERO_RANGE produces zero-size files on zfs in Jammy To manage notifications about this bug go to: https://bugs.launchpad.net/zfs/+bug/1969247/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1969247] Re: fallocate with FALLOC_FL_ZERO_RANGE produces zero-size files on zfs in Jammy
Added the apport output of kinetic in its current state to a duplicate bug: https://pad.lv/1975513 -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1969247 Title: fallocate with FALLOC_FL_ZERO_RANGE produces zero-size files on zfs in Jammy To manage notifications about this bug go to: https://bugs.launchpad.net/zfs/+bug/1969247/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1969247] Re: fallocate with FALLOC_FL_ZERO_RANGE produces zero-size files on zfs in Jammy
I've done some more testing with Jammy and can confirm this does not fully fix the issue. I also tried to install mysql on kinetic now that the fix is 'released' and it still fails. I think more needs to be done with this to get fallocate working on zfs ** Tags removed: verification-done-jammy ** Tags added: verification-failed-jammy -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1969247 Title: fallocate with FALLOC_FL_ZERO_RANGE produces zero-size files on zfs in Jammy To manage notifications about this bug go to: https://bugs.launchpad.net/zfs/+bug/1969247/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1969247] Re: fallocate with FALLOC_FL_ZERO_RANGE produces zero-size files on zfs in Jammy
It still doesn't work. I'm not able to start mysql-server or mariadb on Ubuntu 22.04 LXC Container running on Proxmox 7.2-3 with ZFS. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1969247 Title: fallocate with FALLOC_FL_ZERO_RANGE produces zero-size files on zfs in Jammy To manage notifications about this bug go to: https://bugs.launchpad.net/zfs/+bug/1969247/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1969247] Re: fallocate with FALLOC_FL_ZERO_RANGE produces zero-size files on zfs in Jammy
** Tags added: verification-done-jammy -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1969247 Title: fallocate with FALLOC_FL_ZERO_RANGE produces zero-size files on zfs in Jammy To manage notifications about this bug go to: https://bugs.launchpad.net/zfs/+bug/1969247/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1969247] Re: fallocate with FALLOC_FL_ZERO_RANGE produces zero-size files on zfs in Jammy
This bug was fixed in the package zfs-linux - 2.1.4-0ubuntu0.1 --- zfs-linux (2.1.4-0ubuntu0.1) jammy; urgency=medium * New upstream point release (LP: #1969482): - bufixes - performance fixes - v5.17 & v5.18 compat - scrub services - fix fallocate LP: #1969247 -- Dimitri John Ledkov Tue, 19 Apr 2022 15:44:23 +0100 ** Changed in: zfs-linux (Ubuntu) Status: In Progress => Fix Released -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1969247 Title: fallocate with FALLOC_FL_ZERO_RANGE produces zero-size files on zfs in Jammy To manage notifications about this bug go to: https://bugs.launchpad.net/zfs/+bug/1969247/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1969247] Re: fallocate with FALLOC_FL_ZERO_RANGE produces zero-size files on zfs in Jammy
The update fixed my lxd containers using the same method from above on my zfs jammy system. However it did not fix the base system itself. When I try to install mysql-server or run the fallocate test it still fails. Are there additional steps, other than just apt updating and upgrading, that I or other users will have to take to make sure it works on the base system once the fix is released? Thanks -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1969247 Title: fallocate with FALLOC_FL_ZERO_RANGE produces zero-size files on zfs in Jammy To manage notifications about this bug go to: https://bugs.launchpad.net/zfs/+bug/1969247/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1969247] Re: fallocate with FALLOC_FL_ZERO_RANGE produces zero-size files on zfs in Jammy
Hello Lena, or anyone else affected, Accepted zfs-linux into jammy-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/zfs- linux/2.1.4-0ubuntu0.1 in a few hours, and then in the -proposed repository. Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users. If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed- jammy to verification-done-jammy. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification- failed-jammy. In either case, without details of your testing we will not be able to proceed. Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping! N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days. ** Changed in: zfs-linux (Ubuntu Jammy) Status: New => Fix Committed -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1969247 Title: fallocate with FALLOC_FL_ZERO_RANGE produces zero-size files on zfs in Jammy To manage notifications about this bug go to: https://bugs.launchpad.net/zfs/+bug/1969247/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1969247] Re: fallocate with FALLOC_FL_ZERO_RANGE produces zero-size files on zfs in Jammy
** Changed in: zfs-linux (Ubuntu) Status: Triaged => In Progress -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1969247 Title: fallocate with FALLOC_FL_ZERO_RANGE produces zero-size files on zfs in Jammy To manage notifications about this bug go to: https://bugs.launchpad.net/zfs/+bug/1969247/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1969247] Re: fallocate with FALLOC_FL_ZERO_RANGE produces zero-size files on zfs in Jammy
** Changed in: zfs Status: New => Fix Released -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1969247 Title: fallocate with FALLOC_FL_ZERO_RANGE produces zero-size files on zfs in Jammy To manage notifications about this bug go to: https://bugs.launchpad.net/zfs/+bug/1969247/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1969247] Re: fallocate with FALLOC_FL_ZERO_RANGE produces zero-size files on zfs in Jammy
zfs-dkms ended up working for me using LXD with the following test case: sudo add-apt-repository ppa:ci-train-ppa-service/4831 sudo apt update sudo apt upgrade sudo apt install zfs-dkms lxd init lxc launch images:ubuntu/focal test-mysql lxc exec test-mysql bash # apt update && apt dist-upgrade -y # apt install mysql-server # touch foo.img # fallocate -z -l 10M foo.img # ll foo.img -rw-r--r-- 1 root root 10485760 ... -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1969247 Title: fallocate with FALLOC_FL_ZERO_RANGE produces zero-size files on zfs in Jammy To manage notifications about this bug go to: https://bugs.launchpad.net/zfs/+bug/1969247/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1969247] Re: fallocate with FALLOC_FL_ZERO_RANGE produces zero-size files on zfs in Jammy
I've picked up the PR into a bileto ppa https://launchpad.net/~ci-train-ppa-service/+archive/ubuntu/4831 it seems to work for me correctly. If one has MOK dkms key enrolled or secureboot disabled, one can use zfs-dkms package from the above ppa as a solution. Please test it and let me know. I will try to SRU that, but it may take a kernel sru cycle to fully land. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1969247 Title: fallocate with FALLOC_FL_ZERO_RANGE produces zero-size files on zfs in Jammy To manage notifications about this bug go to: https://bugs.launchpad.net/zfs/+bug/1969247/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1969247] Re: fallocate with FALLOC_FL_ZERO_RANGE produces zero-size files on zfs in Jammy
** Changed in: mysql-8.0 (Ubuntu) Status: Triaged => Invalid -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1969247 Title: fallocate with FALLOC_FL_ZERO_RANGE produces zero-size files on zfs in Jammy To manage notifications about this bug go to: https://bugs.launchpad.net/zfs/+bug/1969247/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1969247] Re: fallocate with FALLOC_FL_ZERO_RANGE produces zero-size files on zfs in Jammy
yeap that's bad. ** Changed in: zfs-linux (Ubuntu) Status: Confirmed => Triaged ** Changed in: zfs-linux (Ubuntu) Importance: Wishlist => High -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1969247 Title: fallocate with FALLOC_FL_ZERO_RANGE produces zero-size files on zfs in Jammy To manage notifications about this bug go to: https://bugs.launchpad.net/zfs/+bug/1969247/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1969247] Re: fallocate with FALLOC_FL_ZERO_RANGE produces zero-size files on zfs in Jammy
On jammy, it works on btrfs: root@nsn7:/mnt# rm -f foo.img; touch foo.img; fallocate -z -l 10M foo.img; ls -lah foo.img -rw-r--r-- 1 root root 10M abr 19 10:46 foo.img root@nsn7:/mnt# mount -t btrfs /btrfs.img on /mnt type btrfs (rw,relatime,ssd,space_cache=v2,subvolid=5,subvol=/) -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1969247 Title: fallocate with FALLOC_FL_ZERO_RANGE produces zero-size files on zfs in Jammy To manage notifications about this bug go to: https://bugs.launchpad.net/zfs/+bug/1969247/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1969247] Re: fallocate with FALLOC_FL_ZERO_RANGE produces zero-size files on zfs in Jammy
I applied zfs_fallocate_reserve_percent=0 to the kernel module, confirmed it was set, but I still see the same incorrect behavior with fallocate: root@nsn7:/tank/test# rm -f foo.img; touch foo.img; fallocate -z -l 10M foo.img; ls -lah foo.img -rw-r--r-- 1 root root 0 abr 19 10:35 foo.img root@nsn7:/tank/test# uname -a Linux nsn7 5.15.0-25-generic #25-Ubuntu SMP Wed Mar 30 15:54:22 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux root@nsn7:/tank/test# cat /sys/module/zfs/parameters/zfs_fallocate_reserve_percent 0 -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1969247 Title: fallocate with FALLOC_FL_ZERO_RANGE produces zero-size files on zfs in Jammy To manage notifications about this bug go to: https://bugs.launchpad.net/zfs/+bug/1969247/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1969247] Re: fallocate with FALLOC_FL_ZERO_RANGE produces zero-size files on zfs in Jammy
Impish kernel on zfs: andreas@nsnx:~$ rm foo.img andreas@nsnx:~$ touch foo.img andreas@nsnx:~$ fallocate -z -l 10M foo.img fallocate: fallocate failed: Operation not supported Jammy kernel on zfs: root@j1:~# touch foo.img root@j1:~# fallocate -z -l 10M foo.img root@j1:~# ll foo.img -rw-r--r-- 1 root root 0 Apr 18 18:06 foo.img Jammy kernel on ext4: andreas@nsn7:~$ touch foo.img andreas@nsn7:~$ fallocate -z -l 10M foo.img andreas@nsn7:~$ l foo.img -rw-rw-r-- 1 andreas andreas 10M abr 19 09:32 foo.img andreas@nsn7:~$ -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1969247 Title: fallocate with FALLOC_FL_ZERO_RANGE produces zero-size files on zfs in Jammy To manage notifications about this bug go to: https://bugs.launchpad.net/zfs/+bug/1969247/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1969247] Re: fallocate with FALLOC_FL_ZERO_RANGE produces zero-size files on zfs in Jammy
The impish kernel returns "not supported" when fallocate is used in the way mysql does it. That makes mysql aware of the problem, and switch strategies, and it works. The jammy kernel is saying all is fine with the call and its results, but it isn't. Mysql, or any userspace, shouldn't be second guessing the kernel. > Please let me know if setting zfs_fallocate_reserve_percent=0 is a workaround for now. We will test it and put in the release notes as a workaround if it works. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1969247 Title: fallocate with FALLOC_FL_ZERO_RANGE produces zero-size files on zfs in Jammy To manage notifications about this bug go to: https://bugs.launchpad.net/zfs/+bug/1969247/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1969247] Re: fallocate with FALLOC_FL_ZERO_RANGE produces zero-size files on zfs in Jammy
imho, mysql should still gain zfs specific knowledge that doing fallocate on CoW filesystems doesn't do what one expects it to do. ** Changed in: mysql-8.0 (Ubuntu) Status: Invalid => Triaged ** Changed in: zfs-linux (Ubuntu) Importance: Undecided => Wishlist -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1969247 Title: fallocate with FALLOC_FL_ZERO_RANGE produces zero-size files on zfs in Jammy To manage notifications about this bug go to: https://bugs.launchpad.net/zfs/+bug/1969247/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1969247] Re: fallocate with FALLOC_FL_ZERO_RANGE produces zero-size files on zfs in Jammy
However there is now also this: https://github.com/openzfs/zfs/pull/13338/files which seems to indicate that my / zfs understanding of the fallocate kernel flags are not what is done on other filesystems (and expected by stuff). If needed, we can look into pulling in https://github.com/openzfs/zfs/pull/13338/files Please let me know if setting zfs_fallocate_reserve_percent=0 is a workaround for now. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1969247 Title: fallocate with FALLOC_FL_ZERO_RANGE produces zero-size files on zfs in Jammy To manage notifications about this bug go to: https://bugs.launchpad.net/zfs/+bug/1969247/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1969247] Re: fallocate with FALLOC_FL_ZERO_RANGE produces zero-size files on zfs in Jammy
given how zfs works, to me this is normal and expected. Also this is expected on btrfs, and on xfs with cow turned on. zfs is copy on write filesystem, thus calling fallocate to "reserve" a large amount of free space doesn't make sense. As the created file is immutable in zfs, and any writes to it will be written to a newly allocated quota in the zvol. There is an option to tune the behaviour of fallocate https://manpages.ubuntu.com/manpages/jammy/en/man4/zfs.4.html zfs_fallocate_reserve_percent=110% (uint) Since ZFS is a copy-on-write filesystem with snapshots, blocks cannot be preallocated for a file in order to guarantee that later writes will not run out of space. Instead, fallocate(2) space preallocation only checks that sufficient space is currently available in the pool or the user's project quota allocation, and then creates a sparse file of the requested size. The requested space is multiplied by zfs_fallocate_reserve_percent to allow additional space for indirect blocks and other internal metadata. Setting this to 0 disables support for fallocate(2) and causes it to return EOPNOTSUPP. This functionality / behaviour was added in zfs-0.8.0-847-gf734301d22 upstream, this is why you don't see it with bionic GA kernel, but do observe this new behaviour with bionic HWE kernels or newer. If things are using fallocate, on top of zfs, they should be aware that fallocate on zfs proofs that the there is enough quota in the zvol pool. Thus mysql needs to gain zfs specific knowledge w.r.t. this. Alternatively, you can disable fallocate support on your system by adding modprobe.d snippet to set zfs module option zfs_fallocate_reserve_percent to zero. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1969247 Title: fallocate with FALLOC_FL_ZERO_RANGE produces zero-size files on zfs in Jammy To manage notifications about this bug go to: https://bugs.launchpad.net/zfs/+bug/1969247/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1969247] Re: fallocate with FALLOC_FL_ZERO_RANGE produces zero-size files on zfs in Jammy
** Changed in: zfs Status: Unknown => New -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1969247 Title: fallocate with FALLOC_FL_ZERO_RANGE produces zero-size files on zfs in Jammy To manage notifications about this bug go to: https://bugs.launchpad.net/zfs/+bug/1969247/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1969247] Re: fallocate with FALLOC_FL_ZERO_RANGE produces zero-size files on zfs in Jammy
** Summary changed: - fallocate produces zero-size files on zfs in Jammy + fallocate with FALLOC_FL_ZERO_RANGE produces zero-size files on zfs in Jammy ** Description changed: - I came across this error when testing various mysql setups in an LXD - container and managed to reproduce it consistently. I'm unable to - reproduce on Ubuntu desktop or server though since the prerequisites are - probably handled properly there. + [Summary] + + When running Jammy on zfs or LXD with a zfs pool on a Jammy host, + fallocate creates a zero-sized file. + + The issue was originally found when installing mysql on LXD, where + fallocate would create a zero-sized ib_logfile1 file. The original + information in this bug is based on that. + + [Steps to Reproduce] + + touch foo.img + fallocate -z -l 10M foo.img + ls -la foo.img + + On a non-zfs Jammy system this will show something like: + -rw-r--r-- 1 root root 10M ... + + while on zfs it will show: + -rw-rw-r-- 1 root root 0 ... + + [Original Description] + I came across this error when testing various mysql setups in an LXD container and managed to reproduce it consistently. I'm unable to reproduce on Ubuntu desktop or server though since the prerequisites are probably handled properly there. ProblemType: Package DistroRelease: Ubuntu 20.04 Package: mysql-server-8.0 8.0.28-0ubuntu0.20.04.3 ProcVersionSignature: Ubuntu 5.15.0-25.25-generic 5.15.30 Uname: Linux 5.15.0-25-generic x86_64 ApportVersion: 2.20.11-0ubuntu27.23 Architecture: amd64 CasperMD5CheckResult: skip Date: Fri Apr 15 21:31:09 2022 Dmesg: ErrorMessage: installed mysql-server-8.0 package post-installation script subprocess returned error exit status 1 KernLog: Logs.var.log.daemon.log: MySQLConf.etc.mysql.conf.d.mysql.cnf: [mysql] MySQLConf.etc.mysql.conf.d.mysqldump.cnf: [mysqldump] quick quote-names max_allowed_packet = 16M MySQLConf.etc.mysql.my.cnf: Error: [Errno 40] Too many levels of symbolic links: '/etc/mysql/my.cnf' MySQLVarLibDirListing: ['ibdata1', 'ib_logfile0', '#innodb_temp', 'debian-5.7.flag', '#ib_16384_0.dblwr', 'client-cert.pem', 'undo_001', 'server-cert.pem', 'mysql.ibd', '#ib_16384_1.dblwr', 'client-key.pem', 'ca-key.pem', 'sys', 'private_key.pem', 'mysql', 'undo_002', 'binlog.index', 'performance_schema', 'ib_buffer_pool', 'auto.cnf', 'ib_logfile1', 'public_key.pem', 'ca.pem', 'server-key.pem'] ProcCmdline: BOOT_IMAGE=/boot/vmlinuz-5.15.0-25-generic root=UUID=93666562-b5e4-4fb4-ba8c-7b42a3e6bf61 ro quiet splash mem_sleep_default=deep vt.handoff=7 Python3Details: /usr/bin/python3.8, Python 3.8.10, python3-minimal, 3.8.2-0ubuntu2 PythonDetails: N/A RelatedPackageVersions: dpkg 1.19.7ubuntu3 apt 2.0.6 SourcePackage: mysql-8.0 Title: package mysql-server-8.0 8.0.28-0ubuntu0.20.04.3 failed to install/upgrade: installed mysql-server-8.0 package post-installation script subprocess returned error exit status 1 UpgradeStatus: No upgrade log present (probably fresh install) ** Bug watch added: github.com/openzfs/zfs/issues #13329 https://github.com/openzfs/zfs/issues/13329 ** Also affects: zfs via https://github.com/openzfs/zfs/issues/13329 Importance: Unknown Status: Unknown -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1969247 Title: fallocate with FALLOC_FL_ZERO_RANGE produces zero-size files on zfs in Jammy To manage notifications about this bug go to: https://bugs.launchpad.net/zfs/+bug/1969247/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs