Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dumping process using external hdd as block device #2348

Closed
benibela opened this issue Feb 13, 2024 · 1 comment
Closed

Dumping process using external hdd as block device #2348

benibela opened this issue Feb 13, 2024 · 1 comment

Comments

@benibela
Copy link

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
Copy link
Member

Snorch commented Feb 26, 2024

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

@Snorch Snorch closed this as completed Feb 26, 2024
YarBor pushed a commit to YarBor/criu that referenced this issue Feb 26, 2024
…tories, When many duḿps failed

Signed-off-by: YarBor <yarbor.ww@gmail.com>
YarBor pushed a commit to YarBor/criu that referenced this issue Feb 26, 2024
When many duḿps failed in checkpoint-restore#2348, it created a bunch of empty directories

```txt
drwx------ 2 root   root   4096 Feb 12 23:48 .criu.temp-aa-policy.8uhTbO
drwx------ 2 root   root   4096 Feb 12 23:51 .criu.temp-aa-policy.90Vqt9
drwx------ 2 root   root   4096 Feb 12 23:29 .criu.temp-aa-policy.9an3IS
drwx------ 2 root   root   4096 Feb 12 23:51 .criu.temp-aa-policy.CBz1ud
drwx------ 2 root   root   4096 Feb 12 23:39 .criu.temp-aa-policy.eA0Kj6
drwx------ 2 root   root   4096 Feb 12 23:34 .criu.temp-aa-policy.GD04gM
drwx------ 2 root   root   4096 Feb 12 23:38 .criu.temp-aa-policy.ItnOKf
drwx------ 2 root   root   4096 Feb 12 23:57 .criu.temp-aa-policy.NuRSjL
drwx------ 2 root   root   4096 Feb 12 23:57 .criu.temp-aa-policy.nUX8Kq
drwx------ 2 root   root   4096 Feb 12 23:36 .criu.temp-aa-policy.PGi24L
drwx------ 2 root   root   4096 Feb 12 23:35 .criu.temp-aa-policy.QNuwGp
drwx------ 2 root   root   4096 Feb 12 23:28 .criu.temp-aa-policy.RyvBPt
drwx------ 2 root   root   4096 Feb 12 23:41 .criu.temp-aa-policy.TXQpQv
drwx------ 2 root   root   4096 Feb 12 23:41 .criu.temp-aa-policy.URYvi0
drwx------ 2 root   root   4096 Feb 12 23:34 .criu.temp-aa-policy.VJixh8
drwx------ 2 root   root   4096 Feb 12 23:48 .criu.temp-aa-policy.whT8gi
```
delete the directories after aborting

Signed-off-by: YarBor <yarbor.ww@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants