WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Mount NFS on piCore  (Read 9039 times)

terenyi

  • Guest
Mount NFS on piCore
« on: April 27, 2016, 01:45:18 AM »
Hello,

I'm developing on a Raspberry PI A+ and I would like to mount a remote NFS directory to store my compilation and packaging directories. I'm using the piCorePlayer image. But I can't find the required packages for that (nfs-utils?) CIFS is working, but it is not a good storage option for development files (symlinks for .so files for example). What can I do to mount NFS?

Thanks in advance!
Balázs

Offline patrikg

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 673
Re: Mount NFS on piCore
« Reply #1 on: April 27, 2016, 02:01:23 AM »
I just add this to the command line args to mount a nfs share on boot.

mount /mnt/mmcblk0p1/
sudo nano -w /mnt/mmcblk0p1/cmdline.txt

Code: (bash) [Select]
nfsmount=10.42.0.1:/home/patrik/picore/ tce=nfs/tce
« Last Edit: April 27, 2016, 02:02:58 AM by patrikg »

terenyi

  • Guest
Re: Mount NFS on piCore
« Reply #2 on: April 27, 2016, 02:21:00 AM »
I forgot to mention that i'm using piCorePlayer 2.04 which is based on piCore 7.1 beta3.

I installed filesystems-4.1.20-piCore+, even modprobed nfsd, but I only get:

Code: (bash) [Select]
sudo mount nas:/volume1/work /work
mount: wrong fs type, bad option, bad superblock on nas:/volume1/work,
       missing codepage or helper program, or other error
       (for several filesystems (e.g. nfs, cifs) you might
       need a /sbin/mount.<type> helper program)

       In some cases useful info is found in syslog - try
       dmesg | tail or so.

@patrikg
Thanks for the reply. Will it work, if manual mount does not?
« Last Edit: April 27, 2016, 02:44:20 AM by terenyi »

Offline patrikg

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 673
Re: Mount NFS on piCore
« Reply #3 on: April 27, 2016, 05:05:45 AM »
Have you tried to add nfs as type ??

Code: (bash) [Select]
sudo mount -t nfs nas:/volume1/work /work

Offline Paul_123

  • Administrator
  • Hero Member
  • *****
  • Posts: 1072
Re: Mount NFS on piCore
« Reply #4 on: April 27, 2016, 06:08:30 AM »
I have had the same problem with TC 6.x and 7.x

Tried NFS3 and NFS4 exports from a symbology nas

I gave up and went back to cifs, but would love to make it work.   I suspect it is a mount helper problem.

The Same synology export mounts fine on a different armv7  machine running unbuntu

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Mount NFS on piCore
« Reply #5 on: April 27, 2016, 07:25:19 AM »
I'm traveling but will take a look next week
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

terenyi

  • Guest
Re: Mount NFS on piCore
« Reply #6 on: April 27, 2016, 07:36:26 AM »
Have you tried to add nfs as type ??

Yes, i have tried that also. The mount.nfs helper is not available in any package I tried.

@bmarkus: Thanks, I will wait for that!

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14535
Re: Mount NFS on piCore
« Reply #7 on: April 27, 2016, 08:55:21 AM »
Did you try "-o nfsvers=3" (or something like that)?

Offline patrikg

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 673
Re: Mount NFS on piCore
« Reply #8 on: April 27, 2016, 09:56:06 AM »
Take a look in the section in file that mounts when booting
It also add the mount nfs line to fstab.
more /etc/init.d/tc-config


Offline patrikg

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 673
Re: Mount NFS on piCore
« Reply #9 on: April 27, 2016, 10:28:11 AM »
When i mount via nfs on boot, and then look at what options being used, here there are.
And when i test to mount with these again it works.(not the same error message as you)
I not shure what options that make it!!

Code: (bash) [Select]
rw,relatime,vers=3,rsize=524288,wsize=524288,namlen=255,hard,
nolock,proto=tcp,port=2049,timeo=70,retrans=3,sec=sys,local_lock=all,addr=10.42.0.1


Have tried some options and it seems that then i use option addr=(nfs server address) and option nolock it works.
Code: (bash) [Select]
mount -o addr=10.42.0.1,nolock -t nfs 10.42.0.1:/home/patrik/picore temp
« Last Edit: April 27, 2016, 10:49:14 AM by patrikg »

Offline patrikg

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 673
Re: Mount NFS on piCore
« Reply #10 on: April 27, 2016, 10:54:23 AM »
When searching on the web i can find this text

During a basic "fg" mount, the mount.nfs command will add an "addr=" option to the mount option string, and call the mount(2) system call. The kernel will make the mountd request and set up the NFS mount, then attach the share to mount.nfs command's name space as usual.

Offline Paul_123

  • Administrator
  • Hero Member
  • *****
  • Posts: 1072
Re: Mount NFS on piCore
« Reply #11 on: April 28, 2016, 04:26:26 PM »
Hey that works patrick.....thanks.

I swear I tried with all of the nfs utilities in piCore 6.x    but perhaps mount wasn't finding mount.nfs helper.

terenyi

  • Guest
Re: Mount NFS on piCore
« Reply #12 on: April 28, 2016, 11:51:17 PM »
Here works too! Thank you, Patrikg!
What a great and fast community!

Offline patrikg

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 673
Re: Mount NFS on piCore
« Reply #13 on: April 29, 2016, 01:06:34 AM »
Great...i solved the problem with the options that mounts default when boots.
Just used mount command without any syntax, to display the mounts and there options.
Tried them out and found that addr make it.

I presume when booting it's background and therefor it's working then.

If mount.nfs just add addr to the options if you mount foreground.(make a alias command??)

And I don't know how to get the default settings from the specific mount command??
To more investigate what more options have to be.
« Last Edit: April 29, 2016, 01:13:27 AM by patrikg »

Offline gavinmc42

  • Sr. Member
  • ****
  • Posts: 301
Re: Mount NFS on piCore
« Reply #14 on: May 07, 2016, 05:53:15 AM »
Not sure I followed all that.
What is the way to mount nfs?