Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Moving distfiles and binary package storage to a file server
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Shining Arcanine
Veteran
Veteran


Joined: 24 Sep 2009
Posts: 1110

PostPosted: Tue Jan 11, 2011 10:25 pm    Post subject: Moving distfiles and binary package storage to a file server Reply with quote

My desktop uses a SSD and space is a premium, so I would like to move all of the distfiles and binary packages to a file server on my home network.

Following advice from #gentoo on freenode, I experimented with sshfs. I setup RSA keys on my desktop's root account and put the public key into a user account on my file server. I then copied the files to the server using scp and mounted the remote directories as root to simulate mounting via fstab:

Quote:
sshfs -o nonempty,allow_other,sshfs_sync username@ip_address:/home/username/desktop/portage/packages /usr/portage/packages
sshfs -o nonempty,allow_other,sshfs_sync username@ip_address:/home/username/desktop/portage/distfiles /usr/portage/distfiles/


It seems that with a network shares, the file ownership is no longer what it was on the local system. How concerned should I be about portage becoming upset about this at some point in the future?

Also, I am concerned about the reliability of this approach. I know that I can configure /etc/fstab to mount the remote shares at boot, but past experience with ssh suggests that things will go south very quickly if the pipe breaks (i.e. the server restarts/crashes/loses-power, a network cable is disconnected/severed, a switch crashes/restarts/loses-power). I am concerned about how gracefully things will be able to recover. Will sshfs_sync be enough to ensure data integrity in this scenario? Assuming that the remote server did a shut down in the event of a short power outage (the UPS only lasts 2 minutes) and I brought it back online, would I potentially encounter a dangling mount situation where I need to do a lazy umount on the client?

Are there any alternatives to sshfs that have some property that makes using them more desirable than using sshfs?
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 15984

PostPosted: Tue Jan 11, 2011 11:31 pm    Post subject: Reply with quote

Traditionally, NFS has been used for this purpose. Based on your description, I see no reason not to use NFS. It recovers reasonably well from unreachable servers when they come back.
Back to top
View user's profile Send private message
Shining Arcanine
Veteran
Veteran


Joined: 24 Sep 2009
Posts: 1110

PostPosted: Wed Jan 12, 2011 12:42 am    Post subject: Reply with quote

Hu wrote:
Traditionally, NFS has been used for this purpose. Based on your description, I see no reason not to use NFS. It recovers reasonably well from unreachable servers when they come back.


Does NFS have the ability to encrypt traffic and use public-key authentication? I know that it is overkill for a private network, but I prefer to follow good security practices so that security degrades gracefully in the event that I misconfigure something.
Back to top
View user's profile Send private message
Inodoro_Pereyra
Advocate
Advocate


Joined: 03 Nov 2006
Posts: 2631
Location: En la otra punta del cable

PostPosted: Wed Jan 12, 2011 1:55 am    Post subject: Reply with quote

If that's the case, you are looking for NFSv4 tought. As said before it can reconnect automagically broken pipes as they become online again.

Cheers!
_________________
Mi Blog.

Si no fuera por C, estaríamos escribiendo programas en BASI, PASAL y OBOL.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum