Direct i/o takes on different meaning based on type of file system, platforms 
and what interfaces are used to do the i/o – among other things.

 

I won’t go in to all the variations here, but limit my discussion to what is 
supported with Veritas File System and Veritas CFS.

 

Oracle over VxFS uses QIO or ODM or regular POSIX i/o. When Oracle uses QIO or 
ODM over VxFS, VxFS will hold the reader-writer lock in shared mode for writes 
and reads. This is to allow multiple parallel writes to the same file, under 
the guarantee that Oracle will take care of the locking of different regions it 
is accessing on the same file. The ODM and QIO are special i/o interfaces that 
are mostly used by databases.

 

Generic VxFS direct i/o using regular read/write system call will not bypass 
the locking. The reader-writer lock will be taken in SHARED mode for reads and 
EXCLUSIVE mode for writes, regardless of whether the i/o is direct or buffered.

 

In the case of CFS and direct i/o via regular read and write system call 
(enabled through  mincache mount option or via open flags), CFS will do the 
appropriate locking. In addition Veritas Cluster File System supports implicit 
reader-writer range locking, which would provide parallel read and write access 
to the same file from same or multiple nodes. The parallelism is only when the 
io’s in progress are not conflicting. Two io’s are conflicting if at least one 
of them is a write and the i/o ranges share a common 8k block. Conflicting i/o 
will be done one after the other. This allows Veritas CFS to not only support 
POSIX semantics for reads and writes, but also allow parallel access to the 
same files from multiple nodes, without any changes or locking requirement at 
the application level, and cache coherency and data consistency is maintained. 
Once again this is true for both buffered i/o and generic direct i/o.

 

Yes you can – use veritas CFS and direct i/o for accessing the same file 
without any data corruption.

 

Bala

 

________________________________

From: veritas-vx-boun...@mailman.eng.auburn.edu 
To: Pavel A Tsvetkov 
Cc: Veritas-vx@mailman.eng.auburn.edu 
Sent: Fri Feb 20 22:16:57 2009
Subject: Re: [Veritas-vx] VxFS & CFS compatibility for applications 

 

On Wed, Feb 18, 2009 at 1:24 AM, Pavel A Tsvetkov <p...@technoserv.ru> wrote:


Hello all! 

Just one interesting question for me and perhaps for other people... 

There is some application running on VxFS (officially supported). We want to 
use this application on two nodes in parallel. 
It means we must use CVM and CFS.  

 

        Can we use CFS instead of VxFS  for that application?


No, you can't. You need to have a locking mechanism which can avoid corruption 
(like the oracle database does when you set directio): this locking mechanism 
is one central piece of cluster file system. VxFS, like any other fs, uses 
Posix single-writer lock. In your case, this lock on a node 1 doesn't have any 
knowledge of the similar lock on the node 2, thereby leading to corruption.




 

_______________________________________________
Veritas-vx maillist  -  Veritas-vx@mailman.eng.auburn.edu
http://mailman.eng.auburn.edu/mailman/listinfo/veritas-vx

Reply via email to