Re: [Nbd] (no subject)
- To: Daniel Schwager <Daniel.Schwager@...207...>
- Cc: email@example.com
- Subject: Re: [Nbd] (no subject)
- From: Paul Clements <paul.clements@...124...>
- Date: Tue, 14 Jul 2009 14:15:49 -0400
- Message-id: <4A5CCB55.1030004@...124...>
- In-reply-to: <EB31672367A401439CD5A4A10889D57B019891CD@...661...>
- References: <EB31672367A401439CD5A4A10889D57B019891C8@...661...> <4A5CC30E.50101@...124...> <EB31672367A401439CD5A4A10889D57B019891CD@...661...>
Daniel Schwager wrote:
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.