I’m trying to use CLFS logs stored on cluster shared volume on all cluster nodes.
When I try to open CLFS log file on multiple nodes concurrently CreateLogFile succeeds only on one node and it fails on other cluster nodes with following error:
W32.32.(The process cannot access the file because it is being used by another process.) - CreateLogFile failed, LogFile=C:\ClusterStorage\Volume4\CSVRepTmp1
I’m opening CLFS log in FILE_SHARE_WRITE | FILE_SHARE_DELETE | FILE_SHARE_READ on all nodes however its still failing.
HANDLE lh = CreateLogFile( “LOG:C:\ClusterStorage\Volume4\CSVTmp”,
GENERIC_WRITE|GENERIC_READ,
FILE_SHARE_WRITE | FILE_SHARE_DELETE | FILE_SHARE_READ,
NULL,
OPEN_ALWAYS,
0 );
When I traced file system activity with procmon, I found that on node which can open CLFS log file CreateLogFile is creating log file with share mode Read only.
6:05:10.6795927 AM CLFSSample.exe 6228 CreateFile \Device\CSVVolume1\CSVTmp.blf SUCCESS Desired Access: Generic Read/Write, Disposition: Open, Options: Write Through, Sequential Access, No Buffering, No Compression, Attributes: N, ShareMode: Read, AllocationSize: n/a, OpenResult: Opened
For other nodes CreateFile is failing with error “The process cannot access the file because it is being used by another process.”.
How can I use CLFS logs on a CSV on all cluster nodes concurrently?