Mount Linux filesystem from Android

The place to post if you need help or advice

Moderators: ChrisThornett, LXF moderators

Mount Linux filesystem from Android

Postby pk_fox » Wed Apr 23, 2014 7:35 am

Hi all, I've googled but can't find anything decent, how can I mount a Linux filesystem from my Android device, the Linux system ( Raspberry pi ) is on my local LAN and hard wired to a router whilst my Android tablet is connected to the same router via Wi-Fi, I know the mount command supports IP addresses as arguments but I can't seem to get it working , I keep getting "invalid argument" error message.
[/code]
We can't stop here, this is bat country. Hunter S Thompson RIP.
User avatar
pk_fox
LXF regular
 
Posts: 292
Joined: Wed Apr 13, 2005 1:38 pm
Location: Surrey, UK

Postby nelz » Wed Apr 23, 2014 7:54 am

You can't mount a Linux filesystem from another computer, you mount a network filesystem. First you need to export the filesystem on the Pi with wither NFS or CIFS (Samba). Then you use something like Mount Manager or CIFS Manager to mount that on the Android device.

Alternatively, you can use ES File Explorer to access remote folders over IFS, SFTP (SSH) or WebDAV. It really depends on what you want to do, but this plus Ampache for streaming music works for me.
"Insanity: doing the same thing over and over again and expecting different results." (Albert Einstein)
User avatar
nelz
Site admin
 
Posts: 8497
Joined: Mon Apr 04, 2005 11:52 am
Location: Warrington, UK

Postby pk_fox » Wed Apr 23, 2014 8:58 am

nelz wrote:You can't mount a Linux filesystem from another computer, you mount a network filesystem. First you need to export the filesystem on the Pi with wither NFS or CIFS (Samba). Then you use something like Mount Manager or CIFS Manager to mount that on the Android device.

Alternatively, you can use ES File Explorer to access remote folders over IFS, SFTP (SSH) or WebDAV. It really depends on what you want to do, but this plus Ampache for streaming music works for me.


Hi Nelz, thanks for that, how do I export the Pis' folders as CIFS shares?
We can't stop here, this is bat country. Hunter S Thompson RIP.
User avatar
pk_fox
LXF regular
 
Posts: 292
Joined: Wed Apr 13, 2005 1:38 pm
Location: Surrey, UK

Postby Nuke » Wed Apr 23, 2014 9:23 am

nelz wrote:You can't mount a Linux filesystem from another computer, you mount a network filesystem. First you need to export the filesystem on the Pi with wither NFS or CIFS (Samba). Then you use something like Mount Manager or CIFS Manager to mount that on the Android device.

Perhaps it is just terminology, but I take pk_fox to mean "mount a file system on another computer", and yes in that case you mount it as a network file system (as opposed to a ext4 or reiser or jfs file system).

I have no experience of Samba or Android, but I was advised that setting up nfs is simpler than Samba. I have set up my RPi as an nfs server, and found it does not have the network modules by default (the designers ever envisaged this use), so it needs more than adding an exports file; rpcbind and nfs-kernel-server need to be installed from the repository.

My mount command btw goes :
Code: Select all
mount -t nfs 192.168.1.9:/home/common /home/nuke/RPi_common

... where 192.168.1.9 is my RPi, ...../common is the RPi directory I am mounting, and ...../RPi_common is the mount point on my PC.
Unsolved mysteries of the Universe, No 13 :-
How many remakes of Anna Karenina does the World need?
User avatar
Nuke
LXF regular
 
Posts: 217
Joined: Wed Feb 09, 2011 12:11 pm
Location: Chepstow, UK

Postby purplepenguin » Wed Apr 23, 2014 10:01 am

Another option for mounting remote file systems is SSHFS. I use it to connect RPi's and other desktops to my media server in my experience it seems faster than NFS and SMB.

I move files between my desktop and Android phone via an FTP server running on the phone. It's easier than setting up MTP on Linux.

If your running an SSH server on the PI use ES File Explorer to connect to it via SFTP.
So it looks like I'm back to LinuxMint again. Why you ask? Because my machine smell nicer.

I'm not too sure I'd want a Mint and Cinnamon muffin with my brew though. Guess I'm lucky they don't run my local bakery.
purplepenguin
LXF regular
 
Posts: 130
Joined: Wed Oct 05, 2011 2:19 pm
Location: Blissfully at the Command Line

Postby pk_fox » Wed Apr 23, 2014 1:25 pm

Nuke wrote:
nelz wrote:You can't mount a Linux filesystem from another computer, you mount a network filesystem. First you need to export the filesystem on the Pi with wither NFS or CIFS (Samba). Then you use something like Mount Manager or CIFS Manager to mount that on the Android device.

Perhaps it is just terminology, but I take pk_fox to mean "mount a file system on another computer", and yes in that case you mount it as a network file system (as opposed to a ext4 or reiser or jfs file system).

I have no experience of Samba or Android, but I was advised that setting up nfs is simpler than Samba. I have set up my RPi as an nfs server, and found it does not have the network modules by default (the designers ever envisaged this use), so it needs more than adding an exports file; rpcbind and nfs-kernel-server need to be installed from the repository.

My mount command btw goes :
Code: Select all
mount -t nfs 192.168.1.9:/home/common /home/nuke/RPi_common

... where 192.168.1.9 is my RPi, ...../common is the RPi directory I am mounting, and ...../RPi_common is the mount point on my PC.


Hi there, I installed Samba and all is fine, thanks for the response.
We can't stop here, this is bat country. Hunter S Thompson RIP.
User avatar
pk_fox
LXF regular
 
Posts: 292
Joined: Wed Apr 13, 2005 1:38 pm
Location: Surrey, UK

Postby pk_fox » Wed Apr 23, 2014 1:26 pm

purplepenguin wrote:Another option for mounting remote file systems is SSHFS. I use it to connect RPi's and other desktops to my media server in my experience it seems faster than NFS and SMB.

I move files between my desktop and Android phone via an FTP server running on the phone. It's easier than setting up MTP on Linux.

If your running an SSH server on the PI use ES File Explorer to connect to it via SFTP.


Hi there, I installed Samba and all is fine, thanks for the response. I will certainly look at SSHFS.
We can't stop here, this is bat country. Hunter S Thompson RIP.
User avatar
pk_fox
LXF regular
 
Posts: 292
Joined: Wed Apr 13, 2005 1:38 pm
Location: Surrey, UK


Return to Help!

Who is online

Users browsing this forum: No registered users and 2 guests