• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

mount one linux drive to another linux machine.

 
Kevin P Smith
Ranch Hand
Posts: 362
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys,

I need to mount a drive from one Linux server to another, I tried:

mount <servername>:/home/user/apps/tomcat/webapps/myApp/images /home/user/tomcat/webapps/myApps/images

but I get the following error:-
mount: Wrong fs type, bad option, bad superblock on <server> missing codepage or helper program, or other error
(for several filesystems (e.g nfs, cifs) you might need a /sbin/mount.<type> helper program)
In some cases useful info is found in syslog - try dmesg | tail or so
 
Tim Holloway
Saloon Keeper
Posts: 18300
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are several ways to mount remote filesystems, including the Windows-compatible Samba version and Sun's Unix NFS system.

The mount syntax you are using is NFS style. That means that you need to have exported the drive you want to share out by defining an entry in the owning machine's /etc/exports file, starting that machine's NFS server, and ensuring that it isn't blocked by the firewall. And NFS can be a real pain where firewalls are concerned.

Once the server machine is properly prepped, you can mount the exported filesystem. However it looks like you've issues a questionable mount command. For NFS, the usual mount is going to look something like:

mount servername:/export/home/images /mnt/images

If you don't supply a distinct mount point, it's going to mount on "images" in whatever your current working directory is.
 
Kevin P Smith
Ranch Hand
Posts: 362
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Cheers for that,
I've created the follwing in the /etc/export file

/home/user/apps/tomcat/webapps/myApp/images <server-ip>(ro)

I had a problem when starting NFS, I get the fololwing error on daemon:-

Starting NFS services: [OK]
Starting NFS daemon:
Starting NFS daemon: rpc.nfsd: Setting version failed: errno 16 (Device or resource busy)
rpc.nfsd: Writting fd to kernal failed: errno 5 (Input/output error)
rpc.nfsd: unable to set any socket for nfsd
[FAILED]


My distinct mount point (I thought) was '/home/user/tomcat/webapps/myApps/images' on App2

Should I add to the /etc/hosts.deny the following or maybe leave this for now?
portmap: ALL
lockd:ALL
mountd:ALL
rquotad:ALL
statd:ALL

PS: Samba to purely for a Linux/Windows link right, or can it be used to do Linux/Linux?
 
Tim Holloway
Saloon Keeper
Posts: 18300
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actually, for years I used Samba for Unix/Unix instead of NFS. Ironically enough, because I felt it was more secure to use Windows Networking than NFS, which long held a pretty poor reputation in that regard. Plus Samba was more firewall-friendly.

These days I use NFS for Unix/Unix.

As far as your problem goes, I'd Google for it.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic