You are not logged in.

#1 2012-08-15 01:41:24

TheSaint
Member
From: my computer
Registered: 2007-08-19
Posts: 1,536

[Solved] Project: syncronizing /home

Hello.
I've 5 computers in my family and everyone can pick up any other's computer, since I set /home in every computer for all of the family members. The drawback would be that some file isn't available when using a different computer.

Some year's back there was nfs and a few steps to mount directories across the wires, but I think now it is merged onto cifs and security has tighten a lot more.
It was just some ifconfig [iface] [netIP] [netmask] up, then something to adjust in /etc/hosts.allow/deny.

Trying to use mount.cifs I found the problem to mount the next computer.

Seems the wiki doesn't have up-to-date clues. My log report error -111. Probably the operation is not finding a suitable address, even I'm able to ping the next computer and I don't have any firewall blocking the linkage.

It seems strange to me that i must run samba server to have the chance to mount outside home.
Then my doubts are regarding how to make one to log into a centralized home as if it was hes/hers own?

EDIT

I choose for samba. My biggest misunderstanding was that I was expecting to access without access password. I only face some small flaw due by the  connecting lag.
OnwCloud and NFSv4 are also good options, just I have difficulties when I want access with My android smartphone.

Last edited by TheSaint (2012-08-19 18:54:47)


do it good first, it will be faster than do it twice the saint wink

Offline

#2 2012-08-15 02:04:04

2ManyDogs
Forum Fellow
Registered: 2012-01-15
Posts: 4,648

Re: [Solved] Project: syncronizing /home

I use nfs to share /home from one machine and mount it on others. I just set the sharepoints and allowed addresses in /etc/exports on the server and set the server name and address in /etc/hosts on the others. I don't think you need to use Samba or cifs if they are all Linux machines.

Or maybe I'm not understanding what you're trying to do?

https://wiki.archlinux.org/index.php/Nfs

Last edited by 2ManyDogs (2012-08-15 02:05:06)

Offline

#3 2012-08-15 03:43:45

zero_one
Member
Registered: 2010-07-07
Posts: 104

Re: [Solved] Project: syncronizing /home

2ManyDogs wrote:

Or maybe I'm not understanding what you're trying to do?

Im not sure TheSaint was aware of that option? Thats a good option for systems that aren't mobile. But what happens if you remove the system or share from the network? Maybe a cron job to sync files?

Last edited by zero_one (2012-08-15 03:45:18)

Offline

#4 2012-08-15 16:42:45

TheSaint
Member
From: my computer
Registered: 2007-08-19
Posts: 1,536

Re: [Solved] Project: syncronizing /home

Well these ideas giving some more to chew up.
One purpose would be to sync all /homes time to time and let run the computers in their separated lifes.
Another purpose would have a server which hold the user's /homes and on the user side mount' em at boot time.

I'd go for the first option, because it isn't common, at home, to leave a PC running if nobody uses it.

Then the only point remain which protocol to be used, SMB or NFSv4. Some machine still use dual boot with Win_lose, but they won't need special option for their /homes (when they run), just some file trasfer, I think.
Some other point leads to use SMB, because my phone uses Android and file handling are seen in only SMB/DLNA way.

Now I'd say, after reading NFSv4 wiki, that is much simplier this protocol, as I was using it since long ago. Unfortunately I see that, for some reason, it should need to apply samba for syncing. Then here it comes the problem, I can't have access the user's /home. I might mount /tmp and some sort of symlinking, which mostly doesn't work, but all my tries, as it is states on the wiki, it results denied in all of the ways. Maybe the permissions, maybe the polkit's rules but the user can't see/write her/hes network /home.

Now assuming that samba is started as daemon and my /etc/samba/smb.conf is like here below

#======================= Global Settings =====================================
[global]
   workgroup = WORKGROUP
   server string = Samba Desktop
   netbios name = Desktop
   security = user
   hosts allow = 192.168. 127.
   log file = /var/log/samba/%m.log
   max log size = 50

#============================ Share Definitions ==============================
[homes]
   comment = Home Directories
   browseable = no
   read only = no

[tmp]
   comment = Temporary file space
   path = /tmp
   read only = no
   public = yes

[public]
   comment = Public
   path = /media/DataSafe
   public = yes
   writable = yes
   printable = no
   guest ok = yes

[tmp] & [public] are fine as per their permission at 666, in particular /media/DataSafe is a NTFS (mounted in fstab with rw,users,umask=0), then I get a full access, but [homes] is a no-way to get it mounted.

What should be the result to mount [homes], will the mount point to /home/userdir, or else?


do it good first, it will be faster than do it twice the saint wink

Offline

#5 2012-08-15 16:54:36

TheSaint
Member
From: my computer
Registered: 2007-08-19
Posts: 1,536

Re: [Solved] Project: syncronizing /home

zero_one wrote:

But what happens if you remove the system or share from the network? Maybe a cron job to sync files?

The sync isn't vital importance. Maybe once a day, maybe manually operated. Just if (almost) all the parties are online.
A bad situation is which computer should be server and which won't. Mybe both party likes to sync and I think would be a conflict. Would be difficult to assign the master computer if all acting as a servers. The other way around should take one as a server and the other(s) should sync from there.


do it good first, it will be faster than do it twice the saint wink

Offline

#6 2012-08-15 17:19:28

debazthed
Member
Registered: 2012-01-05
Posts: 24

Re: [Solved] Project: syncronizing /home

I think, for your purposes this may be a bit of overkill, but if you are already thinking about a server, you could also setup an OwnCloud environment (https://wiki.archlinux.org/index.php/Owncloud)

That way the files would automagically be synced among systems, no matter which are online at what times (except for the server).

At least I think, that's what OwnCloud does, I have never used it myself ;-)

Regards
debazthed

Offline

#7 2012-08-15 18:42:07

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: [Solved] Project: syncronizing /home

Let's rewind a bit here....

TheSaint wrote:

Some year's back there was nfs and a few steps to mount directories across the wires, but I think now it is merged onto cifs

Uhmm... what? There still is nfs, and it is (and always has been) completely separate from cifs. nfsv4 does have some additional security options, could that be the cause of your confusion?

Anyway, as already advised, just use nfs. As long as it's not internet-facing, security is not an issue.

Last edited by tomk (2012-08-15 18:48:02)

Offline

#8 2012-08-16 11:39:28

TheSaint
Member
From: my computer
Registered: 2007-08-19
Posts: 1,536

Re: [Solved] Project: syncronizing /home

tomk wrote:

There still is nfs, and it is (and always has been) completely separate from cifs. nfsv4 does have some additional security options, could that be the cause of your confusion?

You're right. I got the info some reading later than this post. NFSv4 is definitely less complicated than cifs, IMHO. Perhaps doesn't include printing.

tomk wrote:

Anyway, as already advised, just use nfs. As long as it's not internet-facing, security is not an issue.

Well all the traffic goes across modem-router so there would be some risk, I think. Maybe using Kerberos or SSL will avoid the risk.

@debazthed
It's a great idea, I'll take it in account wink


do it good first, it will be faster than do it twice the saint wink

Offline

Board footer

Powered by FluxBB