NFS trouble on Centos

I'm trying to simply share a directory on Linode X with Linode Y

On both Linodes, I've installed NFS + Port Mapper.

On Linode X, I have following on my /etc/exports:

/path/to/shared/directory ip-linodeY(ro)

Oddly, doing

/usr/sbin/showmount –exports just hangs

however doing this

/usr/sbin/showmount --exports 127.0.0.1

displays:

Export list for 127.0.0.1:

/path/to/shared/directory ip-linodeY(ro)

So, am I right to assume that it's exported fine (subject to firewall allowing access ?)

On Linode Y, I try this:

mount ip-linodeX:/path/to/shared/directory /mnt/share

and I get :

mount: wrong fs type, bad option, bad superblock on

ip-linodeX:/path/to/shared/directory

If I try:

mount -t ext3 ip-linodeX:/path/to/shared/directory /mnt/share

I get:

mount: special device ip-linodeX:/path/to/shared/directory

does not exist.

For the purpose of this exercise I've stopped iptables on both machines.

What am I doing wrong ?

5 Replies

Have you tried switching from the Linode kernel to the official CentOS kernel?

http://library.linode.com/linode-platfo … o#centos_5">http://library.linode.com/linode-platform/custom-instances/pv-grub-howto#centos_5

Follow these directions, except perhaps disable SELinux in order to eliminate some complication.

@wtogami:

Have you tried switching from the Linode kernel to the official CentOS kernel?

Thankyou for taking time to answer my query, unfortunately following those instructions didn't work.

The commands executed fine, but after changing the kernel to pv-grub-x84_64 it wouldn't boot, I get:

****Booting 'CentOS (2.6.18-194.26.1.el5xen)'

root (hd0)

Filesystem type is ext2fs, using whole disk

kernel /boot/vmlinuz-2.6.18-194.26.1.el5xen root=/dev/xvda

Error 15: File not found****

Switching back to Stable 2.6.18 and it boots fine. I tried it with and without Xenify + Automount options

Update..

Debugging the error in my previous post I noticed that instead of /boot/vmlinuz-2.6.18-194.26.1.el5xen being in my /boot directory I had vmlinuz-2.6.18-238.1.1.1.el5xen (same goes for the initrd references)

So incase that may fix it, I changed the references in grub.conf a menu.1st and now it won't boot at all.

This seems awfully convoluted to get what I thought was quite a simple feature such as NFS working.

Update.. looking at the console while booting - you're right it was the SELinux that was causing the problem, as soon as I removed that it booted fine..

If you're still having trouble with the new kernel and SELinux is disabled then ensure nfs-utils is installed ("sudo yum install nfs-utils"). This is needed to mount NFS filesystems.

Next you need to look at the logs on the server; if you're exporting to hostnames then the entry must match EXACTLY what the IP address resolves to on the host. A mismatch will show. Since linode IPs are relatively static (only if you change datacenter would they change) you may be safer to export to the IP address.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct