Giter Club home page Giter Club logo

Comments (261)

davicom88 avatar davicom88 commented on June 14, 2024

update:
if I did command:
sudo mount -o rw,vers=2 192.168.1.125:/mnt/sda1 /home/user/Desktop/NFS_shares/x10 -vv
returns

mount.nfs: timeout set for Wed Sep  2 13:12:20 2020
mount.nfs: trying text-based options 'vers=2,addr=192.168.1.125'
mount.nfs: prog 100003, trying vers=2, prot=6
mount.nfs: portmap query retrying: RPC: Program not registered
mount.nfs: prog 100003, trying vers=2, prot=17
mount.nfs: portmap query failed: RPC: Program not registered
mount.nfs: requested NFS version or transport protocol is not supported

It's like nfs isn't start correctly, in fact from "netstat -a" I can see a process running only on port tcp 32778

from rtd1295-openwrt18-porting.

jjm2473 avatar jjm2473 commented on June 14, 2024

Can you check is portmap running?

PS: I recommend you to install my new firmware

from rtd1295-openwrt18-porting.

davicom88 avatar davicom88 commented on June 14, 2024

yes I have just your last firmware

from rtd1295-openwrt18-porting.

davicom88 avatar davicom88 commented on June 14, 2024

portmap isn't install by default, I tried to install it but without any results, I re-try to install it. Could you suggest me if I need to configure something manually after installing portmap?

from rtd1295-openwrt18-porting.

jjm2473 avatar jjm2473 commented on June 14, 2024

Oh, which version are you using?

We don't need portmap in new firmware.

I thought you are using old firmware, because this issue is in my old project.

from rtd1295-openwrt18-porting.

jjm2473 avatar jjm2473 commented on June 14, 2024

portmap was replaced by rpcbind in new firmware

from rtd1295-openwrt18-porting.

jjm2473 avatar jjm2473 commented on June 14, 2024
root@Z9S:~# netstat -anp|grep 111
tcp        0      0 0.0.0.0:111             0.0.0.0:*               LISTEN      347/rpcbind
tcp        0      0 :::111                  :::*                    LISTEN      347/rpcbind
udp        0      0 0.0.0.0:111             0.0.0.0:*                           347/rpcbind
udp        0      0 :::111                  :::*                                347/rpcbind
unix  2      [ ACC ]     SEQPACKET  LISTENING      11192 -                   /dev/socket/lmkd
unix  2      [ ]         DGRAM                     11130 -                   
unix  2      [ ]         DGRAM                     11180 -                   

from rtd1295-openwrt18-porting.

davicom88 avatar davicom88 commented on June 14, 2024

Ah ok, but the problem remain:

root@OpenWrt:~# showmount -e localhost Export list for localhost: /mnt/sda1 192.168.1.55/24
but

root@OpenWrt:~# showmount -e
clnt_create: RPC: Unknown hos
root@OpenWrt:~# netstat -anp|grep 111
tcp        0      0 0.0.0.0:111             0.0.0.0:*               LISTEN      324/rpcbind
tcp        0      0 192.168.1.125:445       192.168.1.55:59526      ESTABLISHED 2368/smbd
tcp        0    144 192.168.1.125:22        192.168.1.55:58968      ESTABLISHED 2276/dropbear
tcp        0      0 :::111                  :::*                    LISTEN      324/rpcbind
tcp        1      0 ::ffff:192.168.1.125:36052 ::ffff:103.14.35.46:80  CLOSE_WAIT  -
tcp        0      0 ::ffff:192.168.1.125:54395 ::ffff:172.253.122.188:5228 ESTABLISHED -
tcp        1      0 ::ffff:192.168.1.125:43791 ::ffff:103.14.35.46:80  CLOSE_WAIT  -
udp        0      0 0.0.0.0:111             0.0.0.0:*                           324/rpcbind
udp        0      0 192.168.1.125:137       0.0.0.0:*                           1291/nmbd
udp        0      0 192.168.1.125:138       0.0.0.0:*                           1291/nmbd
udp        0      0 192.168.1.125:50405     0.0.0.0:*                           541/minidlna
udp        0      0 :::111                  :::*                                324/rpcbind

from rtd1295-openwrt18-porting.

davicom88 avatar davicom88 commented on June 14, 2024

Wich command do you use to connect to Z9S on linux client?

from rtd1295-openwrt18-porting.

jjm2473 avatar jjm2473 commented on June 14, 2024

I never test NFS in linux client, but Mac OS client works fine.

I checked these commands on my Z9S:

root@Z9S:~# showmount -e localhost
Export list for localhost:
/mnt/sataa2 *
root@Z9S:~# showmount -e 127.0.0.1
Export list for 127.0.0.1:
/mnt/sataa2 *
root@Z9S:~# showmount -e 
Export list for Z9S:
/mnt/sataa2 *

from rtd1295-openwrt18-porting.

davicom88 avatar davicom88 commented on June 14, 2024

following the guide on official openwrt site
https://openwrt.org/docs/guide-user/services/nas/nfs.server

I obtain error when I start nfs daemon, could this help you to check what my problem is?

root@OpenWrt:~# /etc/init.d/rpcbind disable
root@OpenWrt:~# /etc/init.d/nfsd disable
root@OpenWrt:~# /etc/init.d/rpcbind enable
root@OpenWrt:~# /etc/init.d/nfsd enable
root@OpenWrt:~# /etc/init.d/rpcbind start
root@OpenWrt:~# /etc/init.d/nfsd start
mount: /proc/fs/nfsd: unknown filesystem type 'nfsd'.
rpc.nfsd: Unable to access /proc/fs/nfsd errno 2 (No such file or directory).
Please try, as root, 'mount -t nfsd nfsd /proc/fs/nfsd' and then restart rpc.nfsd to correct the problem

from rtd1295-openwrt18-porting.

davicom88 avatar davicom88 commented on June 14, 2024

From client linux:

user@server:~$ showmount -e 192.168.1.125
Export list for 192.168.1.125:
/mnt/sda1 192.168.1.55/24
user@server:~$ rpcinfo -p 192.168.1.125
   program vers proto   port  service
    100000    4   tcp    111  portmapper
    100000    3   tcp    111  portmapper
    100000    2   tcp    111  portmapper
    100000    4   udp    111  portmapper
    100000    3   udp    111  portmapper
    100000    2   udp    111  portmapper
    100005    1   udp  32780  mountd
    100005    1   tcp  32780  mountd
    100005    2   udp  32780  mountd
    100005    2   tcp  32780  mountd
    100005    3   udp  32780  mountd
    100005    3   tcp  32780  mountd
    100024    1   udp  32778  status
    100024    1   tcp  32778  status

from rtd1295-openwrt18-porting.

davicom88 avatar davicom88 commented on June 14, 2024

I didnt' mean you have to help me. What you have done it's yet amazing. Sorry for my little english anyway... :)

from rtd1295-openwrt18-porting.

davicom88 avatar davicom88 commented on June 14, 2024

In meantime I also tried to mount different path: /tmp with same result
And also to mount from another Linux client obtaining: permission denied

from rtd1295-openwrt18-porting.

jjm2473 avatar jjm2473 commented on June 14, 2024

can you run lsmod in Openwrt?

from rtd1295-openwrt18-porting.

davicom88 avatar davicom88 commented on June 14, 2024
user@OpenWrt:/tmp# lsmod
ahci                   26415  0 
async_memcpy            1961  1 raid456
async_pq                5947  1 raid456
async_raid6_recov       2228  1 raid456
async_tx                2849  5 raid456,async_raid6_recov,async_pq,async_xor,async_memcpy
async_xor               4407  2 raid456,async_pq
crc_ccitt               1297  1 ppp_async
dm_log                  9874  2 dm_mirror,dm_region_hash
dm_mirror              14510  0 
dm_region_hash          7997  1 dm_mirror
gre                     4441  2 pptp,ip_gre
ip_gre                  8982  0 
ip_tunnel              14210  1 ip_gre
ip6_udp_tunnel          1725  1 l2tp_core
jnl                    35828  1 ufsd
l2tp_core              23429  2 l2tp_ppp,l2tp_netlink
l2tp_netlink            8561  1 l2tp_ppp
l2tp_ppp               19267  0 
linear                  4035  0 
mali_kbase            324526 17 
md_mod                125231  6 multipath,raid456,raid10,raid1,raid0,linear
multipath               6906  0 
ppp_async               8039  0 
pppoe                  12428  0 
pptp                   15154  0 
r8168                 472958  0 
raid0                  10990  0 
raid1                  28787  0 
raid10                 38600  0 
raid456                86763  0 
rtk_btusb              50013  0 
udp_tunnel              1842  1 l2tp_core
ufsd                  698755  0 

from rtd1295-openwrt18-porting.

davicom88 avatar davicom88 commented on June 14, 2024

could be a firewall issue?

from rtd1295-openwrt18-porting.

jjm2473 avatar jjm2473 commented on June 14, 2024

In Z9S:

root@Z9S:~# lsmod
8822bs               3366638  0 
ahci                   27791  0 
async_memcpy            1961  1 raid456
async_pq                5931  1 raid456
async_raid6_recov       2236  1 raid456
async_tx                2841  5 raid456,async_raid6_recov,async_pq,async_xor,async_memcpy
async_xor               4439  2 raid456,async_pq
crc_ccitt               1289  1 ppp_async
cryptodev              41014  0 
dm_log                  9866  2 dm_mirror,dm_region_hash
dm_mirror              14502  0 
dm_region_hash          7989  1 dm_mirror
gre                     4433  2 pptp,ip_gre
ip_gre                  8982  0 
ip_tunnel              14194  1 ip_gre
ip6_udp_tunnel          1709  1 l2tp_core
jnl                    35868  1 ufsd
l2tp_core              23477  2 l2tp_ppp,l2tp_netlink
l2tp_netlink            8601  1 l2tp_ppp
l2tp_ppp               19203  0 
linear                  4027  0 
mali_kbase            347132 25 
md_mod                125319  6 multipath,raid456,raid10,raid1,raid0,linear
multipath               6930  0 
nfsd                   99743 11 
ppp_async               7983  0 
pppoe                  12420  0 
pptp                   15202  0 
r8168                 474146  0 
raid0                  10982  0 
raid1                  28787  0 
raid10                 38648  0 
raid456                87082  0 
raid6_pq               88197  3 raid456,async_raid6_recov,async_pq
rtk_btusb              51331  0 
rtk_sdmmc              34379  0 
udp_tunnel              1842  1 l2tp_core
ufsd                  698683  1 
xor                     7236  1 async_xor

It has a module named nfsd.

run modprobe /lib/modules/4.1.35-04005-g6c2818e-dirty/nfsd.ko in openwrt and see what happen

from rtd1295-openwrt18-porting.

davicom88 avatar davicom88 commented on June 14, 2024
root@OpenWrt:~# modprobe /lib/modules/4.1.35-04005-g6c2818e-dirty/nfsd.ko
failed to find a module named nfsd

so it's a damned missing module

from rtd1295-openwrt18-porting.

davicom88 avatar davicom88 commented on June 14, 2024

what can I do? or maybe is there nothing I can do :) :) ?

from rtd1295-openwrt18-porting.

jjm2473 avatar jjm2473 commented on June 14, 2024

try insmod /lib/modules/4.1.35-04005-g6c2818e-dirty/nfsd.ko

from rtd1295-openwrt18-porting.

davicom88 avatar davicom88 commented on June 14, 2024
root@OpenWrt:~# insmod /lib/modules/4.1.35-04005-g6c2818e-dirty/nfsd.ko
Failed to find nfsd. Maybe it is a built in module ?

from rtd1295-openwrt18-porting.

jjm2473 avatar jjm2473 commented on June 14, 2024

Is /lib/modules/4.1.35-04005-g6c2818e-dirty exists?
run ls -l /lib/modules/

from rtd1295-openwrt18-porting.

davicom88 avatar davicom88 commented on June 14, 2024
root@OpenWrt:~# ls -l /lib/modules/
drwxr-xr-x    2 root     root           921 Aug 29 04:14 4.1.17-g9100299-dirty

from rtd1295-openwrt18-porting.

davicom88 avatar davicom88 commented on June 14, 2024
root@OpenWrt:/lib/modules/4.1.17-g9100299-dirty# ls
ahci.ko                   crc-ccitt.ko              ip_gre.ko                 l2tp_ppp.ko               modules.builtin.bin       modules.symbols.bin       raid0.ko                  ufsd.ko
async_memcpy.ko           dm-log.ko                 ip_tunnel.ko              linear.ko                 modules.dep               multipath.ko              raid1.ko                  ump.ko
async_pq.ko               dm-mirror.ko              jnl.ko                    mali_kbase.ko             modules.dep.bin           ppp_async.ko              raid10.ko                 ump_kernel_import_ion.ko
async_raid6_recov.ko      dm-region-hash.ko         kds.ko                    md-mod.ko                 modules.devname           pppoe.ko                  raid456.ko
async_tx.ko               gre.ko                    l2tp_core.ko              modules.alias             modules.softdep           pptp.ko                   rtk_btusb.ko
async_xor.ko              ip6_udp_tunnel.ko         l2tp_netlink.ko           modules.alias.bin         modules.symbols           r8168.ko                  udp_tunnel.ko

from rtd1295-openwrt18-porting.

jjm2473 avatar jjm2473 commented on June 14, 2024

Is your device Z10? What android version it running?

from rtd1295-openwrt18-porting.

davicom88 avatar davicom88 commented on June 14, 2024

no mine is x10 rtd1295 android 6

from rtd1295-openwrt18-porting.

jjm2473 avatar jjm2473 commented on June 14, 2024

oh, maybe x10 doesn't have nfsd. try to run ls -l /proc/fs/ to see if it has nfsd

from rtd1295-openwrt18-porting.

davicom88 avatar davicom88 commented on June 14, 2024
root@OpenWrt:~# ls -l /proc/fs
dr-xr-xr-x    2 root     root             0 Sep  2 15:52 cifs
dr-xr-xr-x    7 root     root             0 Sep  2 15:52 ext4
dr-xr-xr-x    2 root     root             0 Sep  2 15:52 fscache
dr-xr-xr-x    7 root     root             0 Sep  2 15:52 jbd2
dr-xr-xr-x    2 root     root             0 Sep  2 15:52 lockd
dr-xr-xr-x    2 root     root             0 Sep  2 15:52 nfsd
dr-xr-xr-x    2 root     root             0 Sep  2 15:52 nfsfs
dr-xr-xr-x    2 root     root             0 Sep  2 15:52 ufsd
dr-xr-xr-x    2 root     root             0 Sep  2 15:52 ufsd_jnl

nfsd there's

from rtd1295-openwrt18-porting.

jjm2473 avatar jjm2473 commented on June 14, 2024

That it should support nfsd.

from rtd1295-openwrt18-porting.

davicom88 avatar davicom88 commented on June 14, 2024

Do I can install the missing module? sorry if this is a stupid question

from rtd1295-openwrt18-porting.

jjm2473 avatar jjm2473 commented on June 14, 2024

I try to mount NFS in docker with debian:

root@2bb956bb8fed:/# mount.nfs 192.168.31.250:/mnt/sataa2 /mnt -v 
mount.nfs: timeout set for Wed Sep  2 14:00:30 2020
mount.nfs: trying text-based options 'vers=4.2,addr=192.168.31.250,clientaddr=172.17.0.4'
mount.nfs: mount(2): Protocol not supported
mount.nfs: trying text-based options 'vers=4.1,addr=192.168.31.250,clientaddr=172.17.0.4'
mount.nfs: mount(2): Protocol not supported
mount.nfs: trying text-based options 'vers=4.0,addr=192.168.31.250,clientaddr=172.17.0.4'
mount.nfs: mount(2): Protocol not supported
mount.nfs: trying text-based options 'addr=192.168.31.250'
mount.nfs: prog 100003, trying vers=3, prot=6
mount.nfs: trying 192.168.31.250 prog 100003 vers 3 prot TCP port 2049
mount.nfs: prog 100005, trying vers=3, prot=17
mount.nfs: trying 192.168.31.250 prog 100005 vers 3 prot UDP port 32780
mount.nfs: Protocol not supported

It failed.

I am not sure if the docker behind the NAT cause this error.

from rtd1295-openwrt18-porting.

jjm2473 avatar jjm2473 commented on June 14, 2024

The nfsd already built in kernel in x10, we don't need to install it.

from rtd1295-openwrt18-porting.

davicom88 avatar davicom88 commented on June 14, 2024

but is it normal that I haven't active process on port 2049 that should be the nfs port?

user@server:~$ rpcinfo -p 192.168.1.125
   program vers proto   port  service
    100000    4   tcp    111  portmapper
    100000    3   tcp    111  portmapper
    100000    2   tcp    111  portmapper
    100000    4   udp    111  portmapper
    100000    3   udp    111  portmapper
    100000    2   udp    111  portmapper
    100005    1   udp  32780  mountd
    100005    1   tcp  32780  mountd
    100005    2   udp  32780  mountd
    100005    2   tcp  32780  mountd
    100005    3   udp  32780  mountd
    100005    3   tcp  32780  mountd
    100024    1   udp  32778  status
    100024    1   tcp  32778  status

from rtd1295-openwrt18-porting.

davicom88 avatar davicom88 commented on June 14, 2024
root@OpenWrt:/etc# rpcinfo
   program version netid     address                service    owner
    100000    4    tcp6      ::.0.111               -          superuser
    100000    3    tcp6      ::.0.111               -          superuser
    100000    4    udp6      ::.0.111               -          superuser
    100000    3    udp6      ::.0.111               -          superuser
    100000    4    tcp       0.0.0.0.0.111          -          superuser
    100000    3    tcp       0.0.0.0.0.111          -          superuser
    100000    2    tcp       0.0.0.0.0.111          -          superuser
    100000    4    udp       0.0.0.0.0.111          -          superuser
    100000    3    udp       0.0.0.0.0.111          -          superuser
    100000    2    udp       0.0.0.0.0.111          -          superuser
    100000    4    local     /var/run/rpcbind.sock  -          superuser
    100000    3    local     /var/run/rpcbind.sock  -          superuser
    100005    1    udp       0.0.0.0.128.12         -          superuser
    100005    1    tcp       0.0.0.0.128.12         -          superuser
    100005    1    udp6      ::.128.12              -          superuser
    100005    1    tcp6      ::.128.12              -          superuser
    100005    2    udp       0.0.0.0.128.12         -          superuser
    100005    2    tcp       0.0.0.0.128.12         -          superuser
    100005    2    udp6      ::.128.12              -          superuser
    100005    2    tcp6      ::.128.12              -          superuser
    100005    3    udp       0.0.0.0.128.12         -          superuser
    100005    3    tcp       0.0.0.0.128.12         -          superuser
    100005    3    udp6      ::.128.12              -          superuser
    100005    3    tcp6      ::.128.12              -          superuser
    100024    1    udp       0.0.0.0.128.10         -          65536
    100024    1    tcp       0.0.0.0.128.10         -          65536
    100024    1    udp6      ::.128.10              -          65536
    100024    1    tcp6      ::.128.10              -          65536

from rtd1295-openwrt18-porting.

jjm2473 avatar jjm2473 commented on June 14, 2024

Port 2049 should be listened by kernel.

root@Z9S:~# netstat -anp |grep 2049
tcp        0      0 0.0.0.0:2049            0.0.0.0:*               LISTEN      -
tcp        0      0 192.168.31.250:2049     192.168.31.102:63917    ESTABLISHED -
tcp        0      0 :::2049                 :::*                    LISTEN      -

from rtd1295-openwrt18-porting.

davicom88 avatar davicom88 commented on June 14, 2024

for me it doesn't

from rtd1295-openwrt18-porting.

jjm2473 avatar jjm2473 commented on June 14, 2024

try mount -t nfs4 192.168.31.250:/mnt/sataa2 /mnt -o vers=3, sussed in debian in docker.

from rtd1295-openwrt18-porting.

jjm2473 avatar jjm2473 commented on June 14, 2024

can you run nfsstat -s in x10 ?

from rtd1295-openwrt18-porting.

davicom88 avatar davicom88 commented on June 14, 2024
user@server:~$ sudo mount -t nfs4 192.168.1.125:/mnt/sda1 /home/user/Desktop/NFS_shares/x10 -o vers=3
[sudo] password for user: 
mount.nfs4: access denied by server while mounting 192.168.1.125:/mnt/sda1

from rtd1295-openwrt18-porting.

davicom88 avatar davicom88 commented on June 14, 2024
root@OpenWrt:/etc# nfsstat -s
Error: No Server Stats (/proc/net/rpc/nfsd: No such file or directory).

from rtd1295-openwrt18-porting.

jjm2473 avatar jjm2473 commented on June 14, 2024

try mount | grep nfsd.
I my case:

root@Z9S:~# mount | grep nfsd
nfsd on /proc/fs/nfsd type nfsd (rw,relatime)

from rtd1295-openwrt18-porting.

jjm2473 avatar jjm2473 commented on June 14, 2024

if not mounted, try mount -t nfsd nfsd /proc/fs/nfsd -o rw,relatime

from rtd1295-openwrt18-porting.

davicom88 avatar davicom88 commented on June 14, 2024
root@OpenWrt:/etc# mount -t nfsd nfsd /proc/fs/nfsd -o rw,relatime
mount: /proc/fs/nfsd: unknown filesystem type 'nfsd'.

from rtd1295-openwrt18-porting.

jjm2473 avatar jjm2473 commented on June 14, 2024

ok, try cat /proc/filesystems

from rtd1295-openwrt18-porting.

davicom88 avatar davicom88 commented on June 14, 2024
root@OpenWrt:/etc# cat /proc/filesystems
nodev	sysfs
nodev	rootfs
nodev	ramfs
nodev	bdev
nodev	proc
nodev	cpuset
nodev	cgroup
nodev	tmpfs
nodev	devtmpfs
nodev	configfs
nodev	debugfs
nodev	tracefs
nodev	securityfs
nodev	sockfs
nodev	pipefs
nodev	rpc_pipefs
nodev	devpts
	ext3
	ext2
	ext4
	cramfs
	squashfs
	vfat
	msdos
	iso9660
nodev	ecryptfs
nodev	nfs
nodev	nfs4
nodev	cifs
	fuseblk
nodev	fuse
nodev	fusectl
nodev	overlay
	udf
nodev	selinuxfs
	btrfs
	ufsd
nodev	functionfs

from rtd1295-openwrt18-porting.

jjm2473 avatar jjm2473 commented on June 14, 2024

It seems like the kernel doesn't support nfsd.

There is some userspace NFS implements:
https://unix.stackexchange.com/questions/45899/why-is-linux-nfs-server-implemented-in-the-kernel-as-opposed-to-userspace

Is original x10 openwrt supports NFS server?

from rtd1295-openwrt18-porting.

davicom88 avatar davicom88 commented on June 14, 2024

from rtd1295-openwrt18-porting.

jjm2473 avatar jjm2473 commented on June 14, 2024

The kernel of x10 or other devices is not open source, so I can only use original kernel and it's kmods, can not add new kernel features.

If we want nfs server in x10, we can only port userspace NFS server to x10.

from rtd1295-openwrt18-porting.

davicom88 avatar davicom88 commented on June 14, 2024

sorry for my little comprehension: what does it mean userspace? In other words do we have no chance?

from rtd1295-openwrt18-porting.

davicom88 avatar davicom88 commented on June 14, 2024

ok: I understood, helped me google

from rtd1295-openwrt18-porting.

jjm2473 avatar jjm2473 commented on June 14, 2024

userspace means that it doesn't depends on kernel, it just a normal network application.
For example, samba in x10 is a userspace application, but it has a kernel version https://en.wikipedia.org/wiki/CIFSD

from rtd1295-openwrt18-porting.

jjm2473 avatar jjm2473 commented on June 14, 2024

I compiled a nfsd module, but I don't know it is working or not.

Download nfsd.ko.zip and unpack it,
copy nfsd.ko to x10's /tmp/ folder, then run insmod /tmp/nfsd.ko

from rtd1295-openwrt18-porting.

davicom88 avatar davicom88 commented on June 14, 2024

When I unpack nfsd.ko.zip, I obtain a folder. I Tried to copy complete /nfsd.ko folder with scp on /tmp, but when I get

root@OpenWrt:/tmp# insmod /tmp/nfsd.ko
Failed to find nfsd. Maybe it is a built in module ?

So I just copied file nfsd.ko into /tmp and the launched insmod /tmp/nfsd.ko in this way i get no error, but i don't know if it worked...

from rtd1295-openwrt18-porting.

jjm2473 avatar jjm2473 commented on June 14, 2024

yes, we just need nfsd.ko FILE.

run /etc/init.d/nfsd restart to reload nfs server

from rtd1295-openwrt18-porting.

davicom88 avatar davicom88 commented on June 14, 2024

In meantime lsmod now show also nfsd. I would Not break everything or Do some mistake, I'll waiting for your suggest. if you succeeded you are great

from rtd1295-openwrt18-porting.

davicom88 avatar davicom88 commented on June 14, 2024

Openwrt terminal it's stucking after /etc/init.d/nfsd restart.....

from rtd1295-openwrt18-porting.

davicom88 avatar davicom88 commented on June 14, 2024
user@server:~$ sudo ssh 192.168.1.125
[sudo] password for user: 
ssh: connect to host 192.168.1.125 port 22: No route to host

from rtd1295-openwrt18-porting.

davicom88 avatar davicom88 commented on June 14, 2024

I also can't connect to Luci webinterface, I try manual reboot

from rtd1295-openwrt18-porting.

davicom88 avatar davicom88 commented on June 14, 2024

yes after manual reboot, openwrt is again online

from rtd1295-openwrt18-porting.

jjm2473 avatar jjm2473 commented on June 14, 2024

Oh, the nfsd.ko not working, maybe the kernel modification break nfsd. I have not x9s or x10, so I can not debug it.

from rtd1295-openwrt18-porting.

davicom88 avatar davicom88 commented on June 14, 2024

Ok anyway thanks for your help. You did make a great job and supported me as long as it was possible.

from rtd1295-openwrt18-porting.

jjm2473 avatar jjm2473 commented on June 14, 2024

I ported the userspace NFS server. Try it https://jjm2473.github.io/nas/2020/08/26/rtd129x-openwrt-1806.en.html

mount command is mount -t nfs4 192.168.31.250:/mnt/sataa2 /mnt -o vers=3

from rtd1295-openwrt18-porting.

davicom88 avatar davicom88 commented on June 14, 2024

Woaaa, can I install it without loose all existing settings? are the nfs exports configurable from Luci web or should I set them from cli?

from rtd1295-openwrt18-porting.

jjm2473 avatar jjm2473 commented on June 14, 2024

yes, just upgrade firmware, configure in luci.

from rtd1295-openwrt18-porting.

davicom88 avatar davicom88 commented on June 14, 2024

ok I'm going to try. do I have enable nfs server or something else, or do it works by default and I need just edit expors file?

from rtd1295-openwrt18-porting.

jjm2473 avatar jjm2473 commented on June 14, 2024

after upgraded, wait a minute after booting, then see wether if unfsd running.

from rtd1295-openwrt18-porting.

davicom88 avatar davicom88 commented on June 14, 2024

ok

from rtd1295-openwrt18-porting.

jjm2473 avatar jjm2473 commented on June 14, 2024

there is not exportfs, showmount, nfsstat any more. ( unfs3 not provided they )

from rtd1295-openwrt18-porting.

davicom88 avatar davicom88 commented on June 14, 2024

and how can I set nfs directory to export?

from rtd1295-openwrt18-porting.

jjm2473 avatar jjm2473 commented on June 14, 2024

in luci

from rtd1295-openwrt18-porting.

davicom88 avatar davicom88 commented on June 14, 2024

sorry you answered to my question: in Luci.

from rtd1295-openwrt18-porting.

davicom88 avatar davicom88 commented on June 14, 2024
user@server:~$ sudo mount -t nfs4 192.168.1.125:/mnt/sda1 /home/user/Desktop/NFS_shares/x10 -o vers=3
[sudo] password for user: 
mount.nfs4: access denied by server while mounting 192.168.1.125:/mnt/sda1
root@OpenWrt:~# cat /proc/filesystems
nodev	sysfs
nodev	rootfs
nodev	ramfs
nodev	bdev
nodev	proc
nodev	cpuset
nodev	cgroup
nodev	tmpfs
nodev	devtmpfs
nodev	configfs
nodev	debugfs
nodev	tracefs
nodev	securityfs
nodev	sockfs
nodev	pipefs
nodev	rpc_pipefs
nodev	devpts
	ext3
	ext2
	ext4
	cramfs
	squashfs
	vfat
	msdos
	iso9660
nodev	ecryptfs
nodev	nfs
nodev	nfs4
nodev	cifs
	fuseblk
nodev	fuse
nodev	fusectl
nodev	overlay
	udf
nodev	selinuxfs
	btrfs
	ufsd
nodev	functionfs

from rtd1295-openwrt18-porting.

davicom88 avatar davicom88 commented on June 14, 2024

maybe I have to configure hosts.allow or something else?

from rtd1295-openwrt18-porting.

jjm2473 avatar jjm2473 commented on June 14, 2024

can you see system log in http://192.168.1.125/cgi-bin/luci/admin/status/syslog ? log marked as unfsd

from rtd1295-openwrt18-porting.

davicom88 avatar davicom88 commented on June 14, 2024
Fri Sep  4 11:55:20 2020 daemon.info unfsd[482]: UNFS3 unfsd 0.9.23 (C) 2009, Pascal Schmidt <[email protected]>
Fri Sep  4 11:55:20 2020 daemon.info unfsd[482]: Warning: unknown exports option `async' ignored
Fri Sep  4 11:55:20 2020 daemon.info unfsd[482]: Warning: unknown exports option `no_subtree_check' ignored
Fri Sep  4 11:55:20 2020 daemon.info unfsd[482]: /mnt/sda1: ip 192.168.1.55 mask 255.255.255.0 options 5
Fri Sep  4 12:12:08 2020 daemon.info unfsd[482]: Warning: unknown exports option `sync' ignored
Fri Sep  4 12:12:08 2020 daemon.info unfsd[482]: Warning: unknown exports option `no_subtree_check' ignored
Fri Sep  4 12:12:08 2020 daemon.info unfsd[482]: /mnt/sda1: ip 192.168.1.55 mask 255.255.255.0 options 22
Fri Sep  4 12:16:47 2020 daemon.info unfsd[482]: Warning: unknown exports option `async' ignored
Fri Sep  4 12:16:47 2020 daemon.info unfsd[482]: Warning: unknown exports option `no_subtree_check' ignored
Fri Sep  4 12:16:47 2020 daemon.info unfsd[482]: /mnt/sda1: ip 192.168.1.55 mask 255.255.255.0 options 5
Fri Sep  4 12:18:31 2020 daemon.info unfsd[482]: Warning: unknown exports option `no_subtree_check' ignored
Fri Sep  4 12:18:31 2020 daemon.info unfsd[482]: /mnt/sda1: ip 192.168.1.55 mask 255.255.255.0 options 18

from rtd1295-openwrt18-porting.

davicom88 avatar davicom88 commented on June 14, 2024

I tried different export options, but all with the same result: access denied by server

ro,all_squash,insecure,no_subtree_check
rw,no_root_squash,async,no_subtree_check
ro,all_squash,insecure,no_subtree_check

from rtd1295-openwrt18-porting.

jjm2473 avatar jjm2473 commented on June 14, 2024

what filesystem /mnt/sda1 is?

from rtd1295-openwrt18-porting.

davicom88 avatar davicom88 commented on June 14, 2024

ext4

from rtd1295-openwrt18-porting.

davicom88 avatar davicom88 commented on June 14, 2024

maybe I have to modifed mount options? i leaved set "defaults" option

from rtd1295-openwrt18-porting.

jjm2473 avatar jjm2473 commented on June 14, 2024

oh, if you have ntfs or fat32 device, try it first, it doesn't require permission.

from rtd1295-openwrt18-porting.

jjm2473 avatar jjm2473 commented on June 14, 2024

ext4 has its own user permission, you should grant permission to nobody

from rtd1295-openwrt18-porting.

jjm2473 avatar jjm2473 commented on June 14, 2024

run ps |grep unfsd, you can see it running as nobody

from rtd1295-openwrt18-porting.

davicom88 avatar davicom88 commented on June 14, 2024

it's running as root:

root@OpenWrt:~# ps |grep unfsd
  482 root      6140 S    /usr/sbin/unfsd -d
 2833 root      1204 S    grep unfsd

from rtd1295-openwrt18-porting.

jjm2473 avatar jjm2473 commented on June 14, 2024

you can change /mnt/sda1 owner to nobody by command chown -R nobody:media_rw /mnt/sda1

from rtd1295-openwrt18-porting.

jjm2473 avatar jjm2473 commented on June 14, 2024

it's running as root:

root@OpenWrt:~# ps |grep unfsd
  482 root      6140 S    /usr/sbin/unfsd -d
 2833 root      1204 S    grep unfsd

if you mount nfs without login, then it will changes to nobody

from rtd1295-openwrt18-porting.

davicom88 avatar davicom88 commented on June 14, 2024

ok I did, I hope this this persist after reboot

from rtd1295-openwrt18-porting.

jjm2473 avatar jjm2473 commented on June 14, 2024

you can change /mnt/sda1 owner to nobody by command chown -R nobody:media_rw /mnt/sda1

make sure the device not using by other service, this command will change ALL files' owner

from rtd1295-openwrt18-porting.

davicom88 avatar davicom88 commented on June 14, 2024

what exports options do you suggest?

from rtd1295-openwrt18-porting.

davicom88 avatar davicom88 commented on June 14, 2024

it was mounted on samba, but strangely the the properties remains root

from rtd1295-openwrt18-porting.

jjm2473 avatar jjm2473 commented on June 14, 2024

I use luci default option ro,sync,root_squash,all_squash,insecure,no_subtree_check, if the device is removable ( means that it not always exists ), use removable,ro,sync,root_squash,all_squash,insecure,no_subtree_check. The removable just for unfs3, not for kernel nfs server.

from rtd1295-openwrt18-porting.

jjm2473 avatar jjm2473 commented on June 14, 2024

maybe you should add some options to mount samba

from rtd1295-openwrt18-porting.

jjm2473 avatar jjm2473 commented on June 14, 2024

try mount -o uid=1023,gid=1023 when mount samba

from rtd1295-openwrt18-porting.

davicom88 avatar davicom88 commented on June 14, 2024

Meanwhile, let's see if you have done the miracle of resurrecting NFS on x10

from rtd1295-openwrt18-porting.

jjm2473 avatar jjm2473 commented on June 14, 2024

https://serverfault.com/questions/49070/how-to-setup-samba-share-to-be-mounted-as-specific-user

from rtd1295-openwrt18-porting.

davicom88 avatar davicom88 commented on June 14, 2024
user@server:~$ sudo mount -t nfs4 192.168.1.125:/mnt/sda1 /home/davicom/Desktop/NFS_shares/x10 -o vers=3
[sudo] password for user: 
mount.nfs4: access denied by server while mounting 192.168.1.125:/mnt/sda1

So I try this: I reboot, I remove auto-mount of samba from my pc and I get again chown -R nobody:media_rw /mnt/sda1

from rtd1295-openwrt18-porting.

jjm2473 avatar jjm2473 commented on June 14, 2024

can you try a normal fat32 device first? not samba or ext4

from rtd1295-openwrt18-porting.

jjm2473 avatar jjm2473 commented on June 14, 2024

see if NFS protocol working

from rtd1295-openwrt18-porting.

davicom88 avatar davicom88 commented on June 14, 2024

yes, sure, just minute. yes nfs working with others devices

from rtd1295-openwrt18-porting.

jjm2473 avatar jjm2473 commented on June 14, 2024

unfs3 support password https://github.com/unfs3/unfs3/blob/master/doc/passwords.txt

so, change NFS option to no_root_squash,rw,password=test,

and mount with mount -t nfs4 192.168.1.125:@password:test/mnt/sda1 /home/davicom/Desktop/NFS_shares/x10 -o vers=3,user=root

from rtd1295-openwrt18-porting.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.