[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [Nbd] (no subject)

Daniel Schwager wrote:

we are using nbd in a high storage intensive area - a lot of changes
are written to nbd-devices AND ndb-client- and nbd-server (@solaris)
will be created and destroyed on the fly.

At the moment we have some problems while shutting down a nbd connection
(client, server) without losing data written to the client-nbd
but not available on the storage connected to the nbd-server.

	- startup nbd server (@solaris) & client (@linux)
	- write a lot of data and IMMEDIATELY after

Right here, you have to issue a 'sync' (of fsync the fd in code) to guarantee that the data has been sent to the server.

	- shutdown client (nbd-client -d) and IMMEDIATELY after
	- shutdown server (yust kill -TERM <pid>

- Problem
	- the storage behind the nbd-server is not consistent to the data written
	  from the client site to the nbd-connection	

I think it could be a caching topic - maybe kblockd has not flushed the
data ? Or may I'm not allowed to send a TERM to the server ?

Yes, data will remain in the kernel's page cache until it is flushed down to the block device. The kernel also periodically flushes data down to the devices, if no explicit flush is issued.


Reply to: