Project

General

Profile

Actions

Feature #42290

open

rbd export add --sync flag

Added by l w over 4 years ago. Updated over 4 years ago.

Status:
Need More Info
Priority:
Normal
Assignee:
-
Target version:
-
% Done:

0%

Source:
Tags:
Backport:
Reviewed:
Affected Versions:
Pull request ID:

Description

When using rbd export to download images, pagecache is used when reading and writing local files. But there will be some applications, such as qemu, they will use direct io to access files. So there will be inconsistencies at this time. Qemu uses direct io to read files from the hard disk, but the files download by rbd are not completely flush, which will cause serious inconsistency.

If you want to use cgroup to limit the speed of rbd export or rbd import, if not sync io or direct io. Basically does not work.

Combine the above two points, so I want to add the --sync parameter to the rbd export to support this feature. If don't use the -sync parameter, it still read and write in the previous way.

Actions #1

Updated by Jason Dillaman over 4 years ago

  • Status changed from New to Need More Info

I don't think I understand what you are saying. Why don't you just run "sync"? How is this different than any other program that writes to the disk (e.g. cp vm.raw vm2.raw)? How does cgroup break "rbd export" and "rbd import"?

Actions #2

Updated by l w over 4 years ago

Jason Dillaman wrote:

I don't think I understand what you are saying. Why don't you just run "sync"? How is this different than any other program that writes to the disk (e.g. cp vm.raw vm2.raw)? How does cgroup break "rbd export" and "rbd import"?

rbd export will use pagecache, don't sync immediately to disk. but qemu use direct io write/read to disk.
cgroup blkio only limit sync or direct io. Other io modes can't be limited.

Actions #3

Updated by Mykola Golub over 4 years ago

  • Subject changed from red export add --sync flag to rbd export add --sync flag
Actions

Also available in: Atom PDF