Link to home
Start Free TrialLog in
Avatar of tibori
tibori

asked on

Network drives in Linux...?

I'm using RH6.1. I'd like to map a drive(like in Windows) to another Linux machine on the network. What's the command to do this?
Avatar of j2
j2
Flag of Sweden image

it's not a command, its a religion :)

anyway, its called NFS, consult your documentation.
Avatar of tibori
tibori

ASKER

Ok, I got it. Reading the documentation always helps. For others with the same question the command was:
mount -t nfs server:/dir/dir/

 Now is how can I make a symbolic link to it in KDE? I'd like it to be just like the "file system device" for CDroms and such, so that by clicking on it it'll mount it.
Thats trickier, that would involve using some kind of automout daemon.
you can include it in your /etc/fstab file so you can view the directories from kde file manager.
Ah of cource.. but i didnt think he wated a static mount since he said "clicking on it it'll mount it." But that would work.
Don't bother with NFS.  I can't think of any reason why you would need it, but I'm sure there are situations that might merit it.  Use Samba.

Type: Samba Start

If it starts successfully you will know because it will say smb [ok], nmb [ok].

If it does, you use smbmount to mount any Windows drive on your network like this:

smbmount //(computer)/(mydrive) /mnt/(mountpoint) -U (userid)

then it will ask you for your password to the NT Domain or Windows workstation.

(computer) can be a name of a computer if the name and ip address are listed in the /etc/hosts file.  If not just use the static ip address e.g. '192.168.0.0' (you are using tcpip on your network yes? -- if the drive is a dos drive on the same machine there is an entirely different procedure to do this using the mount command.)

this should all work like a charm..if you have any trouble just post again and we'll debug it.
Note:  I forgot to include this in my answer--

If you don't know about mount points they are easy to set up.

All you need to do is make a directory in /mnt (or anywhere) like this:

mkdir /mnt/mymountpoint

Avatar of tibori

ASKER

snoopy: I'm a little confused by your comment. What I'm trying to do is map a drive that exists on the file server (linux machine) onto a LINUX machine. We do have windows clients running and we ARE using samba, but only for the windows clients. Are you saying that it is possible to map a samba share onto a linux machine? If yes then what would be the advantage of doing so over nfs?
I was able to accomplish it by using NFS, however I don't necessarily want to mount these drives upon startup. I'd rather have an icon on my desktop that mounts it when I click on it. I'm currently using this feature for my CDROm and floppy, but those are physical devices. Can I do the same for an NFS device?
tibori

I thought you said you wanted to mount Windows drives.  
Avatar of tibori

ASKER

Sorry about that. It was a bit unclear.
ASKER CERTIFIED SOLUTION
Avatar of jlevie
jlevie

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of tibori

ASKER

jlevie: sounds like what I'm looking for!! Could you explain the format of the auto.dist file? Thanks,
Ummm, I thought I did, but maybe I didn't make it apparent. Those lines shown above are in fact a "paste" of part of my auto.dist file. Each line is in essence a key-value pair, space or tab separated.  For example:

chaos      chaos.dom.com:/nfs0/sources

contains the mount point name "chaos", a tab character and the specification of the NFS export to be mounted.

What happens when I reference "/dist/chaos" is that autofs (which knows that it's managing the automount points under "/dist") looks at auto.master and gets the map name (auto.dist) and the NFS mount options. It the consults the "auto.dist" map and finds the "chaos" entry and performs the specified NFS mount.

If this isn't enough of an explanation, please let me know what I can do to help.