← Back to team overview

kernel-packages team mailing list archive

[Bug 1584052] Re: btrfs: file write crashes with false ENOSPC during snapshot creation since kernel 4.4 - fix available

 

Another 24 error-free hours on the server with the test kernel running
the MySQL/Icinga2 combination and creating btrfs snapshots every 5
minutes.

I'd like to add that this server, which previously experienced frequent false ENOSPC conditions with the Xenial release kernel, used a fairly plain btrfs configuration at all times:
- The '-o nodatacow' mount option was *not* used (in contrast to the test script).
- Disabling copy-on-write (CoW) on a per-file basis (using chattr +C) was *not* used.

#  mount | grep /volumes/01
/dev/sda2 on /volumes/01 type btrfs (rw,noatime,nodiratime,ssd,space_cache,subvolid=5,subvol=/)

# lsattr /var/lib/mysql/ibdata1 
---------------- /var/lib/mysql/ibdata1

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1584052

Title:
  btrfs: file write crashes with false ENOSPC during snapshot creation
  since kernel 4.4 - fix available

Status in linux package in Ubuntu:
  In Progress
Status in linux source package in Xenial:
  In Progress

Bug description:
  Kernel 4.4 introduced a btrfs bug where a process writing a file while
  a snapshot creation is underway will receive a false ENOSPC error (No
  space left on device), even while there is plenty of free space on the
  file system. On systems where snapshots are created frequently, this
  leads to frequent database crashes (here with MySQL):

  2016-05-19T21:00:01.862106Z 0 [Warning] InnoDB: Retry attempts for writing partial data failed.
  2016-05-19T21:00:01.862133Z 0 [ERROR] InnoDB: Write to file ./ibdata1failed at offset 1048576, 16384 bytes should have been written, only 0 were written. Operating system error number 28. Check that your OS a
  nd file system support files of this size. Check also that the disk is not full or a disk quota exceeded.
  2016-05-19T21:00:01.862143Z 0 [ERROR] InnoDB: Error number 28 means 'No space left on device'

  The problem is well known: http://www.spinics.net/lists/linux-btrfs/msg52672.html
  A patch is available: https://patchwork.kernel.org/patch/7967161/
  The patch has been committed to the Linux Kernel source tree on Feb 18, 2016: https://github.com/torvalds/linux/commits/master/fs/btrfs/file.c

  Creating snapshots for undo and backup purposes without interrupting
  database operations is a central aspect of btrfs usage. This bug
  breaks server operations and should be fixed in the xenial kernel.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1584052/+subscriptions


References