turning the root volume into a snapshot stalls (ioctl hangs)
for energy saving purposes I try to buffer disk accesses in RAM by making the
mounted (LVM) volume a snapshot and putting the COW device on tmpfs (loop
device over a sparse file) so that I can flush the changes later by making the
volume a snapshot-merge target. Note: I am NOT trying to make a snapshot of
the root volume! (This has obviously been done sucessfully by others.)
This works for a data volume but the system hangs when trying this with the
root volume. The interesting point: The problem seems not to be caused by an
access to the root filesystem.
I have created a chroot environment in a tmpfs volume (and sucessfully done
this with a data volume from there). The relevant part of the script (located
in the chroot environment, of course) is:
The same call for the root volume leads to
ioctl(3, DM_TABLE_LOAD, 0x6161f0) =
(I am not sure about the 0x6161f0)
The exit code never appears. I do not know whether this is a problem of the
ioctl or one of strace. But as the volume has already been suspended at that
time I do not see any reason why strace should be affected. The system is not
completely dead but no useful actitivy is possible any more.
Issuing a suspend and a resume immediately afterwards (without the load) does
not kill the system. So the problem seems to be about the dmsetup load.
This is openSUSE 11.4.
start cmd:> uname -a
Linux inno 220.127.116.11-0.7-desktop #1 SMP PREEMPT 2011-07-21 02:17:24 +0200
x86_64 x86_64 x86_64 GNU/Linux