I'm trying to get RavenDB running in embedded mode on a shared/multi-tenant webhost. RavenDB relies on the ESENT storage API. The filesystem on the hosting machines is locked down. The RavenDB Initialize() call results in the following eventlog entry
Raven (20604) D:\Path\To\Website\App_Data\RavenDB\Data52e0e402-79d7-4f47-a219-3d1e2e73321c: An attempt to determine the minimum I/O block size for the volume "D:\" containing "D:\Path\To\Website\App_Data\RavenDB\logs\" failed with system error 5 (0x00000005): "Access is denied. ". The operation will fail with error -1032 (0xfffffbf8).
So presumably the executing process needs access to read some volume information and that is denied because the process is only given permissions to the parts of the volume relevant to it.
Anyone know what the relevant rights are, and whether they can be omitted somehow?
P.S.: someone with more karma than me please tag this ravendb
and esent
The Microsoft KB266361 shows error messages for ESE error codes.
In this case the error code -1032 is “Cannot access file, the file is locked or in use”.
Looking at other Microsoft products that heavily use ESE such as Exchange (See http://technet.microsoft.com/en-us/library/bb218334(v=exchg.80).aspx) the error message seems to be more consistent with a locking issue more so than a permission issue. Based on that you are running in a heavily multi-threaded environment of IIS with multi-tenancy this a locking issue would again be highly likely.
To help investigate this issue I would suggest using something like Process Explorer (See http://technet.microsoft.com/en-us/sysinternals/bb896653) to find out who has a lock on the file. This may show an external source as the cause of the file locking.
I would suggest investigating the method calling
Initialize()
. In high concurrency environments it may be possible for the method to be called by two separate threads. You may need tolock
the section of code responsible for this function call.If this does not help it may be better to ask the question with a code sample on StackOverflow.
Hope this helps.
Reading extended attributes on drive (root) is required for user/users on shared hosting to determine I/O block size.