You are not logged in.

#1 2012-03-10 16:57:09

jk121960
Member
From: Palos Hills, Illinois
Registered: 2011-12-09
Posts: 254

[Solved] NFS write problem

I looked through available threads and couldn't find anything that helped, I use VMware to develop on I need to connect to the vm filesystem with local dev tools. I set up everything according to arch wiki, caveat the server vm is ubuntu. I can mount using either the Ubuntu command

mount -t nfs4 -o proto=tcp,port=2049 192.168.1.96:/ /root/www

or the Arch command

#mount -t nfs4 192.168.1.96:/ /root/www

I can read and traverse directories, I can create a file, but I cannot edit or delete a file that is already there.

Ubuntu fstab

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    nodev,noexec,nosuid 0       0
# / was on /dev/sda1 during installation
UUID=24e3b6ef-d2bc-4ff9-891c-411910f7ce24 /               ext4    errors=remount-ro 0       1
# swap was on /dev/sda5 during installation
UUID=ee28c56a-6aaa-4861-9778-fb3f335dba0c none            swap    sw              0       0
/dev/fd0        /media/floppy0  auto    rw,user,noauto,exec,utf8 0       0
/var/www        /export/www     none    bind,rw  0       0

I have to run the mount once the vm is up so nothing in my fstab.
client /etc/conf.d/nfs-common.conf

# Parameters to be passed to nfs-common (nfs clients & server) init script.
#

# If you do not set values for the NEED_ options, they will be attempted
# autodetected; this should be sufficient for most people. Valid alternatives
# for the NEED_ options are "yes" and "no".

# Do you want to start the statd daemon? It is not needed for NFSv4.
NEED_STATD=""

# Options to pass to rpc.statd.
# See rpc.statd(8) for more details.
# N.B. statd normally runs on both client and server, and run-time
# options should be specified accordingly.
# STATD_OPTS="-p 32765 -o 32766"
STATD_OPTS=""

# Options to pass to sm-notify
# e.g. SMNOTIFY_OPTS="-p 32764"
SMNOTIFY_OPTS=""

# Do you want to start the idmapd daemon? It is only needed for NFSv4.
NEED_IDMAPD=""

# Options to pass to rpc.idmapd.
# See rpc.idmapd(8) for more details.
IDMAPD_OPTS=""

# Do you want to start the gssd daemon? It is required for Kerberos mounts.
NEED_GSSD=""

# Options to pass to rpc.gssd.
# See rpc.gssd(8) for more details.
GSSD_OPTS=""

# Where to mount rpc_pipefs filesystem; the default is "/var/lib/nfs/rpc_pipefs".
PIPEFS_MOUNTPOINT=""

# Options used to mount rpc_pipefs filesystem; the default is "defaults".
PIPEFS_MOUNTOPTS=""

Here is the /etc/exports from Ubuntu

/export       192.168.1.0/24(rw,fsid=0,insecure,no_subtree_check,async)
/export/www 192.168.1.0/24(rw,nohide,insecure,no_subtree_check,async)

Ubuntu nfs-kernel-server

# Number of servers to start up
# To disable nfsv4 on the server, specify '--no-nfs-version 4' here
RPCNFSDCOUNT=8

# Runtime priority of server (see nice(1))
RPCNFSDPRIORITY=0

# Options for rpc.mountd.
# If you have a port-based firewall, you might want to set up
# a fixed port here using the --port option. For more information,
# see rpc.mountd(8) or http://wiki.debian.org/SecuringNFS
RPCMOUNTDOPTS=--manage-gids

# Do you want to start the svcgssd daemon? It is only required for Kerberos
# exports. Valid alternatives are "yes" and "no"; the default is "no".
NEED_SVCGSSD=no # no is default

# Options for rpc.svcgssd.
RPCSVCGSSDOPTS=

# Options for rpc.nfsd.
RPCNFSDOPTS=

Ubuntu /etc/default/nfs-common

                                                                              

# If you do not set values for the NEED_ options, they will be attempted
# autodetected; this should be sufficient for most people. Valid alternatives
# for the NEED_ options are "yes" and "no".

# Do you want to start the statd daemon? It is not needed for NFSv4.
NEED_STATD=

# Options for rpc.statd.
#   Should rpc.statd listen on a specific port? This is especially useful
#   when you have a port-based firewall. To use a fixed port, set this
#   this variable to a statd argument like: "--port 4000 --outgoing-port 4001".
#   For more information, see rpc.statd(8) or http://wiki.debian.org/SecuringNFS
STATDOPTS=

# Do you want to start the idmapd daemon? It is only needed for NFSv4.
NEED_IDMAPD=yes

# Do you want to start the gssd daemon? It is required for Kerberos mounts.
NEED_GSSD=no # no is default

I appreciate any help you can give thanks

--jerry

Last edited by jk121960 (2012-03-22 19:03:07)


Arch Awesome, Ranger & Vim the coding triple threat.

Offline

#2 2012-03-12 16:28:31

jk121960
Member
From: Palos Hills, Illinois
Registered: 2011-12-09
Posts: 254

Re: [Solved] NFS write problem

sorry but bump!!, I really need a hand here if somebody knows something.

thanks in advance for any help you may give.

--jerry


Arch Awesome, Ranger & Vim the coding triple threat.

Offline

#3 2012-03-12 18:44:58

moetunes
Member
From: A comfortable couch
Registered: 2010-10-09
Posts: 1,033

Re: [Solved] NFS write problem

Try your export with just

(rw,async,no_subtree_check)

Works for me. smile


You're just jealous because the voices only talk to me.

Offline

#4 2012-03-14 22:20:59

jk121960
Member
From: Palos Hills, Illinois
Registered: 2011-12-09
Posts: 254

Re: [Solved] NFS write problem

Hi and thanks for the post, is that statement valid on Ubuntu (that's the server I hit)? I get mount errors when I put up with that in fstab.


thanks

--jerry


Arch Awesome, Ranger & Vim the coding triple threat.

Offline

#5 2012-03-14 23:54:35

aking9
Member
Registered: 2009-03-30
Posts: 65

Re: [Solved] NFS write problem

what are the mount errors?

Offline

#6 2012-03-17 23:22:09

jk121960
Member
From: Palos Hills, Illinois
Registered: 2011-12-09
Posts: 254

Re: [Solved] NFS write problem

Sorry for the slow reply I am on a murderous project deadline, I only see when it is booting up. This is after I put in the change given to me from above. Before that no error but and I could mount but it didn't work.

An error occurred while mounting "/export/www" 
Press S to skip mounting or M for manual recovery

If there is somewhere else you would like me to pull info from I ket me know. I appreciate your help with this. Normally I get a lot of hits when I post, wasn't a lot of takers on this one.

thanks again

--jerry

Last edited by jk121960 (2012-03-17 23:37:53)


Arch Awesome, Ranger & Vim the coding triple threat.

Offline

#7 2012-03-22 17:20:44

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: [Solved] NFS write problem

Do the UIDs and GIDs correspond between Ubuntu and Arch? I have had multiple NFS v4 setups mount nobody:nobody on me, that always gave issues, or with just the numerical user and group IDs (e.g. 1000:1000).


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#8 2012-03-22 18:00:11

jk121960
Member
From: Palos Hills, Illinois
Registered: 2011-12-09
Posts: 254

Re: [Solved] NFS write problem

Hi and thanks, 2 things I found, Arch doesn't show a no-group, and the arch idmapd.conf has the "Method = nsswitch" uncommented, the Ubuntu instructions say that this is for LDAP and I am not using LDAP. The nobody accounts on both machines carry he id over between files but each machines id is unique to that machine. Arch is like 99 and Ubuntu is like 65536 if this helps.

I dont know where to loo for more of the IDS, but please let me knwo and I will get you more of the information

thanks again

--jerry


Arch Awesome, Ranger & Vim the coding triple threat.

Offline

#9 2012-03-22 18:05:55

perbh
Member
From: Republic of Texas
Registered: 2005-03-04
Posts: 765

Re: [Solved] NFS write problem

Basically, I have had very few problems with NFS - however, the ubuntu-version of linuxmint had problems with uid/gids - they ended up as the complement of '-2'!
I never use an exports file, but set up the server in rc.local, basically like so:

exportfs -iv -o rw,insecure,no_root_squash /pub/usb 192.168.1.0/24:/pub

Then, on the client side in /etc/fstab I have:

{servername}:/pub  /pub  nfs  defaults,noatime,noauto  0 0

With linuxmint (at least the gnome-version), I had to use 'sshfs' instead. linuxmint lmde is ok.
Also - I have used NFS for more years than I care to remember, but ... I must admit that sshfs has its merits - especially if you remember to use '-o allow_other'.
ie on the client side you can use:

sshfs -o allow_other {servername}:/pub/usb /pub

Hope this helps.

Last edited by perbh (2012-03-22 18:12:05)

Offline

#10 2012-03-22 18:18:32

jk121960
Member
From: Palos Hills, Illinois
Registered: 2011-12-09
Posts: 254

Re: [Solved] NFS write problem

OK but where does this last statement go? Also I have to mount post boot what would the mount statement look like for the client, I can't put the mount in fstab.

thanks

--jerry

Last edited by jk121960 (2012-03-22 18:20:10)


Arch Awesome, Ranger & Vim the coding triple threat.

Offline

#11 2012-03-22 18:29:59

perbh
Member
From: Republic of Texas
Registered: 2005-03-04
Posts: 765

Re: [Solved] NFS write problem

/etc/rc.local is a good place to do (almost) post-boot stuff - it is  very last script to be executed before you get the login-prompt.
However, then you must have set up your ssh-connection so its not asking for password (ssh-keygen etc.)

If you are still talking NFS - you could put the following in /etc/rc.local (we're still talking the client-side)

mount /pub

Offline

#12 2012-03-22 18:32:23

jk121960
Member
From: Palos Hills, Illinois
Registered: 2011-12-09
Posts: 254

Re: [Solved] NFS write problem

The server is a VM on the client machine. So I have to mount post boot. I can't put anything in a boot up to mount because the VM is not up yet.

--jerry


OK thanks got it, I installed sshfs from Arch and there was a user interface for it in AUR made it totally simple, llike point and click. thanks very much!!

--jerry

Last edited by jk121960 (2012-03-22 19:02:41)


Arch Awesome, Ranger & Vim the coding triple threat.

Offline

Board footer

Powered by FluxBB