Chapter 3 File Locking Overview

File locking is typically initiated by the file system – either by configuration parameters or API and function calls – to prevent data corruption by more than one process accessing a file while it is open in write mode (either dual writes occurring, or reading a file that has since been changed due to a write – “stale data”). There are two important factors to consider when enabling file locking: first – when to use file locking; second – how to lock the file.

File locking provides a security and/or integrity benefit, but the benefit is not free. Locking uses system resources, therefore it can affect performance. In addition, some kinds of locking can actually enhance performance, but expose data to corruption under certain types of access. Also, using file-system -provided file locking can be redundant if data is already locked or managed at the application level, thus using system resources affecting performance for no benefit. Finally, how data is used should partially dictate how files are locked: if a file is to be opened read-only, then locking the file may not make much sense.

HP Sales Force personnel often encounter RFPs that include CIFS/NFS cross-platform file locking as a requirement. It is essential that the TC or SR understand what security and data integrity issues are driving the file locking requirement. Customers often include such requirements without understanding their own environment.

HP-UX 11 CIFS/9000 / NFS File Server & Storage

Files Accessed by

Files Accessed by

Windows Clients

NFS Clients

Shared CIFS/NFS

File Access

Filename

rwx

ACL

Data Mgt

Locking Needed?

 

 

 

 

 

Filename1

Read only

No ACL

No data management

NO

 

 

 

 

 

Filename2

Read/Write

ACE on ACL

No data management

NO

 

 

 

 

 

Filename3

Read/Write

No ACL

PDM, Clearcase , etc…

NO

 

 

 

 

 

Filename4

Read/Write

No ACL

No data management

YES – Locking Needed

 

 

 

 

 

1.Are there files or directories that will be accessed by both CIFS and NFS?

2.How many files or directories, and what kind of data?

3.Will clients have write access to the files or directories?

4.Are there ACLs on the file or directories that manage client access?

5.Is there a data management application that administers access (Clearcase or PDM server)?

6

Page 6
Image 6
HP UX Common Internet File System (CIFS) Client/Server Software manual File Locking Overview, Acl