Disable file locking on iSCSI drives

51 views
Skip to first unread message

Mike Leone

unread,
Aug 7, 2025, 12:58:29 PMAug 7
to NTSysAdmin
This confuses me. My devs are reporting a problem with some Oracle software they're using (the WCC product, apparently, the 12c version). And they say Oracle support is telling them:

"In 12c the content server handles all file locking. Any NAS or SAN should have drives mounted without the locking feature enabled. Please check and verify. "

I know about telling the OS about file locking configurations (such as in SMB protocol). But how would I turn off all file locking? Isn't that ... impossible? LOL

This would be on a cluster drive that is mounted via iSCSI. This would be WIn 2019.


--

Mike. Leone, <mailto:tur...@mike-leone.com>

PGP Fingerprint: 0AA8 DC47 CB63 AE3F C739 6BF9 9AB4 1EF6 5AA5 BCDF
Photo Gallery: <http://www.flickr.com/photos/mikeleonephotos>

Michael B. Smith

unread,
Aug 7, 2025, 2:24:39 PMAug 7
to ntsys...@googlegroups.com

iSCSI is a block-oriented storage protocol.

 

It doesn’t do locking. NTFS doesn’t do locking.

 

On Windows, cluster shared volumes (CSV) provide locking. So does Storage Spaces Direct (SSD). On Unix/Linux, it’s rpc.lockd and the file systems that support it.

 

SMB is a higher-level protocol that provides “operational locking” via a shared library (and in fact, on Unix/Linux it uses rpc.lockd to do so).

 

Suffice it to say, that unless that “cluster drive” is a CSV or a member of an SSD pool, there are no Windows locks getting in the way of the software.

--
You received this message because you are subscribed to the Google Groups "ntsysadmin" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ntsysadmin+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/ntsysadmin/CAHBr%2B%2Bg%2BnkRBk3D%3DRx9MD8pUJ%3DAn9wUu3cdNNW-0qXqdPryRXg%40mail.gmail.com.

Mike Leone

unread,
Aug 7, 2025, 3:07:10 PMAug 7
to ntsys...@googlegroups.com
On Thu, Aug 7, 2025 at 2:24 PM Michael B. Smith <mic...@smithcons.com> wrote:

iSCSI is a block-oriented storage protocol.

 

It doesn’t do locking. NTFS doesn’t do locking.

 

On Windows, cluster shared volumes (CSV) provide locking. So does Storage Spaces Direct (SSD). On Unix/Linux, it’s rpc.lockd and the file systems that support it.

 

SMB is a higher-level protocol that provides “operational locking” via a shared library (and in fact, on Unix/Linux it uses rpc.lockd to do so).

 

Suffice it to say, that unless that “cluster drive” is a CSV or a member of an SSD pool, there are no Windows locks getting in the way of the software.


No, not a CSV.
 As for an SSD pool ... the drive is presented as iSCSI from a Nutanix cluster. I don't think all the drives on Nutanix are SSD. There are no pools or enclosures on the Windows cluster.

It's just a Windows cluster, with 1 role (file server), and 2 shares (1 on each drive shown above)

PS C:\Windows\system32> Get-cluster

Name
----
PHAMSCLUST27

PS C:\Windows\system32> Get-cluster | get-clustersharedvolume

PS C:\Windows\system32> get-cluster -Name "PHAMSCLUST27" | FL *


AddEvictDelay                           : 60
AdministrativeAccessPoint               : ActiveDirectoryAndDns
AutoAssignNodeSite                      : 0
AutoBalancerMode                        : 2
AutoBalancerLevel                       : 1
BackupInProgress                        : 0
BlockCacheSize                          : 1024
DetectedCloudPlatform                   : None
DetectManagedEvents                     : 1
DetectManagedEventsThreshold            : 60
ClusSvcHangTimeout                      : 135
ClusSvcRegroupStageTimeout              : 15
ClusSvcRegroupTickInMilliseconds        : 300
ClusterEnforcedAntiAffinity             : 0
ClusterFunctionalLevel                  : 10
ClusterUpgradeVersion                   : 3
ClusterGroupWaitDelay                   : 120
ClusterLogLevel                         : 3
ClusterLogSize                          : 1536
CrossSiteDelay                          : 1000
CrossSiteThreshold                      : 20
CrossSubnetDelay                        : 1000
CrossSubnetThreshold                    : 20
CsvBalancer                             : 1
DatabaseReadWriteMode                   : 0
DefaultNetworkRole                      : 3
Description                             :
Domain                                  : wrk.ads.pha.phila.gov
DrainOnShutdown                         : 1
DumpPolicy                              : 1376850201
DynamicQuorum                           : 1
EnableSharedVolumes                     : Enabled
FixQuorum                               : 0
GroupDependencyTimeout                  : 600
HangRecoveryAction                      : 6
Id                                      : c9c887c5-7525-4aa8-bac0-bb8a9f34b0ec
IgnorePersistentStateOnStartup          : 0
LogResourceControls                     : 0
LowerQuorumPriorityNodeId               : 0
MessageBufferLength                     : 50
MinimumNeverPreemptPriority             : 3000
MinimumPreemptorPriority                : 1
Name                                    : PHAMSCLUST27
NetftIPSecEnabled                       : 1
PlacementOptions                        : 0
PlumbAllCrossSubnetRoutes               : 0
PreferredSite                           :
PreventQuorum                           : 0
QuarantineDuration                      : 7200
QuarantineThreshold                     : 3
QuorumArbitrationTimeMax                : 20
RecentEventsResetTime                   : 4/27/2021 5:26:39 PM
RequestReplyTimeout                     : 60
ResiliencyDefaultPeriod                 : 240
ResiliencyLevel                         : AlwaysIsolate
RouteHistoryLength                      : 40
S2DBusTypes                             : 0
S2DCacheBehavior                        : Default
S2DCacheDesiredState                    : Enabled
S2DCacheMetadataReserveBytes            : 34359738368
S2DCachePageSizeKBytes                  : 16
S2DEnabled                              : 0
S2DIOLatencyThreshold                   : 10000
S2DOptimizations                        : 0
SameSubnetDelay                         : 1000
SameSubnetThreshold                     : 20
SecurityLevel                           : 1
SecurityLevelForStorage                 : 0
SharedVolumeCompatibleFilters           : {}
SharedVolumeIncompatibleFilters         : {}
SharedVolumeSecurityDescriptor          : {1, 0, 4, 128...}
SharedVolumesRoot                       : C:\ClusterStorage
SharedVolumeVssWriterOperationTimeout   : 1800
ShutdownTimeoutInMinutes                : 20
UseClientAccessNetworksForSharedVolumes : 2
WitnessDatabaseWriteTimeout             : 300
WitnessDynamicWeight                    : 1
WitnessRestartInterval                  : 15
EnabledEventLogs                        : {Microsoft-Windows-Hyper-V-VmSwitch-Diagnostic,4,0xFFFFFFFD,
                                          Microsoft-Windows-SMBDirect/Debug,4, Microsoft-Windows-SMBServer/Analytic,
                                          Microsoft-Windows-Kernel-LiveDump/Analytic}


 I honestly didn't think it was a windows feature causing file locking. The DEVs are convinced it's a file lock, tho. I don't see how .. I mean, I know there are ways in Powershell to adjust smb-share settings ... I believe in the past we turned off oplocks ... And I should probably enforce SMB signing, but the SMB signing state wouldn't have any impact currently ... I don't see anything I could/should be changing here ...

PS C:\Windows\system32> get-smbserverconfiguration


AnnounceComment                 :
AnnounceServer                  : False
AsynchronousCredits             : 512
AuditSmb1Access                 : False
AutoDisconnectTimeout           : 15
AutoShareServer                 : True
AutoShareWorkstation            : True
CachedOpenLimit                 : 10
DurableHandleV2TimeoutInSeconds : 180
EnableAuthenticateUserSharing   : False
EnableDownlevelTimewarp         : False
EnableForcedLogoff              : True
EnableLeasing                   : True
EnableMultiChannel              : True
EnableOplocks                   : False
EnableSecuritySignature         : True
EnableSMB1Protocol              : False
EnableSMB2Protocol              : True
EnableStrictNameChecking        : True
EncryptData                     : False
IrpStackSize                    : 15
KeepAliveTime                   : 2
MaxChannelPerSession            : 32
MaxMpxCount                     : 50
MaxSessionPerConnection         : 16384
MaxThreadsPerQueue              : 20
MaxWorkItems                    : 1
NullSessionPipes                :
NullSessionShares               :
OplockBreakWait                 : 35
PendingClientTimeoutInSeconds   : 120
RejectUnencryptedAccess         : True
RequireSecuritySignature        : False
ServerHidden                    : True
Smb2CreditsMax                  : 8192
Smb2CreditsMin                  : 512
SmbServerNameHardeningLevel     : 0
TreatHostAsStableStorage        : False
ValidateAliasNotCircular        : True
ValidateShareScope              : True
ValidateShareScopeNotAliased    : True
ValidateTargetName              : True


S Z:\> get-smbshare -Name WCC_DEV  | FL *


PresetPathAcl         : System.Security.AccessControl.DirectorySecurity
ShareState            : Online
AvailabilityType      : Clustered
ShareType             : FileSystemDirectory
FolderEnumerationMode : Unrestricted
CachingMode           : None
LeasingMode           : None
SmbInstance           : Default
CATimeout             : 0
ConcurrentUserLimit   : 0
ContinuouslyAvailable : True
CurrentUsers          : 8
Description           : Web Center - DEV storage
EncryptData           : False
IdentityRemoting      : False
Infrastructure        : False
Name                  : WCC_DEV
Path                  : F:\shares\wcc_dev
Scoped                : True
ScopeName             : DC2_FILESHARE01
SecurityDescriptor    : O:BAG:DUD:(A;;FA;;;WD)
ShadowCopy            : False
Special               : False
Temporary             : False
Volume                : \\?\Volume{d1e94874-8001-4013-bfc5-762beb43fbbd}\
PSComputerName        :
CimClass              : ROOT/Microsoft/Windows/SMB:MSFT_SmbShare
CimInstanceProperties : {AvailabilityType, CachingMode, CATimeout, ConcurrentUserLimit...}
CimSystemProperties   : Microsoft.Management.Infrastructure.CimSystemProperties



 

From: ntsys...@googlegroups.com <ntsys...@googlegroups.com> On Behalf Of Mike Leone
Sent: Thursday, August 7, 2025 12:58 PM
To: NTSysAdmin <ntsys...@googlegroups.com>
Subject: [ntsysadmin] Disable file locking on iSCSI drives

 

This confuses me. My devs are reporting a problem with some Oracle software they're using (the WCC product, apparently, the 12c version). And they say Oracle support is telling them:

 

"In 12c the content server handles all file locking. Any NAS or SAN should have drives mounted without the locking feature enabled. Please check and verify. "

 

I know about telling the OS about file locking configurations (such as in SMB protocol). But how would I turn off all file locking? Isn't that ... impossible? LOL

 

This would be on a cluster drive that is mounted via iSCSI. This would be WIn 2019.

 

 

--


Mike. Leone, <mailto:tur...@mike-leone.com>

PGP Fingerprint: 0AA8 DC47 CB63 AE3F C739 6BF9 9AB4 1EF6 5AA5 BCDF
Photo Gallery: <http://www.flickr.com/photos/mikeleonephotos>

--
You received this message because you are subscribed to the Google Groups "ntsysadmin" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ntsysadmin+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/ntsysadmin/CAHBr%2B%2Bg%2BnkRBk3D%3DRx9MD8pUJ%3DAn9wUu3cdNNW-0qXqdPryRXg%40mail.gmail.com.

--
You received this message because you are subscribed to the Google Groups "ntsysadmin" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ntsysadmin+...@googlegroups.com.

Michael B. Smith

unread,
Aug 7, 2025, 3:12:36 PMAug 7
to ntsys...@googlegroups.com

You have SMB locking disabled:

 

EnableOplocks                   : False
              

But you also have CSVs enabled:

 

               EnableSharedVolumes             : Enabled

If you are sure the volume isn’t a CSV, then it’s a Nutanix question. And I can’t help you with that.

Mike Leone

unread,
Aug 7, 2025, 3:18:43 PMAug 7
to ntsys...@googlegroups.com
I don't remember setting the shared volume. I've never explicitly used one (that I know of). When I do the powershell command to get shared volumes, it doesn't return anything.

PS C:\Windows\system32> get-clustersharedvolume
PS C:\Windows\system32>

I *think* that means that I *could* have shared volumes, but I don't currently have any defined that way?


Michael B. Smith

unread,
Aug 8, 2025, 7:19:14 AMAug 8
to ntsys...@googlegroups.com

Mike Leone

unread,
Aug 8, 2025, 9:57:38 AMAug 8
to ntsys...@googlegroups.com
BTW ... we had a very similar question about 3 years ago LOL


I did notice that the file share has a leasing mode set to "none", but the 2 client VMs accessing the file share had set-smbclientconfiguration settings. SO I changed both of these, on each app server:

PS C:\Windows\system32> Get-SmbClientConfiguration

OplocksDisabled                       : True
UseOpportunisticLocking               : False

It may not help. As long as it doesn't hurt. LOL


Severino Juan Miguel

unread,
Aug 8, 2025, 8:07:45 PMAug 8
to ntsys...@googlegroups.com

Hi

 

> iSCSI is a block-oriented storage protocol.

> It doesn’t do locking. NTFS doesn’t do locking.

 

Both do locking.

iSCSI uses SCSI reservations, which are required if you have shared LUNs. It is a mess, so vmware implemented other acceleration systems.

NTFS uses locking. Try to delete an open file.

 

SMB does locking too, in most cases without app intervention for caching: Oplocks, which usually are the mother of all network data corruptions. I saw elsewhere that they were disabled which is... misleading (that setting applies for SMB1 only).

 

I would check it on the share level (they cannot be disabled on SMB2/3):

get-smbshare <share>|fl -Property *

 

Search for Leasing Mode. Anything other than None means that Oplocks (and servers blocking each other) are active.

 

Best regards

Seve

 

 

Von: ntsys...@googlegroups.com <ntsys...@googlegroups.com> Im Auftrag von Michael B. Smith
Gesendet: Donnerstag, 7. August 2025 20:22
An: ntsys...@googlegroups.com
Betreff: RE: [ntsysadmin] Disable file locking on iSCSI drives

 

-!-!-!- EXTERNAL EMAIL -!-!-!- This email originated from outside of SKAN. Do not click links or open attachments unless you recognize the sender and know the content is safe

The content of this message is confidential and shall be used solely for the intended purpose and by the intended recipient. If you received this email by mistake, please inform us immediately and delete this message without disclosing its content to any other person. Any viewing, copying or distribution of, or reliance on this message by unintended recipients is strictly prohibited. The integrity and security of this email cannot be guaranteed over the internet. The sender shall not be held liable for any damage caused by this message.

Mike Leone

unread,
Aug 8, 2025, 9:12:26 PMAug 8
to ntsys...@googlegroups.com

 


I would check it on the share level (they cannot be disabled on SMB2/3):

get-smbshare <share>|fl -Property *

 

Search for Leasing Mode. Anything other than None means that Oplocks (and servers blocking each other) are active.


Already done, years ago. And I've verified it's set to None.


Michael B. Smith

unread,
Aug 9, 2025, 10:52:02 AMAug 9
to ntsys...@googlegroups.com

You have two iSCSI initiators, from two different computer systems, connected to a single volume – iSCSI will happily corrupt the volume.

 

You have two Windows computer connected to a single volume formatted via NTFS – NTFS will happily corrupt the volume.

Mike Leone

unread,
Aug 9, 2025, 12:47:33 PMAug 9
to NTSysAdmin


     

On Sat, Aug 9, 2025, 10:52 AM Michael B. Smith <mic...@smithcons.com> wrote:

You have two iSCSI initiators, from two different computer systems, connected to a single volume – iSCSI will happily corrupt the volume.

 

You have two Windows computer connected to a single volume formatted via NTFS – NTFS will happily corrupt the volume.


In my case, as a cluster. So only 1 node is active to that volume at any one time, not 2 connected at the same time.  Been doing it this way for 7 years, no corruption. No file lock issues, either. LOL

Now my devs are telling me that changing that PS setting for client locking didn't actually help. They thought it did, but now they say otherwise ...

Reply all
Reply to author
Forward
0 new messages