2013-03-21

Sledgehammer Kludge: Make nfs-common install.

Disclaimer: I'm clueless. I'm also tired. Having gotten to the point of downloading the nfs-utils-1.2.6 tarball and making it (and installing it. and having it not work), I'm no longer concerned about The Right Thing(™) so much as "Just Fucking Work Already".

Background: try googling up nfs-common FAIL. It's a good fun time, with bug reports years and years old, most mentioning portmap or rpcbind.  With no solutions, even in the SOLVED threads.  I'm certain there's some nasty interaction between the squeeze repos and backports, but I don't care. Also, this:
apt-get -t squeeze-backports install nfs-common
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 nfs-common : Depends: libevent-1.4-2 (>= 1.4.13-stable) but it is not installable
E: Unable to correct problems, you have held broken packages.

Um. No. I'm not holding shit back:
dpkg --get-selections | grep hold

Of course:

apt-get install libevent-2.0-5
Reading package lists... Done
Building dependency tree       
Reading state information... Done
libevent-2.0-5 is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 684 not upgraded.

2.0-5 is greater than 1.4.13, right? Right???

Anyway... for other people really sick of this or similar bullshit:

apt-get install nfs-common
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Suggested packages:
  open-iscsi watchdog
The following NEW packages will be installed:
  nfs-common
0 upgraded, 1 newly installed, 0 to remove and 684 not upgraded.
Need to get 0 B/292 kB of archives.
After this operation, 716 kB of additional disk space will be used.
Selecting previously unselected package nfs-common.
(Reading database ... 188676 files and directories currently installed.)
Unpacking nfs-common (from .../nfs-common_1%3a1.2.6-3_amd64.deb) ...
Processing triggers for man-db ...
Setting up nfs-common (1:1.2.6-3) ...

Creating config file /etc/idmapd.conf with new version

Creating config file /etc/default/nfs-common with new version
insserv: script vboxdrv: service vboxdrv already provided!
[FAIL] Starting NFS common utilities: statd idmapd failed!
invoke-rc.d: initscript nfs-common, action "start" failed.
dpkg: error processing nfs-common (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 nfs-common
E: Sub-process /usr/bin/dpkg returned an error code (1)

Try this horribly ugly blindly sledgehammering of stuff I don't understand:
vi /etc/default/nfs-common
NEED_STATD=yes
NEED_IDMAPD=no
NEED_GSSD=no

apt-get -f install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 684 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up nfs-common (1:1.2.6-3) ...
insserv: script vboxdrv: service vboxdrv already provided!
[ ok ] Starting NFS common utilities: statd.

Since for whatever reason idmapd is shitting itself, this works... assuming you're okay with nfsv3.  I am. 

(Note: I tried all the fun suggestions in the various threads with the error; none mentioned screwing with that file, so, if this breaks something horribly, do note it in the comments. My nfs shares don't mind being dirty, so I'm unlikely to care much at this point; especially since I should just do a clean install to Wheezy.  Still, this was frustrating enough to search on and not find any workable solution that... well, here we are.)

Unhelpful References:


2013-03-12

Notes To Self: NFS / ReadyNAS 600 / Windows 7

Microsoft's done the usual outstanding job of quality work with their NFS client.

ReadyNAS end settings:
Frontview: Share Listings->Share Name NFS

Default Access: Read-Only
Write Enabled Hosts: Self explanatory.

Root privilege-enabled hosts: Blank (unneeded)

Advanced Options: nobody/nogroup
Set ownership and permissions ... -> Apply

Squashing isn't needed on the ReadyNAS...
Via ssh to check /etc/exports:

NAS:/etc# cat exports

"/pub" *(insecure,insecure_locks,ro,async)
x.x.x.1(insecure,insecure_locks,rw,async)
x.x.x.250(insecure,insecure_locks,rw,async)

ReadyNAS's default nobody/nogroup = 65534.

Windows end settings:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ClientForNFS\CurrentVersion\Default\AnonymousGid = FFFE
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ClientForNFS\CurrentVersion\Default\AnonymousUID = FFFE

To check next time I screw with the Windows side: right click, properties, "NFS Attributes"-> see if setting attributes here actually work and take.

To figure out:
Network Error - 85 "The Local device name is already in use." (doesn't go away restarting NFS client (easy: nfsmgmt.msc) or workstation/server. (With mountpoints2 key removed in registry).  Where is Windows keeping the drive name until reboot, and is there a way of making it forget, so as to remount?

Further notes: Windows 7 needs -o nolock with FreeNAS, else copying gives error 0x80070021.

References:
NFS Overview and Gotchas
Configure Windows NFS Client With Write Permissions
Steps To Disable Client For NFS Cache
Client For NFS - Configuration And Performance
Windows Mount Command syntax
NFS Share Setup For Windows 7 and Freenas