Re: [vox-tech] Brain fart: making one linux box talk to another
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [vox-tech] Brain fart: making one linux box talk to another
On Mon, Apr 28, 2003 at 02:29:54PM -0700, Richard Crawford wrote:
> My wife surprised me this past weekend with a spare computer to turn into
> a new server for our house. Whee! I've had plenty o' fun installing
> Linux on it and setting up various Samba shares and so on.
>
> Now, I'd like to access my /home/richard directory on my new computer from
> my usual desktop. This directory is set up as a Samba share so that I can
> get to it from my WinXP computer, but it seems silly to have to do a
> smbmount from my regular box to get to this directory. And, strangely,
> making two Linux boxes talk to each other is something I haven't had to do
> yet.
>
> How do I even start?
For Linux-to-Linux file sharing (or even Unix-to-Linux), NFS is the easiest
to use. Try this:
1. Install the NFS server (on Debian there are packages nfs-user-server and
nfs-kernel server; the kernel server is preferred but requires a kernel
driver that you may not have if you compiled your own kernel).
2. Edit /etc/exports. Example below:
# /etc/exports: the access control list for filesystems which may be exported
# to NFS clients. See exports(5).
/home *.internal(sync,rw)
/home romana.internal(sync,rw,no_root_squash)
3. Make sure that user and group IDs are identical on both machines. Use vipw
and vigr to edit them if necessary, following up with find and xargs chmod
to fix the ownership of files affected by the IS changes.
4. Add the NFS shares to the client machine's /etc/fstab, adding any of the
NFS options enumerated in mount(8) if needed. Example:
# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options>
wotan:/home /home nfs rw,hard,intr,bg,nolock,rsize=8192,wsize=8192 0 0
5. Restart NDF on server, run mount -a on client, and enjoy.
NFS does have a significant disadvantage: clients will freeze if the server
goes down. (They should unfreeze when the server resumes operating.) If you
find this problematic, you will need to investigate a file sharing protocol
that supports disconnected operation. I find NFS fine since my server only
goes down when I bring it down.
--
Henry House
The attached file is a digital signature. See <http://romana.hajhouse.org/pgp>
for information. My OpenPGP key: <http://romana.hajhouse.org/hajhouse.asc>.
Attachment:
pgp00019.pgp
Description: PGP signature
|