Daniel Schwager wrote:
Hi Paul,thanks for the answer. - Is there a possibility to sync ONLY my device on client side ?
Yes, fsync the file descriptor you have opened on the file or device.
Not the whole system cache - means ALL devices ? - can I disconnect safely after this sync-command came back ?
Yes, nbd I/O is synchronous, meaning the data will have been written to the server side(*) when the I/O completes on the client. A sync guarantees completion of any previously submitted I/Os.
* - the data will be in the page cache on the server side when the I/O completes, but not necessarily physically on the server's disk (at least, I don't believe the current nbd-server will issue a sync).
- do I have to sync also on server side ?
You shouldn't have to, unless you're trying to protect against a reboot or crash, which might cause loss of cached data on the server side.
And KILL the nbd-server after ?
The client disconnect will cause the server to die. If either end of the connection is terminated, the other side will also stop.
-- Paul