From: Jun C. P. <jun...@gm...> - 2010-12-28 17:06:45
|
For those who are wondering how to export an MFS mount point as an NFS mount point, I would like share my experience that uses a user space NFS (unfs). Basically, I found a simple workaround with performance degradation as expected (the use of NFS inherently hurts performance, anyway). Environment: * CentOS 5.5 * unfs3-0.9.22 * mfs-1.6.15-2 * unfs server on 10.1.2.22 On user space NFS server: # wget ftp://ftp.pbone.net/mirror/ftp.pramberger.at/systems/linux/contrib/rhel5/i386/unfs3-0.9.22-1.el5.pp.i386.rpm # rpm -Uhv unfs3-0.9.22-1.el5.pp.i386.rpm # cat /etc/exports (assuming 10.* private ip) /mnt/mfs 10.0.0.0/255.0.0.0(rw,no_root_squash) # df | grep mfs mfs#10.1.2.22:9421 13020730816 428096384 12592634432 4% /mnt/mfs # service nfs stop (if running) # rpc.mountd # portmap # unfsd (if you want to debug, use -d) # exportfs -a -v (if you want to add more exports) On NFS client: # cat /etc/fstab |grep mynfs (/mnt/mfs is an MFS mount point on the server) 10.1.2.22:/mnt/mfs /mnt/mynfs nfs rw,proto=tcp,nolock 0 0 # mount /mnt/mynfs If you have iptables running, the following iptables rules need to be added to have portmap and unfsd get along with firewall. # PASS ICMP TYPE 3 PACKETS, INPUT AND OUTPUT -A INPUT -p icmp -m icmp --icmp-type 3 -j ACCEPT -A OUTPUT -p icmp -m icmp --icmp-type 3 -j ACCEPT # PASS PORTMAP AT 111, INPUT AND OUTPUT, TCP AND UDP -A INPUT -p tcp -m tcp --dport 111 -j ACCEPT -A INPUT -p udp -m udp --dport 111 -j ACCEPT -A OUTPUT -p tcp -m tcp --sport 111 -j ACCEPT -A OUTPUT -p udp -m udp --sport 111 -j ACCEPT # PASS NFS AT 2049, INPUT AND OUTPUT, TCP AND UDP -A INPUT -p tcp -m tcp --dport 2049 -j ACCEPT -A INPUT -p udp -m udp --dport 2049 -j ACCEPT -A OUTPUT -p tcp -m tcp --sport 2049 -j ACCEPT -A OUTPUT -p udp -m udp --sport 2049 -j ACCEPT I hope this can help for anyone who needs it. -Jun On Thu, Dec 23, 2010 at 2:25 PM, Jun Cheol Park <jun...@gm...> wrote: > Hi, > > Using nfs (v4 on CentOS 5.5) on top of mfs is definitely silly. > However, some applications that I plan to use can run only with nfs, > so I tried to export mfs mount point as an nfs export. For easiness, > right now I am not using any iptables rules on any node. > > On the nfs server (10.1.2.22, at the same time, as a mfs client): > > # cat /etc/exports > /mnt/mfs 10.*(rw,no_root_squash) > > # df | grep mfs > mfs#10.1.2.22:9421 on /mnt/mfs type fuse (rw,allow_other,default_permissions) > > On the nfs client (10.1.2.24): > > I got the following error. > > # mount -t nfs 10.1.2.22:/mnt/mfs /mnt/nfs_mfs/ > mount: 10.1.2.22:/mnt/mfs failed, reason given by server: Permission denied > > # tail /var/log/messages > Dec 23 14:23:23 host1a mountd[17279]: authenticated mount request from > 10.1.2.24:805 for /mnt/mfs (/mnt/mfs) > Dec 23 14:23:23 host1a mountd[17279]: Cannot export /mnt/mfs, possibly > unsupported filesystem or fsid= required > > Is there anyone who knows a workaround? > > Thanks, > > -Jun > |