Guest KafkaEsque Posted May 24, 2011 Report Posted May 24, 2011 Hi. Longtime lurker. I've had my Blade since Oct. Thanks to all who have made this a great phone. I'm currently running CM7 nightly 79, and I would like some help mounting my NFS shares (from my Ubuntu 10.04 media server) locally on the blade (so I can play media on the phone). Any clear instructions gratefully received. I have shares NFS shares mounted across the network for XBMC, so it shouldn't be much more difficult, no? Thanks for the consideration. KafkaEsque.
Guest k0zmic Posted May 24, 2011 Report Posted May 24, 2011 Hi. Longtime lurker. I've had my Blade since Oct. Thanks to all who have made this a great phone. I'm currently running CM7 nightly 79, and I would like some help mounting my NFS shares (from my Ubuntu 10.04 media server) locally on the blade (so I can play media on the phone). Any clear instructions gratefully received. I have shares NFS shares mounted across the network for XBMC, so it shouldn't be much more difficult, no? Thanks for the consideration. KafkaEsque. Try ES File Explorer. There's a LAN tab to add servers just enter the IP address and login for XBMC and it should work I think. I've only tried Windows shares so I'm not sure.
Guest KenBW2 Posted May 24, 2011 Report Posted May 24, 2011 Alternatively try SFTP (sudo apt-get install openssh-server) and you can browse your home folder from ES File Explorer. Not sure about NFS
Guest KafkaEsque Posted May 24, 2011 Report Posted May 24, 2011 Try ES File Explorer. There's a LAN tab to add servers just enter the IP address and login for XBMC and it should work I think. I've only tried Windows shares so I'm not sure. Yeah, I have tried that. But I am not using Samba, I use NFS. Thanks for the suggestion though.
Guest KafkaEsque Posted May 24, 2011 Report Posted May 24, 2011 Alternatively try SFTP (sudo apt-get install openssh-server) and you can browse your home folder from ES File Explorer. Not sure about NFS But I don't want to copy to my blade. I want to mount the share locally and access it as THOUGH it were on the blade. This is the beauty of NFS. It works so easily in linux, but android has me stumped... Thanks for the suggestions though. Oh and I have tried researching this question for quite some time before I asked here. I just thought somebody might have NFS mounted locally and could tell me what to do! :P
Guest t0mm13b Posted May 24, 2011 Report Posted May 24, 2011 But I don't want to copy to my blade. I want to mount the share locally and access it as THOUGH it were on the blade. This is the beauty of NFS. It works so easily in linux, but android has me stumped... Thanks for the suggestions though. Oh and I have tried researching this question for quite some time before I asked here. I just thought somebody might have NFS mounted locally and could tell me what to do! :P Just a quick question for you - does your kernel have NFS v3 and NFS v4 compiled into it?
Guest KafkaEsque Posted May 24, 2011 Report Posted May 24, 2011 Just a quick question for you - does your kernel have NFS v3 and NFS v4 compiled into it? That's a good question. I suppose you mean my Blade CM7 nightly 79 kernel (not my linux kernel on the media server). If so, the answer is, I haven't the foggiest. If so, do I need to recompile the kernel (on the blade)? :P
Guest t0mm13b Posted May 24, 2011 Report Posted May 24, 2011 That's a good question. I suppose you mean my Blade CM7 nightly 79 kernel (not my linux kernel on the media server). If so, the answer is, I haven't the foggiest. If so, do I need to recompile the kernel (on the blade)? :P Yes, a recompile of the kernel would be required - you can confirm this, by following the commands, plug in the cable into it and do the following: adb shell zcat /proc/config.gz > /sdcard/my_kernel.config exit Then pull down /sdcard/my_kernel.config by way of adb pull /sdcard/my_kernel.config, and load it up on a plain text editor and search for the strings CONFIG_NFS, that's the clue to telling you if its compiled in or not.
Guest KafkaEsque Posted May 24, 2011 Report Posted May 24, 2011 Hey t0mm13b. Thanks for those instructions: CONFIG_NETWORK_FILESYSTEMS=y CONFIG_NFS_FS=y CONFIG_NFS_V3=y # CONFIG_NFS_V3_ACL is not set # CONFIG_NFS_V4 is not set # CONFIG_NFSD is not set CONFIG_LOCKD=y So. Does that mean NFS is in the kernel?
Guest Phoenix Silver Posted May 24, 2011 Report Posted May 24, 2011 (edited) nfs3 is in the kernel but not nfs4 Edited May 24, 2011 by Phoenix Silver
Guest KafkaEsque Posted May 24, 2011 Report Posted May 24, 2011 (edited) nfs3 is in the kernel but not nfs4 Okay. This is a little above my comprehension, but I'm willing to learn. What's the next step? mount -t nfs 192.168.0.197:/raid/books /sdcard/mnt/books Didn't work: Permission denied. Are you root? Edited May 24, 2011 by KafkaEsque
Guest t0mm13b Posted May 24, 2011 Report Posted May 24, 2011 Okay. This is a little above my comprehension, but I'm willing to learn. What's the next step? Didn't work: Permission denied. Are you root? Hmmm, the only snag with nfs, is:PermissionsOwnershipGroup Double check on your exportfs configuration to ensure that you can indeed mount it... you may not have to do anything on the blade side of things, rather, more so on the nfs server side of it. :P
Guest KafkaEsque Posted May 24, 2011 Report Posted May 24, 2011 I have nfs shares set up for 3 different ubuntu boxes in my house (three clients accessing my 3x2TB Raid array). I just added in the blade IP to /etc/exports and restarted the NFS service, as I would do with any other NFS client wanting to access my media shares. I need to do more than this? Thanks for all the helping, btw. :P
Guest t0mm13b Posted May 24, 2011 Report Posted May 24, 2011 I have nfs shares set up for 3 different ubuntu boxes in my house (three clients accessing my 3x2TB Raid array). I just added in the blade IP to /etc/exports and restarted the NFS service, as I would do with any other NFS client wanting to access my media shares. I need to do more than this? Thanks for all the helping, btw. :P You may have to add to this in your exports - specifically for the purpose of the blade exported_mount_dir ip_address (rw,anonuid=1000,anongid=100,nohide,insecure_locks,no_subtree_check) Replace exported_mount_dir with your actual directory you are exporting, and replace ip_address with the actual NFS server's IP Address. In that way the mapping in place should work with anonymous user id and group id... hint hint....
Guest KafkaEsque Posted May 24, 2011 Report Posted May 24, 2011 You may have to add to this in your exports - specifically for the purpose of the blade exported_mount_dir ip_address (rw,anonuid=1000,anongid=100,nohide,insecure_locks,no_subtree_check) Replace exported_mount_dir with your actual directory you are exporting, and replace ip_address with the actual NFS server's IP Address. In that way the mapping in place should work with anonymous user id and group id... hint hint.... Oooooo. All new stuff. I will give it a go. :P Thanks.
Guest KafkaEsque Posted May 24, 2011 Report Posted May 24, 2011 Hmm tried various options. Keep getting permission denied (are you root). Do I need to superuser the terminal app on the blade? It takes 5 minutes to set up NFS on ubuntu. Not so much on my blade. :P I will try a few more things.
Guest KafkaEsque Posted May 24, 2011 Report Posted May 24, 2011 Hmm. Just tried cifsmanager and mountmanager and neither want to mount the nfs share. I tried anongid=1000 Back to being stumped.
Guest shadowninty Posted May 24, 2011 Report Posted May 24, 2011 run command "su" in terminal on its own to get superuser root privileges for Terminal
Guest KafkaEsque Posted May 24, 2011 Report Posted May 24, 2011 run command "su" in terminal on its own to get superuser root privileges for Terminal Do'h. Yeah, I tried sudo. Guess I should've thought of that one. I will test out a few more different things, see if anything works. I gave up setting up Samba sharing, cos I thought NFS was easier. :P
Guest t0mm13b Posted May 24, 2011 Report Posted May 24, 2011 Hmm. Just tried cifsmanager and mountmanager and neither want to mount the nfs share. I tried anongid=1000 Back to being stumped. Wait up... If your files in the directory that you are exporting via NFS, has user id of 100, group id of 120 for example (this can be interrogated by entering id on the nfs server box itself). Now, assume user id is 'jdoe', and group is 'users', then exported_mount_dir ip_address (rw,anonuid=100,anongid=120,nohide,insecure_locks,no_subtree_check) on the blade, will have anonymous access to the files owned by jdoe and of group 'users' and the blade user, ie. you or root, is mapped to that anonymously and should be able to see the files on that nfs exported directory. Ensure it is correct! :P
Guest Phoenix Silver Posted May 24, 2011 Report Posted May 24, 2011 Wait up... If your files in the directory that you are exporting via NFS, has user id of 100, group id of 120 for example (this can be interrogated by entering id on the nfs server box itself). Now, assume user id is 'jdoe', and group is 'users', then exported_mount_dir ip_address (rw,anonuid=100,anongid=120,nohide,insecure_locks,no_subtree_check) on the blade, will have anonymous access to the files owned by jdoe and of group 'users' and the blade user, ie. you or root, is mapped to that anonymously and should be able to see the files on that nfs exported directory. Ensure it is correct! :P no android doesn't work like that each app has an uid and a gid only root will have access to the nfs mount normal apps no i have tried and haven't found the solution yet but maybe a parameter server side i haven't seen it's possible at your place i would use ssh you can have a mounted ssh dir in blade
Guest KafkaEsque Posted May 24, 2011 Report Posted May 24, 2011 The two apps: mount manager, cifs manger both say they can handle nfs shares, but no luck yet. I'll stick with it and try and get it working. Thanks for the advice.
Guest sm4tik Posted June 23, 2011 Report Posted June 23, 2011 I've run into this problem also, any news?
Guest Thailandian Posted July 19, 2011 Report Posted July 19, 2011 Hi all, I just managed to solve this - at least for my Galaxy Mini. Hopefully this may also help others. The problem seems to be that the standard "mount" command is hobbled in Android. And the solution is to use a neat little app called busybox, which can be downloaded from Android Market. After doing that and installing the latest version, enter this in a terminal as root: busybox mount -o nolock,ro,hard,intr,vers=3 -t nfs 192.xxx.xxx.x.x:/your/nfs/share /mnt/sdcard/YourLocalFolder where: 192.xxx.xxx.x.x:/your/nfs/share is the ip address of your nfs share, and /mnt/sdcard/YourLocalFolder is an empty folder where you want to mount your nfs share In other words, the busybox mount command seems to work exactly the same as the standard linux mount command (except that it actually works on Android :)) After getting it to work once, I tried exactly the same command but removed "busybox" from the beginning, and got similar errors as reported elsewhere on this thread. So busybox certainly seems to be the critical factor. I'm not sure how important the options are - I would suspect that at least vers=3 is important since, from all reports, there is no support for nfs version 4 in Android's linux core as yet. After that, I made a couple of bash scripts - one to mount my nfs shares, and the other to unmount them (also using busybox before the umount command, but I'm not really sure if that is necessary). Then, I found another neat little app called Script Manager, and set up both scripts as favourites in it. Now, when I want to mount or unmount my shares, I just use Script Manager to run the scripts as root. Script Manager also has options to "run at boot" or "run at net. change". Just one word of caution. I left Astro parked inside a shared folder this morning, and when I got to work, had to reboot my phone - I assume because Astro was desperately searching for the contents of that folder - about 15 KM behind us :rolleyes:. Finally, to give due credit, I found this solution at: http://forum.archosf...p?f=59&p=250110 Be careful if you copy the command from there though as there is a typo in it. Also the app MountNFS.apk that it mentions as an alternative didn't work for me. (Add that to expanding list of Mount Manager, CIFS Manager etc.) One thing that somebody may be able to advise on, I removed the rsize and wsize options from the original command, and it didn't seem to make any difference while watching videos. According to the official Linux man document for mount: This causes the NFS client to try to negotiate a buffer size up to the size specified. A large buffer size does improve performance, but both the server and client have to support it. In the case where one of these does not support the size specified, the size negotiated will be the largest that both support. Does anyone know what the upper limit of buffer size for Android is - or is it device-specific? I'm tempted just to put ridiculously large numbers in there, but now that I've got everything working nicely, am a bit wary. Anyway, I hope this helps someone else.
Guest KafkaEsque Posted July 19, 2011 Report Posted July 19, 2011 I can confirm this works! Many thanks Thailandian.
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now