Sharing home directory among multiple distro

A

areeda

Guest
Hi All,

I'm a developer who needs to test my code on multiple distribution. Right now the tests run on Scientific Linux 6 & 7 (RHEL derivative), Debian 7 (soon 8), and Ubuntu 12.04 and 14.04. Plus I sometimes get reports it doesn't build on distros I never heard of.

I wonder if it's wise to share a single home directory. Multiple systems will be running at one time, some bare metal, some VMs.

I'm worried about all the configurations and state that apps store in $HOME.

I suppose to be safe I can put all my stuff in a subdirectory of ${HOME} and share that but I wonder if anyone has tried this and can confirm it works or it doesn't.

Thanks,
Joe
 


As you said there are plenty of configuration files that will be shared in a single /home setup. I have used shared /home before but some settings were overritten. The best solution would be one /home but multiple usernames.
 
Thanks Ryan,

I'm a bit confused exactly what you're suggesting. When you say multiple usernames, do mean they each have different uid/gid ie. separate accounts? I don't see any advantage to different names but same id's.

What I'm looking for is having program sources, scripts, test data, yada yada available on all the systems without copying.

Based on what you said about settings getting overwritten suggest an approach where /home/joe is on a local disk but all the shared stuff is in a shared directory. All are owned by one account with the same uid/gid.

Thanks,
Joe
 
multiple usernames (accounts) would lead to /home/userA, /home/userB, /home/userC, and so on allowing for one partition on the disk while not allowing settings to be overritten. IE /home/ubuntuser, /home/fedorauser, /home/opensuseuser etc. You could create a /home/data directory and simply link the contents to each home directory making sure to set the permissions correctly. (read/write/execute for everyone, owning account users)

Different distributions handle uids/gids in different ways. For example, Ubuntu creates a group for each account (based on the username). The range of uids is not always the same either nor do all distributions have the same groups.

Can you explain a bit more about what you are doing? If you are testing a program on multiple distributions why would you want the same files for each account? Should they not be the default for each distribution?
 
A while ago, I did a setup for Ubuntu Server with 3 hard drives; one 10 GB and two 40 GB. I figured the system could be installed on the 10 GB and use both 40 GB drives for storage. The question was how best to share that in a convenient way.

I had one single /home directory and created two sub-directories /home/user/hd1 and /home/user/hd2. I tested using mount to attach the hard drives to these folders and it worked. I used a command like lsblk or blkid to get the UUIDs of the hard drives and edited the /etc/fstab file to make this permanent.

Perhaps what I did here could be adjusted to fit what the OP wants. Have a spare partition or hard drive and configure all his OSes to mount that space to a sub-folder of the /home/user directory in each OS? This would require editing the /etc/fstab of each OS to make it permanent.

Admittedly, I'm used to running only 1 OS at a time, so I'm not sure if there are potential problems doing this while multiple OSes are running and sharing a space.

Otherwise, if I was in this situation, I wonder if Git would help by providing a central place to just pull your code from?
 
Hi Ryan, Videodrome,

First I want to say I really appreciate the discussion.

To further describe what I'm doing without going overboard:

I work for the Physics dept of a university but I do most of my work from home because of the long commute. Right now I have 4 workstations at home with 3 VMs running plus lots of remote resources.

Most of my work is developing applications and procedures with the occasional science study for playtime when the boss thinks I need it. These apps vary from web based (Java EE), desktop based (Java, Python or Matlab) with some C++ thrown in, and cluster based (all of the above). So the home directory on my main workstation is about 1TB (mostly test data).

The web based stuff is the most fun because I have complete control of the servers and don't need to deal with packaging, most of the time. The other stuff needs to run on multiple platforms. So, to steal from the Java critics, it's write once debug everywhere.

The source code is all in git or svn repositories. Some of it is my responsibility other projects are shared.

What I'd like to do is keep fewer copies of things on the different machines and standardize the locations, making backups easier. Thus making switching environments more a matter of dealing with UI variations than finding the files I need.

Based on what we've talked about I think videodrome's suggestion is closest to my current plan. As for Ryan's, in one sense it's cleaner however I doubt I'd remember which user went with which system, even if they had the system name as part of the user name. I understand the uid/gid assignment problem and get around it by creating the users manually.

Thanks both of you. I think I now have a plan.

Best,
Joe
 

Staff online

Members online


Latest posts

Top