Forums Register Login

mount one linux drive to another linux machine.

+Pie Number of slices to send: Send
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
+Pie Number of slices to send: Send
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.
+Pie Number of slices to send: Send
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?
+Pie Number of slices to send: Send
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.
Live ordinary life in an extraordinary way. Details embedded in this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 12249 times.
Similar Threads
A file path for an Appplication Build in JAVA(Windows platform) doesn't work on linux server
A strange problem of XSLT transformation in Tomcat
My web.xml is good?, why no run my servlets into folder /servlets/ ???
Why is Apache serving the uncompiled page?
Servlet 404 and JkMount configuration - encountered some problem (Apache/Tomcat)
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 07:08:28.