Bekijk de volledige versie : a tutorial on how to mount/access a NAS please

24-09-2009, 04:55
I have a terastation (a NAS from Buffalo), but I am having difficulty mounting it from wl-500gp/oleg/samba3. I can access it via smbclient and see it via smbtree, but cannot mount it because the firmware does not have smbmount/smbmnt.

In this post, http://www.wl500g.info/showthread.php?t=1531&highlight=smbmount&page=2, Oleg states that smbmount is NEVER going to be added to firmware, because mounting windows/samba is rarely used.

I don't quite understand Oleg's statement. Does he mean there is a better way than smbmount to mount a NAS? If so, what is it?

I've tried mount.cifs without success. I've also tried the method from newbiefan, http://www.wl500g.info/showpost.php?p=72300&postcount=24, but the files he provided seems to work only for samba2, but I want samba3 for its support international character support. I've also tried http://riot.org/seb/smbfs_0.0_mipsel.ipk, but it leads to error segmentation.

Would someone please provide some guidance on how to mount a NAS from a wl-500gp with samba3 installed? Thanks.

24-09-2009, 09:30
Not a real guide but some tips. I've tried this with Oleg's but probably works also with the new firmware (http://code.google.com/p/wl500g/downloads/list) version as well.

Most NASs support NFS (as their firmware is Linux based) and NFS is slightly faster than Samba so try to use NFS if you can. First check, if your NAS supports NFS. Read on if it can.

Create NFS share in your NAS. As this varies NAS by NAS I cannot help you with this.

Decide what directory in your router you'd like to mount the NAS. Let's assume it's /mnt.

Enable NFS in the router's WEB interface (the router will probably restarted after this).

Insert the NFS kernel module in your router.

insmod nfs

This is needed as by default, it's not loaded. The reason for having a separate kernel module that typically it's not used, so it would be just a waste of memory to have it there.

Mount in your router the share of your NAS.

In general the command
mount -t nfs -o rsize=32768,wsize=32768,timeo=14,intr,proto=tcp <the IP address of your NAS>:/the_share_name /the_mount_point_in_your_router(have to exist)

Let's assume that it's /nas, and your NAS has the IP address of (you have to double check this)

mount -t nfs -o rsize=32768,wsize=32768,timeo=14,intr,proto=tcp /mnt

You can learn more about NFS (e.g. why proto=tcp is used, what are the other parameters) from sourceforge FAQ (http://nfs.sourceforge.net/).

If it works, put it into some script so that it runs automatically after the router starts.

If there is some firewall between your NAS and the router you need to probably open couple of ports (e.g. in my case I was sharing one directory in Fedora and I had to configure the firewall).
E.g. I had to open port 111 and 892 in addition to other NFS ports (like 2049).

If you're unsure what port to open, you can check during the mount, what ports are tried to be opened via Wireshark (http://www.wireshark.org/download.html).

I hope it helps.

25-09-2009, 03:09
Thanks for your detailed reply, but I had two problems.
1. I tried "insmod nfs" on w-500gp, but received an error message:
insmod: unresolved symbol rpc_wake_up_task

2. My NAS (a terastation) seems to have only samba. Is there a way to have smbmount on Asus/Oleg?


25-09-2009, 05:35
Ok, I've enabled NFS from the web interface and got it running. But I am still unable to mount my NAS.

This is what I have:

"showmount -e"
Export list for
/mnt/array1 <anon clnt>

but then
"mount -t nfs -o nfsvers=2,rsize=32768,wsize=32768,timeo=14,intr,pr oto=tcp ./test"
mount: mounting on ./test failed: No such device

and this is my nfs "exports" file:
"/mnt/array1/Buffalo,no_root_squash,anonuid=65534,anon gid=65534)
/mnt/array1 (ro,insecure,all_squash)"

Could someone please help? Thanks.

26-09-2009, 17:46
tutorial on mounting a NAS from wl-500gp with samba3

now only the outstanding problem is to mount a NAS with nfs.

26-09-2009, 19:06
now only the outstanding problem is to mount a NAS with nfs.

In the other thread I suggested to drop the -o cause you weren't using options, but in this thread you are.

However the syntax for mount is : mount [flags] DEVICE NODE [-o OPT,OPT]

So your command should be:

mount -t nfs ./test -o nfsvers=2,rsize=32768,wsize=32768,timeo=14,intr,pr oto=tcp

But, I doubt that nfsvers, rsize, wsize, timeo and proto are valid options for "mount", I would just use:

mount -t nfs ./test

26-09-2009, 19:14
Thanks, but I did try
mount -t nfs ./test
but the same result.

29-09-2009, 01:17
I think I found the problem

nfs.o needs 2 other kernelmodules: sunrpc.o and lockd.o

So first insmod sunrpc, then insmod lockd and finally insmod nfs

now it should work...

29-09-2009, 01:57
Thanks for helping. But the two modules were already running. If you follow this link to the other thread I mentioned the same problem, you can see the modules that were running on my wl-500gp/oleg.


Thanks again.

29-09-2009, 16:08
hmmm you're right, I didn't completely read that last post.
I only saw insmod: unresolved symbol rpc_wake_up_task and that's exactly the error you get, when you try to load nfs.o without the other 2 modules.

Did you mention the firmware version you are running?
Perhaps a newer firmware is the solution?

I tried to mount a nfs-share on my laptop running Leopard -> I didn't get the error, but instead i the mount-command hung...
But then again this might also be a problem on the laptop.

30-09-2009, 02:55
I have the newest firmware running, (build 617). I am giving up. Thanks for trying.