NFS share not working

This forum is for supported devices using an ARMv7 Allwinner SoC.

NFS share not working

Postby zimci » Sun Aug 25, 2013 7:13 am

Hi there!
I own a second hand hackberry a10 with an arch build. I already mounted a usbd drive, which I am trying to connect to an openelec machine with an NFS share. The drive mounts with no problems, but when following the nfs quide https://wiki.archlinux.org/index.php/NFS I can't get the the rpc-idmapd.service and rpc-mountd.service enabled.

My entries for etc/idmapd.conf are usual:
$this->bbcode_second_pass_code('', '[General]

Verbosity = 1
Pipefs-Directory = /var/lib/nfs/rpc_pipefs
Domain = hackberry

[Mapping]

Nobody-User = nobody
Nobody-Group = nobody

[Translation]

Method = nsswitch
')

My /etc/fstab has no sd card, but has a usb hard drive mounted properly and the nfs share bind is working as well (is the problem here, because there is no /proc line in fstab???):
$this->bbcode_second_pass_code('', '#
# /etc/fstab: static file system information
#
# <file system> <dir> <type> <options> <dump> <pass>
/dev/sda1 /mnt/seagate ext4 defaults 0 0
/mnt/seagate/music /srv/nfs4/music none bind 0 0
')

And /etc/exports
$this->bbcode_second_pass_code('', '/srv/nfs4/ 192.168.1.33/24(rw,fsid=root,no_subtree_check)
/srv/nfs4/music 192.168.1.33/24(rw,no_subtree_check,nohide)')

When running rpc-idmapd.service I get a $this->bbcode_second_pass_code('', 'Dependency failed for NFSv4 ID-name mapping daemon.') error in journalctl.

rpc.mountd.service gives me the following error:
$this->bbcode_second_pass_code('', '-- Unit nfsd.service has begun starting up.
Aug 25 02:03:46 hackberry rpc.nfsd[318]: rpc.nfsd: Unable to access /proc/fs/nfsd errno 2 (No such file or directory).
Aug 25 02:03:46 hackberry rpc.nfsd[318]: Please try, as root, 'mount -t nfsd nfsd /proc/fs/nfsd' and then restart rpc.nfsd to correct the pr
Aug 25 02:03:46 hackberry rpc.nfsd[318]: error starting threads: errno 19 (No such device)
Aug 25 02:03:46 hackberry systemd[1]: nfsd.service: main process exited, code=exited, status=1/FAILURE
Aug 25 02:03:46 hackberry systemd[1]: Failed to start NFS server.
-- Subject: Unit nfsd.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- Documentation: http://www.freedesktop.org/wiki/Software/systemd/catalog/be02cf6855d2428ba40df7e9d022f03d
--
-- Unit nfsd.service has failed.
--
-- The result is failed.
Aug 25 02:03:46 hackberry systemd[1]: Dependency failed for NFS Mount Daemon.')

I have no idea what the problem could be, because it is my first time working on an arm archiecture and I quit using arch linux when it switched to systemd, because I was really accustomed to using init scripts. Any comment would be helpful. Thanks.
zimci
 
Posts: 1
Joined: Sun Aug 25, 2013 6:43 am

Re: NFS share not working

Postby WarheadsSE » Sun Aug 25, 2013 12:56 pm

This is pretty straight forward:
$this->bbcode_second_pass_code('', 'Aug 25 02:03:46 hackberry rpc.nfsd[318]: rpc.nfsd: Unable to access /proc/fs/nfsd errno 2 (No such file or directory).
Aug 25 02:03:46 hackberry rpc.nfsd[318]: Please try, as root, 'mount -t nfsd nfsd /proc/fs/nfsd' and then restart rpc.nfsd to correct the pr...')
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: NFS share not working

Postby Bombardment » Thu Aug 29, 2013 4:13 pm

Not OP but I've received the exact same error messages as him on my cubieboard.

$this->bbcode_second_pass_code('', '[root@archcubie ~]# mount 192.168.1.101:/music /tmp/nfs
mount.nfs4: No such device')
I've used that exact command to succesfully mount the share on a different machine so I know the share works on the server side.

When I tried the suggested command I got this:
$this->bbcode_second_pass_code('', '[root@archcubie ~]# mount -t nfsd nfsd /proc/fs/nfsd
mount: unknown filesystem type 'nfsd'')
Which leads me to believe that the kernel doesn't seem to support nfs4. We're both using a10 devices so we should be using the same kernel.
$this->bbcode_second_pass_code('', '[root@archcubie ~]# uname -a
Linux archcubie 3.0.57-5-ARCH #1 PREEMPT Wed May 29 18:13:48 UTC 2013 armv7l GNU/Linux
[root@archcubie ~]# pacman -Q linux-sun4i
linux-sun4i 3.0.57-6')
The kernel version and the package version don't seem to match. Could this be part of the problem?

/proc/filesystems seems to suggest there is no nfs support in the kernel.
$this->bbcode_second_pass_code('', '[root@archcubie ~]# cat /proc/filesystems
nodev sysfs
nodev rootfs
nodev bdev
nodev proc
nodev cgroup
nodev cpuset
nodev tmpfs
nodev devtmpfs
nodev binfmt_misc
nodev securityfs
nodev sockfs
nodev pipefs
nodev anon_inodefs
nodev devpts
ext3
ext2
ext4
nodev ramfs
vfat
msdos
iso9660
nodev autofs
nodev fuse
fuseblk
nodev fusectl
udf
nilfs2
nodev mqueue
')

I'll try and look into it somemore later. Am I on the right track?
Bombardment
 
Posts: 3
Joined: Thu Aug 29, 2013 2:55 pm

Re: NFS share not working

Postby WarheadsSE » Thu Aug 29, 2013 5:42 pm

Kernel uname && package not matching is a definitive issue.
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: NFS share not working

Postby Bombardment » Thu Aug 29, 2013 9:42 pm

Okay I've figured out why the package version and uname version don't match.

$this->bbcode_second_pass_code('', '[root@archcubie ~]# strings /boot/uImage | grep 3.0 # uImage on rootfs ie /dev/mmcblk0p2
Linux-3.0.57-6-ARCH
...

[root@archcubie ~]# strings /tmp/boot/uImage | grep 3.0 # uImage on boot partition ie /dev/mmcblk0p1
Linux-3.0.57-5-ARCH
...
')

The new uImage gets created and the modules belonged old uImage are deleted as per normal arch behaviour.
New modules are generated to match the new uImage.
Reboot.
The old kernel is used and finds that the modules belong to a different version of kernel.
Modules aren't loaded.
No NFS or other stuff dependant on kernel modules.

So what I did to fix it is this:
$this->bbcode_second_pass_code('', '[root@archcubie /]# mkdir /tmp/boot
[root@archcubie /]# mount /dev/mmcblk0p1 /tmp/boot/
[root@archcubie /]# rm /tmp/boot/uImage
[root@archcubie /]# cp /boot/uImage /tmp/boot
[root@archcubie /]# rm /boot/uImage
[root@archcubie /]# nano /ect/fstab')
And add this line to fstab:
$this->bbcode_second_pass_code('', '/dev/mmcblk0p1 /boot vfat defaults 0 0')

Reboot and all is good.
Mounting the boot partition as /boot is fairly standard in desktop ArchLinux but I never thought to do it for ARM. The beginners tutorial uses genfstab and hides this from new users.

Might it be an idea to add the fstab step to the instructions?

Anyway this works for me and will probably work for OP too.
Thanks Warhead for the nudge in the right direction.
Bombardment
 
Posts: 3
Joined: Thu Aug 29, 2013 2:55 pm


Return to Allwinner

Who is online

Users browsing this forum: No registered users and 38 guests