2

I manage a small office with 3 workstations and about 3 (varies) laptops.

Is there an easy way to ensure that every user can log on from any workstation and see the same home directory. Ideally I'd like to see some kind of distributed file-system (e.g. I do not want to centralize my file storage).

Any suggestions what the best way to do this is?

Right now we use 100% Ubuntu 9.04, both 64bit and 32bit versions.

1
  • 1
    Way too overkill... NFS is the simplest and most efficient answer. Jun 17, 2009 at 12:04

8 Answers 8

6

The answer is NFS. If you want authentication as well, NIS, NIS+, LDAP or AD will help.

It sounds like you want to do some sort of peer-to-peer file sharing. You can setup a distributed file system like Lustre or OpenAFS, but understand that you're going to be wasting lots and lots of time to get that working, for zero tangible benefit.

1

You could give LustreFS a go. It's probably far more complicated than you want, though. Unfortunately, you're trying to do something very difficult, and you're not going to find a simple solution.

0

You can try unison to replicate content realtime (if this is what you want). Lustre is more complicated as far as I know.

0

It's old school, and I'm sure not the best anymore, but you could always look at using NIS (I believe there's an NIS+ version now). It will allow you to manage one account for each using and using NFS (maybe Fuse now?) mounts the user will have access to their home directory no matter which machine they log into. This does require that the data be housed on one machine, which you state you do not want. Without a distributed file system, which can be a pain to setup, you're really limiting your options.

4
  • And where does the filesystem data get stored?
    – womble
    Jun 17, 2009 at 12:04
  • One of the machines contains the actual user data. The other machines would mount /home via a network share of some sort.
    – nathan
    Jun 17, 2009 at 12:38
  • cough "I do not want to centralize my file storage" cough
    – womble
    Jun 17, 2009 at 13:00
  • @womble - You're right. I did recommend something that Salim expressly said he did not want. I will edit my answer to reflect that.
    – nathan
    Jun 17, 2009 at 13:22
0

You could consider sshfs as an option. Easy to implement, doesn't not rely on data source having special config, since data is shared via ssh connections, you only need a ssh daemon running.

On the client side, you must have fuse + sshfs, passwordless auth (via SSH keys), and a line in /etc/fstab like this one:

sshfs#[email protected]:/home/kt /home/kt fuse comment=sshfs,users,nonempty,noauto,exec,allow_other,reconnect,transform_symlinks,BatchMode=yes 0 0
0

If you're absolutely stubborn about not having centralized filestorage (which is a foolish decision, just for the record), put each user's home directory on one laptop. NFS mount that directory on all the other laptops. Do that as many times as you have users and/or laptops. Add each user to every laptop with the correct username and password, and point their home directory to whichever NFS mount you've set them up with.

Enjoy your maintenance nightmare.

1
  • I think "nightmare" is an understatement. At least give the poor guy the automounter. Jun 17, 2009 at 15:29
0

You could potentially use rsync on log on and log out to sync the files on all three computers. While this will have side effects it probably the simplest way to do it.

0

Setting up anything distributed will probably be a hell to setup, not even thinking about diagnosing problems. The traditional answer is NFS (and NIS for authentication) but NFS doesn't have any security by default (any local computer can access practically anything), some can probably be set, but the information on this are scarce. I've had most success with Samba + pam_winbind + nss_winbind + pam_mount. It may seem ugly to use a windows protocols in such an environment but it Just Works for network authentication and secure (sort of) home directory access. If you want some sort of distribution, I'd also look at the possibility of using rsync to manually synchronize several stores (at logon/logout or whatever). This would require some scripting, though.

You must log in to answer this question.