Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.


I'm thinking of setting up LDAP+NFS to handle centralized /home directories for our LAN users, but I was wondering, what would happen upon login from multiple machines with the same user? Are there risks of data corruption? If so, is there a way to prevent it?

(Clients and server would use Ubuntu)

share|improve this question

3 Answers 3

up vote 4 down vote accepted

From the point of view of the server, having a single user from different stations would be just like having the same user with more than usual processes. IOW: Nothing special.

OTOH, maybe there are some applications that depend on having a single instance. Firefox for example does try really hard to have a single instance per user; but I don't know if it's 'dangerous' or not to have more than one. Another example would be the desktop manager itself (Gnome, or KDE, or whatever). Although they should work, there might be some rough edges.

In both cases, it seems that what they would be 'protecting' from the concurrency are the temporary work files, and not any persistent data.

What I would do is just be sure that the /tmp directory is local to the client, and not bother.

share|improve this answer

Should be able to login with the same user from multiple location. Data corruption only if you're trying to write to a file from multiple locations that do not lock the file.

share|improve this answer

So your question is about whether there is a risk to corrupt the data in the home directory of the user that is logged more than once using the NFS mount as his homedir, right?

Whenever the users access their data (either to write or read), they will get them from the NFS mount, so nothing is written or read locally. Corruption could happen if you try to write to the same file on the NFS mount from different machines, without re-reading it or locking it. But then, this problem is not specific to NFS, since Unix allows several processes to write to the same file concurrently.

share|improve this answer
    
@Raphink- are you sure about it not being specific to NFS? I thought that the file system does allow file locks but NFS (depending on the implementation) does advisory locks- meaning that there is nothing preventing another process from hosing your file –  Jim B Dec 28 '09 at 11:51
    
@Jim B - POSIX locks are advisory, so there's no difference between NFS and local fs locking in that respect. –  janneb Dec 28 '09 at 13:01

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.