checkpoint-restore / criu

Checkpoint/Restore tool
criu.org
Other
2.76k stars 560 forks source link

Dumping process using external hdd as block device #2348

Closed benibela closed 4 months ago

benibela commented 4 months ago

I need to stop a program working on my external hdd partition directly. (it is taking too long and i need to go on a transatlantic flight)

I tried

 criu dump -t 19099 --external dev[8/34]:/dev/sdc2

but it does not want to:


Error (criu/files-ext.c:94): Can't dump file 3 of that type [60660] (unknown /dev/sdc2)
Error (criu/cr-dump.c:1361): Dump files (pid: 19099) failed with -1
Error (criu/cr-dump.c:1781): Dumping FAILED.

how does one do this?

Snorch commented 4 months ago

CRIU does not support dumping block device files.

#define S_IFBLK  0060000

You may want to look on https://criu.org/Inheriting_FDs_on_restore to learn how you can use external file CRIU options to overcome this.

upd: Ok I was wrong, external option does not work with block devices either.

There is a plugin external file option which might help, see how it is used in amdgpu plugin https://github.com/checkpoint-restore/criu/blob/criu-dev/plugins/amdgpu/amdgpu_plugin.c#L1332