Modify

Opened 4 years ago

Last modified 2 years ago

#10906 new defect

Remote NFS share doesn't mount from UCI fstab

Reported by: fedel@… Owned by: developers
Priority: normal Milestone: Barrier Breaker 14.07
Component: base system Version: Backfire 10.03.1 RC3
Keywords: Cc:

Description

This section in /etc/config/fstab:

config mount
        option target   /mnt
        option device   192.168.1.1:/path
        option fstype   nfs
        option options  nolock
        option enabled  1

would not mount the remote filesystem, even though the equivalent mount command submitted on the command line would work. The reason seems to be in /lib/functions/mount.sh around line 33:

  found_device="$(libmount_find_device_by_id "$uuid" "$label" "$device" "$cfgdevice")"

$found_device is empty for remote NFS share names in $cfgdevice.

One way to workaround this would be to extend /lib/functions/mount.sh like this:

                if [ "$fstype" = "nfs" ]; then
                        found_device="$cfgdevice"
                else
                        found_device="$(libmount_find_device_by_id "$uuid" "$label" "$device" "$cfgdevice")"
                fi

Could this be fixed in the trunk?

Attachments (0)

Change History (5)

comment:1 Changed 4 years ago by anonymous

Same problem here, please someone can fix it?
Thanks ;)

comment:2 Changed 4 years ago by Levon Avagyan <levon.avagyan@…>

The mentioned workaround seems to do the trick...
Is it possible to include it in trunk?

comment:3 Changed 3 years ago by anonymous

Same here. Digging into the code lead me to realize this workaround and find out that someone else already reported. It is appreciated to fix it. Although block-mount is probably replaced by ubox in trunk but attitude adjustment is still the latest stable release.

comment:4 Changed 3 years ago by PenaPP

Presented workaround works for me when I run /etc/init.d/fstab manually, but doesn't work when the router boots up (automount) :(

EDIT1: Maybe I should have mentioned that I'm using "Attitude Adjustment 12.09-beta" on TP-LINK WR740N

EDIT2: I've been digging in it and it seems that the problem is caused by the boot order process - ethernet ports are enabled after init of fstab as could seen here...

Sep 15 16:33:03 TL-WR740N kern.info kernel: [   33.720000] nf_conntrack version 0.5.0 (458 buckets, 1832 max)
Sep 15 16:33:19 TL-WR740N user.notice fstab: mount.nfs: Network is unreachable
Sep 15 16:33:19 TL-WR740N user.info sysinit: mount.nfs: Network is unreachable
Sep 15 16:33:19 TL-WR740N user.notice fstab: mount: mounting 192.168.0.140:/WR740N on /mnt/nsa310 failed: Invalid argument
Sep 15 16:33:19 TL-WR740N user.info sysinit: mount: mounting 192.168.0.140:/WR740N on /mnt/nsa310 failed: Invalid argument
Sep 15 16:33:22 TL-WR740N daemon.notice netifd: Interface 'lan' is now up
Sep 15 16:33:22 TL-WR740N kern.info kernel: [   53.780000] device eth0 entered promiscuous mode

EDIT3: Solution for this is to move '/etc/rc.d/S20fstab' to '/etc/rc.d/S21fstab' - it just changes priority of running network and fstab.

Last edited 3 years ago by PenaPP (previous) (diff)

comment:5 Changed 2 years ago by jow

  • Milestone changed from Attitude Adjustment 12.09 to Barrier Breaker 14.07

Milestone Attitude Adjustment 12.09 deleted

Add Comment

Modify Ticket

Action
as new .
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.