FS#50703 - [linux] [lvm2] resume from hibernation fails with swap on thin lvm

Attached to Project: Arch Linux
Opened by nl6720 (nl6720) - Thursday, 08 September 2016, 11:56 GMT
Last edited by Christian Hesse (eworm) - Wednesday, 10 February 2021, 09:53 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To Tobias Powalowski (tpowa)
Christian Hesse (eworm)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description:
Kernel fails to load hibernation image when swap is on thin volume.

Additional info:
* package version(s)
* config and/or log files etc.

linux 4.7.2-1
lvm2 2.02.164-1

lvs output:
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
mythinpool VMStorage twi-aotz-- 29,39g 6,96 3,52
thinroot VMStorage Vwi-aotz-- 8,00g mythinpool 25,04
thinswap VMStorage Vwi-aotz-- 4,00g mythinpool 0,91


attached is output of journalctl -lk

Steps to reproduce:

Create thinpool with thin volumes for root and swap.
Add "resume=/path/to/thinswap" to bootloader.
Hibernate.
Try to resume from hibernation.
Fail.
   boot.log (43.4 KiB)
This task depends upon

Closed by  Christian Hesse (eworm)
Wednesday, 10 February 2021, 09:53 GMT
Reason for closing:  Won't fix
Additional comments about closing:  probably limitation in linux
Comment by nl6720 (nl6720) - Friday, 23 September 2016, 12:49 GMT
Attached is output of journalctl -b
   boot.log (57.8 KiB)
Comment by mattia (nTia89) - Tuesday, 03 October 2017, 20:08 GMT
is this issue still valid?
Comment by nl6720 (nl6720) - Wednesday, 04 October 2017, 09:39 GMT
Still an issue for me.
Comment by mattia (nTia89) - Wednesday, 04 October 2017, 16:13 GMT
unfortunately currently I can't help you directly, but
are you using a virtual machine?

EDIT: could be useful, https://01.org/blogs/rzhang/2015/best-practice-debug-linux-suspend/hibernate-issues
EDIT2: could be linked to this, https://bugs.archlinux.org/task/53422
Comment by nl6720 (nl6720) - Wednesday, 04 October 2017, 18:17 GMT
This is a Virtualbox VM. I prefer to test things in VM before using them on real hardware.
The issue only occurs with swap on thin lvm. I don't recall ever having any issues with hibernating in real or virtual hardware before.
Comment by nl6720 (nl6720) - Sunday, 29 December 2019, 18:18 GMT
I tested this on "real" hardware (Arch on an external HDD).
Resuming from hibernation works on real hardware, but in a VirtualBox VM, with the external HDD attached, resuming fails. The VM can't resume from a hibernation image created on real hardware, nor the other way around.

There were some corruption issues (once with the thin pool, the other time with the swap volume), but I don't know if those were caused by the failed resuming in the VM or maybe overprovisioning.
Some day, I'll reinstall Arch on that drive and test again.
Comment by nl6720 (nl6720) - Wednesday, 29 April 2020, 09:28 GMT Comment by Christian Hesse (eworm) - Wednesday, 10 February 2021, 09:53 GMT
What's the point in having a thin volume being filled up completely?
IMHO the section in wiki does not make much sense.

Anyway, I think it's not lvm2 being the issue here. Possibly the issue is related to the fact that the linux kernel can not handle sparse files for swap?

Loading...