[vox-tech] Brain fart: making one linux box talk to another

Henry House vox-tech@lists.lugod.org
Mon, 28 Apr 2003 14:40:00 -0700


--azLHFNyN32YCQGCU
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

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.
>=20
> 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.
>=20
> 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 export=
ed
#		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 vi=
pw
   and vigr to edit them if necessary, following up with find and xargs chm=
od
	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=3D8192=
,wsize=3D8192       0 0
=20
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.

--=20
Henry House
The attached file is a digital signature. See <http://romana.hajhouse.org/p=
gp>
for information.  My OpenPGP key: <http://romana.hajhouse.org/hajhouse.asc>.

--azLHFNyN32YCQGCU
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE+rZ+wi3lu92AVGcIRAtyCAJ9yMBGIZLl0UejhTUi2mgGhs4991gCeNOF+
1xLjaoRL2u0BnmKpt2NZc/0=
=x1gR
-----END PGP SIGNATURE-----

--azLHFNyN32YCQGCU--