LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-02-2008, 09:29 AM   #1
cy163
LQ Newbie
 
Registered: Jun 2007
Posts: 23

Rep: Reputation: 15
access collision with shared file system NFS


Hello ALL,


In my system, there are 14 machines running the same version of Linux RHEL4. The 14 machines use a NFS file system, i.e., a shared file system.


My question is that if the programs in individual machines can access a common file simutaneously. Or, they have to access the file in a sequentially.


Thanks,
 
Old 06-02-2008, 09:38 AM   #2
stress_junkie
Senior Member
 
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 332Reputation: 332Reputation: 332Reputation: 332
In theory only one machine can open a file for write access while many can open the same file for read-only access.

In practice it works out that only one machine can open a file at a time.

You need a database engine to have multiple computers access a given file at one time. Naturally a database engine only works with database files so you can't have a database manage access to other types of files.
 
Old 06-02-2008, 09:47 AM   #3
cy163
LQ Newbie
 
Registered: Jun 2007
Posts: 23

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by stress_junkie View Post
In theory only one machine can open a file for write access while many can open the same file for read-only access.

In practice it works out that only one machine can open a file at a time.

You need a database engine to have multiple computers access a given file at one time. Naturally a database engine only works with database files so you can't have a database manage access to other types of files.
Thanks for your help.

Forgot to mention, In my case, the common file is existing. Programs on the 14 machines only execute read-only operations on the file. So, do I still have to use database technique?
 
Old 06-02-2008, 10:39 AM   #4
stress_junkie
Senior Member
 
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 332Reputation: 332Reputation: 332Reputation: 332
The database technique won't manage access to individual non-database style files.

The reason that I said that in practice only one machine can open a file at a time is that most applications won't let you specify read-only open. If your application will open the file as read-only then give that a try and see what happens. However if your application opens file read-write even though you only intend to read the file then the computer doesn't know that you don't intend to change the file and it will only allow one client to open the file at a given time.

Ironically the previous version of NFS did not lock files on the server and so it was possible to have more than one client open a file on the server.

Last edited by stress_junkie; 06-02-2008 at 10:41 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
xen and shared files system without using nfs or similar network fs MikeyCarter Linux - Server 1 06-02-2008 01:11 PM
network file system (NFS) and other file systems ufmale Linux - Newbie 4 05-08-2008 03:01 AM
NFS file system error nasim751 Linux - Server 1 03-02-2008 02:09 PM
NFS Sever Shared Directory - File Permissions Problem LakeWind Linux - Server 1 06-12-2007 03:51 AM
Network File System (NFS) Dogar Linux - Software 7 05-16-2007 07:30 AM


All times are GMT -5. The time now is 03:51 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration