USAGE

dir=...
mnt=/tmp/mnt/nfs/$dir
host=localhost
exportfs | grep "$dir"
showmount -a  | grep $dir
sudo mount $host:$dir $mnt

TODO

ERROR

rpc.mountd[12997]: refused mount request from $ip for /local (/local): illegal port 59240
/local/tmp  192.0.0.0/255.0.0.0(rw,sync,no_root_squash,no_subtree_check,insecure)

MEEGO

# Setting up sudo (1:1.6.8p12-4osso28+0m6) ...
~ # sudo /sbin/insmod /lib/modules/2.6.32.54-dfl61-20121301/nfs.ko
setreuid(ROOT_UID, 1): Operation not permitted

MESSAGES

mount.nfs: requested NFS version or transport protocol is not supported

MESSAGE : "Stale NFS file handle"

mv: preserving times for `${symlink}': Stale NFS file handle
rsync: failed to set times on "${symlink}": Stale NFS file handle (116)

Workaround : (on client)

cat<<EOF > /bin/ln.sh
# !/bin/sh
busybox ln $@ || echo "ignore: $_"
EOF
mv /bin/ln /bin/ln.orig
busybox ln -fs /bin/ln.sh /bin/ln

More :

@tag: rsync raid fs link

MESSAGE : "No such device"

mount -v /mnt/nas
mount.nfs: timeout set for Tue Jul 26 14:59:52 2011
mount.nfs: trying text-based options 'nolock,vers=4,addr=192.168.0.90,clientaddr=192.168.0.25'
mount.nfs: mount(2): No such device
mount.nfs: No such device
modprobe -v nfs
FATAL: Module nfs not found.
grep -i nfs /mnt/dev/sda1/config-2.6.39-6.15-adaptation-pinetrail
# CONFIG_NFS_FS is not set
# CONFIG_NFSD is not set
zypper si `rpm -q --qf '%{SOURCERPM}\n' kernel-adaptation-pinetrail `
Source package 'kernel-adaptation-pinetrail-2.6.39-6.15.src.rpm' not found.
zypper install build rpmbuild perl-XML-Parser relfutils-libelf-devel binutils-devel newt-devel ncurses-devel      
wget http://repo.meego.com/MeeGo/builds/trunk/latest/repos/oss/source/kernel-adaptation-pinetrail-2.6.39-6.15.src.rpm
rpm2cpio ../*.rpm | cpio -id

https://meego.gitorious.org/meego-os-base/kernel-source/blobs/history/master/config-x86

Message : mount.nfs: ... failed: timed out

mount.nfs: mount to NFS server '%s' failed: timed out, retrying 

How: on client:nrv laptop debian server:RAID

Cause: Check for rules in :

/etc/init.d/lokkit

Workaround:

iptables -L ; iptables -F RH-Lokkit-0-50-INPUT || sudo iptables -F 

More:

settings :

iptables -A INPUT -p tcp --dport 2049 -j ACCEPT
iptables -A INPUT -p tcp --dport 4000 -j ACCEPT
iptables -A INPUT -p tcp --dport 4001 -j ACCEPT
iptables -A INPUT -p tcp --dport 4002 -j ACCEPT
iptables -A INPUT -p tcp --dport 4003 -j ACCEPT
iptables -A INPUT -p tcp --dport 111 -j ACCEPT

FAIL TO MOUNT

showmount -a 192.168.0.179 portmap getport: RPC: Success

mount -t nfs -o rw 192.168.0.179:/mnt/array1 /tmp/mnt/uri/nfs/192.168.0.179/
mount: RPC: Unable to receive; errno = Connection refused

ERRORS

mount: mounting $host:$path on $path failed: Bad file descriptor
mount.nfs: access denied by server while mounting $host:$share

NFS : [[Network]] [[FileSystem]]

sudo apt-get install nfs-common nfs-kernel-server # On [[Debian]] [[Linux]]

I wanted to share home between 2 Computers : localhost and remote (wich is an alias) :

# ${EDITOR} /etc/hosts # @ server
127.0.0.1       localhost
192.168.1.154   local
192.168.1.100   remote
# ${EDITOR} /etc/hosts # @ client
127.0.0.1       localhost
192.168.1.100   local
192.168.1.154   remote

Server Side :

# su
${EDITOR} /etc/exports  # root@server #
/home localhost(rw,insecure,all_squash,sync)
/home remote(rw,insecure,all_squash,sync)
## /home *(ro,insecure) # insecure on a network
# /etc/init.d/nfs-kernel-server restart # statd ?
# rpcinfo -p localhost
# /etc/hosts.allow
# /etc/hosts.deny
sudo invoke-rc.d nfs-kernel-server restart

Client Side :

mount remote:/home /mnt/tmp -t nfs # Hostname = remote
# ${EDITOR} /etc/fstab
remote:/home /mnt/nfs/remote/home  nfs auto,users 0 0
## localhost:/home /mnt/nfs/home nfs users 0 0 # useless
# mkdir -p /mnt/nfs/remote/home

Remove home :

adduser user
# mv /home/user /home/user-local/
# mkdir -p /home/user-remote
# ln -fs /mnt/nfs/remote/home/user  /home/user-remote
# cd /home && ln -fs user-remote user
# ssh user@client echo ${HOME}

Now it is over :) do it again swaping 'client' and 'server' if needed

Error on Client :

# mount /mnt/nfs/nrv/home
mount: RPC: Program not registered # ???
Not starting NFS kernel daemon: No exports. # check your /etc/exports
# rpcinfo -p remote
 program vers proto   port
  100000    2   tcp    111  portmapper
  100000    2   udp    111  portmapper
# rpcinfo -p localhost
 program vers proto   port
  100000    2   tcp    111  portmapper
  100000    2   udp    111  portmapper
  100024    1   udp    715  status
  100024    1   tcp    718  status

UID read only :

adduser --uid 9999 user # @server
adduser --uid 9999 user # @client
/home remote(rw,insecure,all_squash,anonuid=9999,anongid=9999)
## as user
mount /mnt/nfs/home
man exports exportfs
## misc :
ln -s /mnt/nfshome/user /home/user/nfshome
mkdir -p $HOME/mnt/tmp
umount $HOME/mnt/tmp
mount -t nfs $HOSTNAME:/ $HOME/mnt/tmp

http://www.xenos.net/library/nfshome.html

USERLAND NFS

LS-WTGL490:~# unfsd -h
UNFS3 unfsd 0.9.21 (C) 2006, Pascal Schmidt <unfs3-server@ewetel.net>
Usage: unfsd [options]
        -h          display this short option summary
        -u          use unprivileged port for services
        -d          do not detach from terminal
        -e <file>   file to use instead of /etc/exports
        -i <file>   write daemon pid to given file
        -c          enable cluster extensions
        -C <path>   set path for cluster extensions
        -n <port>   port to use for NFS service
        -m <port>   port to use for MOUNT service
        -t          TCP only, do not listen on UDP ports
        -p          do not register with the portmapper
        -s          single user mode
        -b          enable brute force file searching
        -l <addr>   bind to interface with specified address
        -r          report unreadable executables as readable
        -T          test exports file and exit


+ /usr/sbin/invoke-rc.d unfs3 start
Starting unfs3: Cannot register service: RPC: Unable to receive; errno = Connection refused
unable to register (NFS3_PROGRAM, NFS_V3, udp).
invoke-rc.d: initscript unfs3, action "start" failed.

Solution start portmap first

@tag: nfs

NFS SFU

Remember connect drive as host:/share

* http://ubuntuforums.org/showthread.php?t=310168

[[SMB]]

# NFS Bug on mounted NFS or SMB Filesystem ?
#~/tmp/WIN32/#$ mkdir -p dir/dir
#~/tmp/WIN32/#$ ln -s ./dir/dir dot-slash-dir-slash-dir
#~/tmp/WIN32/#$ ln -s ../dir dot-dot-slash-dir
# 2d link appaear as empty file, while 1st one as dir on windows

nfs errors

Root-NFS: Server returned error -13 while mounting …

Perm issue check with

showmount -e localhost

error setting ownership of symlink `./lib/libpthread.so.0': Stale NFS file handle

MISC

MORE

@TaG: Network FileSystem SMB SSH NIS AutoFs MounT

8090_7elostman_stuff_sky_puter_sky_puter6.jpg

<iframe width="420" height="315" src="//www.youtube-nocookie.com/embed/XBb_zHjqghA" frameborder="0" allowfullscreen></iframe>

nfs.txt · Last modified: 2020/09/08 20:46 (external edit)
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki