Click to See Complete Forum and Search --> : When using two linux boxes.. how to mount a network
legaviu
02-07-2001, 08:58 PM
I'm trying to install two linux boxes:
The big AMD750 64MB RAM 30GIG (IP 168.192.0.1) using Mandrake 7.2 will host all the files, and the small 486DX 8MBRAM 120MB (IP 168.192.0.1) using Tiny Linux will be a terminal for my kids. Got a 4 port Genius hub.
Good, now I would like to share or mount directories from the Big Linux Box on the Little one.
One option is Samba, but this mainly used for Windows compatibility, is there another option between Linux boxes??.
I do know I can telnet, rexec or rlogin onto the big linux box using X, but I rather use the disk space on it, and limit the use of space on the small one.
I would appreciatte some help.
:confused:
Oh and one more thing, how would you determine free space from the command prompt (not using mc or a GUI)?
milanuk
02-07-2001, 09:41 PM
NFS, perhaps?
It depends on what distro you are using, but on the big server, as root, edit the file /etc/exports (some distro's may not have created it automatically). The syntax of the file can vary, but as a quick and dirty example (and _only_ an example. do 'man exports' for the full details), put in:
/home *(rw)
Now save the file, and restart the NFS server. On RedHat, you enter as root '/etc/rc.d/init.d/nfs stop' followed by '/etc/rc.d/init.d/nfs stop' The commands will be slightly different depending on where your distro keeps stuff. SuSE, for instance, has "shortcut" commands like 'rcnfsserver stop'.
*** NOTE *** this is a very bad example, security-wise. It is only for testing purposes, to make sure NFS is working.
Now go to the client machine, and as root create a directory '/mnt/nfs' or whatever. It doesn't matter. Then do ' mount -t nfs <biglinux>:/home /mnt/nfs'. This tells mount to mount the /home directory on <biglinux> (you can use either the name, or the IP address) at /mnt/nfs, and that the filesystem type is 'nfs' (-t nfs).
Now you should be able to cd to /mnt/nfs, and you should see the files in the /home directory on <biglinux>. Right now, w/ /etc/exports set up the way it is, you can read and write (though not as root). For more details, see the man pages for 'nfs' and 'exports'.
If the above doesn't work, there are several things that may be gumming up the works. First, you need to have the nfs packages installed. The names vary from distro to distro, so I won't go into that. You could have problems w/ your /etc/hosts.allow and /etc/hosts.deny files. Or possibly others that I can't think of off the top of my head.
Hope this helps.
Monte
milanuk
02-07-2001, 09:48 PM
Originally posted by legaviu:
I
Oh and one more thing, how would you determine free space from the command prompt (not using mc or a GUI)?
Sorry, missed this the first time.
As root, either:
df
or:
du -hmc --max-depth=1 --exclude=proc /
To tell you where the disk space is consumed. Note that this example will print out in (h)uman readable format in (m)egabytes, and gives a total(c) at the end. It only lists the top-level directories under /, and excludes the /proc filesystem, as it is a) huge, and b) exists on as a figment of the kernel's imagination ;)
Monte
legaviu
02-07-2001, 09:56 PM
Tnks..
After reading NFS-Howto and Networking-Howto, this is the best option.
Thanks again