[Bug 1892728] Re: ec2-hibinit-agent needs to properly initialize swap file

Ɓukasz Zemczak 1892728 at bugs.launchpad.net
Thu Aug 27 15:26:26 UTC 2020


** Also affects: ec2-hibinit-agent (Ubuntu Groovy)
   Importance: Undecided
       Status: Confirmed

** Tags removed: rls-gg-incoming

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to ec2-hibinit-agent in Ubuntu.
https://bugs.launchpad.net/bugs/1892728

Title:
  ec2-hibinit-agent needs to properly initialize swap file

Status in ec2-hibinit-agent package in Ubuntu:
  Confirmed
Status in ec2-hibinit-agent source package in Groovy:
  Confirmed

Bug description:
  With commit 30460e1ea3e6 ("fs: Enable bmap() function to properly
  return errors"), applied to v5.6-rc1, running swapon on a file that
  has holes returns an error (EINVAL); hibinit-agent is creating the
  swap file just using fallocate(), without touching the whole file by
  deafult, so there might be holes, swapon fails and hibernation cannot
  be performed.

  To prevent this problem we need to touch the swap file before using it
  and this can be done setting "touch-swap = True" in /etc/hibinit-
  config.cfg.

  The downside of this setting is that a new instance requires more time
  to be properly "initialized" the first time it boots due to the extra
  I/O required to touch the swap file (this additional I/O can be quite
  consistent in large instances, like c5.18xlarge for example), but I
  don't see a better way to make sure the file is all allocated without
  holes, so I guess we need to turn on this option if we want to use
  hibernation w/ kernels >= 5.6.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ec2-hibinit-agent/+bug/1892728/+subscriptions



More information about the foundations-bugs mailing list