public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] nfsmount hangs or reading any file IO error on client,custom kernel on server
@ 2013-11-18  5:17 钱泽森
  2013-11-18  7:35 ` edwardunix
  0 siblings, 1 reply; 6+ messages in thread
From: 钱泽森 @ 2013-11-18  5:17 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 3243 bytes --]

Hi all.this is my first message in mail list, so correct me if I 'm wrong.
I have a raspberry pi with kernel compiled from
(sys-kernel/raspberrypi-source 3.6.11_r20130711,running nfsv4 server.To
simplify problem, only a simple directory exported.

Senge-Raspi ~ # cat /etc/exports
# /etc/exports: NFS file systems being exported.  See exports(5).
/export *(fsid=0,rw,no_subtree_check,no_root_squash)
Senge-Raspi ~ # ls -l /export/
total 4
-rw-r--r-- 1 root root 4 Nov 18 12:48 test
Senge-Raspi ~ # cat /export/test
foo

And on my laptop, as nfs client.

senge@Senge-Laptop ~ $ cat /etc/fstab
# <fs>                  <mountpoint>    <type>          <opts>
<dump/pass>

# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.
/dev/sda1               /boot           ext4
noauto,noatime          1 2
/dev/sda3               /               ext4
noatime                 0 1
/dev/sda2               none            swap
sw                      0 0
/dev/sda4               /mnt/windows    ntfs
noauto                  0 0
59.78.22.20:/           /raspi          nfs4
rw,_netdev,auto,rsize=32768,wsize=32768         0 0
senge@Senge-Laptop ~ $ sudo rc-config restart nfsmount
Restarting init script
 * Starting rpcbind
...
[ ok ]
 * Starting NFS statd
...
[ ok ]
 * Setting up RPC pipefs
...
[ ok ]
 * Starting idmapd
...
[ ok ]
 * Starting NFS sm-notify
...
[ ok ]
 * Mounting NFS filesystems ...

It hangs here. and in kernel message
[19888.585247] RPC: Registered named UNIX socket transport module.
[19888.585251] RPC: Registered udp transport module.
[19888.585252] RPC: Registered tcp transport module.
[19888.585253] RPC: Registered tcp NFSv4.1 backchannel transport module.
[19889.214956] NFS: Registering the id_resolver key type
[19889.214973] Key type id_resolver registered
[19889.214974] Key type id_legacy registered
[20054.134247] NFS: nfs4_discover_server_trunking unhandled error -512.
Exiting with error EIO

sometimes mount succeed, and directory can be accessed. but reading files
return error:(without 'dmesg' changed)
senge@Senge-Laptop ~ $ sudo rc-config restart nfsmount
Restarting init script
 * Starting NFS sm-notify
...
[ ok ]
 * Mounting NFS filesystems
...
[ ok ]
senge@Senge-Laptop ~ $ cat /raspi/test
cat: /raspi/test: Input/Output error

But I actually have nfs support on server:
Senge-Raspi ~ # zcat /proc/config.gz | grep -i nfs
# CONFIG_NFS_FS is not set
CONFIG_NFSD=y
CONFIG_NFSD_V2_ACL=y
CONFIG_NFSD_V3=y
CONFIG_NFSD_V3_ACL=y
CONFIG_NFSD_V4=y
# CONFIG_NFSD_FAULT_INJECTION is not set
CONFIG_NFS_ACL_SUPPORT=y
CONFIG_NFS_COMMON=y

However, official pre-compiled kernel(sys-kernel/raspberrypi-image
3.6.11-p20130730) worked fine,
Senge-Raspi ~ # zcat /proc/config.gz | grep -i nfs
CONFIG_NFS_FS=y
CONFIG_NFS_V2=y
CONFIG_NFS_V3=y
CONFIG_NFS_V3_ACL=y
CONFIG_NFS_V4=y
# CONFIG_NFS_SWAP is not set
# CONFIG_NFS_V4_1 is not set
CONFIG_ROOT_NFS=y
CONFIG_NFS_FSCACHE=y
# CONFIG_NFS_USE_LEGACY_DNS is not set
CONFIG_NFS_USE_KERNEL_DNS=y
CONFIG_NFSD=m
CONFIG_NFSD_V2_ACL=y
CONFIG_NFSD_V3=y
CONFIG_NFSD_V3_ACL=y
CONFIG_NFSD_V4=y
# CONFIG_NFSD_FAULT_INJECTION is not set
CONFIG_NFS_ACL_SUPPORT=y
CONFIG_NFS_COMMON=y


I have googled a lot, return few result...any idea appreciated.(sorry for
poor English)

[-- Attachment #2: Type: text/html, Size: 4537 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [gentoo-user] nfsmount hangs or reading any file IO error on client,custom kernel on server
  2013-11-18  5:17 [gentoo-user] nfsmount hangs or reading any file IO error on client,custom kernel on server 钱泽森
@ 2013-11-18  7:35 ` edwardunix
  2013-11-18  8:08   ` 钱泽森
  0 siblings, 1 reply; 6+ messages in thread
From: edwardunix @ 2013-11-18  7:35 UTC (permalink / raw
  To: gentoo-user

On 11/17/2013 9:17 PM, 钱泽森 wrote:
> [ ok ]
> senge@Senge-Laptop ~ $ cat /raspi/test
> cat: /raspi/test: Input/Output error
>
> But I actually have nfs support on server:
> Senge-Raspi ~ # zcat /proc/config.gz | grep -i nfs
> # CONFIG_NFS_FS is not set

CONFIG_NFS_FS is set to y in the kernel shown below.
Probably this setting no being set is what is causing the problem.

> CONFIG_NFSD=y
> CONFIG_NFSD_V2_ACL=y
> CONFIG_NFSD_V3=y
> CONFIG_NFSD_V3_ACL=y
> CONFIG_NFSD_V4=y
> # CONFIG_NFSD_FAULT_INJECTION is not set
> CONFIG_NFS_ACL_SUPPORT=y
> CONFIG_NFS_COMMON=y
>
> However, official pre-compiled kernel(sys-kernel/raspberrypi-image 
> 3.6.11-p20130730) worked fine,
> Senge-Raspi ~ # zcat /proc/config.gz | grep -i nfs
> CONFIG_NFS_FS=y
> CONFIG_NFS_V2=y
> CONFIG_NFS_V3=y
> CONFIG_NFS_V3_ACL=y
> CONFIG_NFS_V4=y
> # CONFIG_NFS_SWAP is not set
> # CONFIG_NFS_V4_1 is not set
> CONFIG_ROOT_NFS=y
> CONFIG_NFS_FSCACHE=y
> # CONFIG_NFS_USE_LEGACY_DNS is not set
> CONFIG_NFS_USE_KERNEL_DNS=y
> CONFIG_NFSD=m
> CONFIG_NFSD_V2_ACL=y
> CONFIG_NFSD_V3=y
> CONFIG_NFSD_V3_ACL=y
> CONFIG_NFSD_V4=y
> # CONFIG_NFSD_FAULT_INJECTION is not set
> CONFIG_NFS_ACL_SUPPORT=y
> CONFIG_NFS_COMMON=y
>
>
> I have googled a lot, return few result...any idea appreciated.(sorry 
> for poor English)



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [gentoo-user] nfsmount hangs or reading any file IO error on client,custom kernel on server
  2013-11-18  7:35 ` edwardunix
@ 2013-11-18  8:08   ` 钱泽森
  2013-11-19  2:27     ` edwardunix
  0 siblings, 1 reply; 6+ messages in thread
From: 钱泽森 @ 2013-11-18  8:08 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 3406 bytes --]

Thanks for reply! However, CONFIG_NFS_FS is a client config, and probably
not related to my server problem.

Symbol: NFS_FS
[=n]

  Type  :
tristate

  Prompt: NFS client
support

     Defined at
fs/nfs/Kconfig:1

     Depends on: NETWORK_FILESYSTEMS [=y] && INET [=y] && FILE_LOCKING
[=y]

Location:

       -> File
systems

         -> Network File Systems (NETWORK_FILESYSTEMS
[=y])

     Selects: LOCKD [=y] && SUNRPC [=y] && NFS_ACL_SUPPORT
[=y]


by the way, here is my laptop config:
senge@Senge-Laptop ~ $ zcat /proc/config.gz | grep -i nfs
CONFIG_NFS_FS=m
# CONFIG_NFS_V2 is not set
# CONFIG_NFS_V3 is not set
CONFIG_NFS_V4=m
# CONFIG_NFS_SWAP is not set
# CONFIG_NFS_V4_1 is not set
# CONFIG_NFS_USE_LEGACY_DNS is not set
CONFIG_NFS_USE_KERNEL_DNS=y
# CONFIG_NFSD is not set
CONFIG_NFS_COMMON=y

more info:
Senge-Laptop ~ # rpcinfo -p 59.78.22.20
   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
    100024    1   udp  59999  status
    100024    1   tcp  34251  status
    100003    2   tcp   2049  nfs
    100003    3   tcp   2049  nfs
    100003    4   tcp   2049  nfs
    100227    2   tcp   2049  nfs_acl
    100227    3   tcp   2049  nfs_acl
    100003    2   udp   2049  nfs
    100003    3   udp   2049  nfs
    100003    4   udp   2049  nfs
    100227    2   udp   2049  nfs_acl
    100227    3   udp   2049  nfs_acl
    100021    1   udp  37157  nlockmgr
    100021    3   udp  37157  nlockmgr
    100021    4   udp  37157  nlockmgr
    100021    1   tcp  45755  nlockmgr
    100021    3   tcp  45755  nlockmgr
    100021    4   tcp  45755  nlockmgr

it seem that nfs service is on, and client can connect the service.
2013/11/18 edwardunix@live.com <edwardunix@live.com>

> On 11/17/2013 9:17 PM, 钱泽森 wrote:
>
>> [ ok ]
>> senge@Senge-Laptop ~ $ cat /raspi/test
>> cat: /raspi/test: Input/Output error
>>
>> But I actually have nfs support on server:
>> Senge-Raspi ~ # zcat /proc/config.gz | grep -i nfs
>> # CONFIG_NFS_FS is not set
>>
>
> CONFIG_NFS_FS is set to y in the kernel shown below.
> Probably this setting no being set is what is causing the problem.
>
>
>  CONFIG_NFSD=y
>> CONFIG_NFSD_V2_ACL=y
>> CONFIG_NFSD_V3=y
>> CONFIG_NFSD_V3_ACL=y
>> CONFIG_NFSD_V4=y
>> # CONFIG_NFSD_FAULT_INJECTION is not set
>> CONFIG_NFS_ACL_SUPPORT=y
>> CONFIG_NFS_COMMON=y
>>
>> However, official pre-compiled kernel(sys-kernel/raspberrypi-image
>> 3.6.11-p20130730) worked fine,
>> Senge-Raspi ~ # zcat /proc/config.gz | grep -i nfs
>> CONFIG_NFS_FS=y
>> CONFIG_NFS_V2=y
>> CONFIG_NFS_V3=y
>> CONFIG_NFS_V3_ACL=y
>> CONFIG_NFS_V4=y
>> # CONFIG_NFS_SWAP is not set
>> # CONFIG_NFS_V4_1 is not set
>> CONFIG_ROOT_NFS=y
>> CONFIG_NFS_FSCACHE=y
>> # CONFIG_NFS_USE_LEGACY_DNS is not set
>> CONFIG_NFS_USE_KERNEL_DNS=y
>> CONFIG_NFSD=m
>> CONFIG_NFSD_V2_ACL=y
>> CONFIG_NFSD_V3=y
>> CONFIG_NFSD_V3_ACL=y
>> CONFIG_NFSD_V4=y
>> # CONFIG_NFSD_FAULT_INJECTION is not set
>> CONFIG_NFS_ACL_SUPPORT=y
>> CONFIG_NFS_COMMON=y
>>
>>
>> I have googled a lot, return few result...any idea appreciated.(sorry for
>> poor English)
>>
>
>
>

[-- Attachment #2: Type: text/html, Size: 11223 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [gentoo-user] nfsmount hangs or reading any file IO error on client,custom kernel on server
  2013-11-18  8:08   ` 钱泽森
@ 2013-11-19  2:27     ` edwardunix
  2013-11-19 14:57       ` 钱泽森
  0 siblings, 1 reply; 6+ messages in thread
From: edwardunix @ 2013-11-19  2:27 UTC (permalink / raw
  To: gentoo-user

On 11/18/2013 12:08 AM, 钱泽森 wrote:
> Thanks for reply! However, CONFIG_NFS_FS is a client config, and
> probably not related to my server problem.


Thanks for being kind and explaining it to me. :-)
I though that was needed. I went back and read the gentoo nfs wiki and
saw that under notes, sorry for the noise.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [gentoo-user] nfsmount hangs or reading any file IO error on client,custom kernel on server
  2013-11-19  2:27     ` edwardunix
@ 2013-11-19 14:57       ` 钱泽森
  2013-11-20  5:19         ` edwardunix
  0 siblings, 1 reply; 6+ messages in thread
From: 钱泽森 @ 2013-11-19 14:57 UTC (permalink / raw
  To: gentoo-user

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=GB2312, Size: 1660 bytes --]

After much tries. problem sovled.:-) It's a authentication problem.
according to nfs mannual page:
 In addition to combining these sideband protocols with the main NFS
protocol, NFS version 4  introduces  more  advanced
       forms  of  access  control,  authentication,  and in-transit data
protection.  The NFS version 4 specification mandates
       NFSv4 ACLs, RPCGSS authentication, and RPCGSS security flavors that
provide per-RPC integrity checking and  encryption.
       Because NFS version 4 combines the function of the sideband
protocols into the main NFS protocol, the new security fea©\
       tures apply to all NFS version 4 operations including mounting, file
locking, and so  on.   RPCGSS  authentication  can
       also be used with NFS versions 2 and 3, but does not protect their
sideband protocols.

and this patch:
https://www.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.4-rc2/2.6.4-rc2-mm1/broken-out/nfs-simplify-config-options.patch

nfsv4 need DES and MD5.but in official kernel, the dependency missed, nor
writes"you should say yes to support nfsv4", so I turn it down.(bad habbit).

The patch is for 2.6.4, and I wonder why the dependency mistake still
existed. Anyway, probleam solved.



2013/11/19 edwardunix@live.com <edwardunix@live.com>

> On 11/18/2013 12:08 AM, Ç®ÔóÉ­ wrote:
> > Thanks for reply! However, CONFIG_NFS_FS is a client config, and
> > probably not related to my server problem.
>
>
> Thanks for being kind and explaining it to me. :-)
> I though that was needed. I went back and read the gentoo nfs wiki and
> saw that under notes, sorry for the noise.
>
>

[-- Attachment #2: Type: text/html, Size: 2530 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [gentoo-user] nfsmount hangs or reading any file IO error on client,custom kernel on server
  2013-11-19 14:57       ` 钱泽森
@ 2013-11-20  5:19         ` edwardunix
  0 siblings, 0 replies; 6+ messages in thread
From: edwardunix @ 2013-11-20  5:19 UTC (permalink / raw
  To: gentoo-user

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="GB2312", Size: 1442 bytes --]

On 11/19/2013 6:57 AM, Ç®ÔóÉ­ wrote:
> After much tries. problem sovled.:-) It's a authentication problem.
> according to nfs mannual page:
> In addition to combining these sideband protocols with the main NFS
> protocol, NFS version 4 introduces more advanced
> forms of access control, authentication, and in-transit data
> protection. The NFS version 4 specification mandates
> NFSv4 ACLs, RPCGSS authentication, and RPCGSS security flavors that
> provide per-RPC integrity checking and encryption.
> Because NFS version 4 combines the function of the sideband protocols
> into the main NFS protocol, the new security fea©\
> tures apply to all NFS version 4 operations including mounting, file
> locking, and so on. RPCGSS authentication can
> also be used with NFS versions 2 and 3, but does not protect their
> sideband protocols.
>
> and this
> patch:https://www.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.4-rc2/2.6.4-rc2-mm1/broken-out/nfs-simplify-config-options.patch
>
> nfsv4 need DES and MD5.but in official kernel, the dependency missed,
> nor writes"you should say yes to support nfsv4", so I turn it
> down.(bad habbit).
>
> The patch is for 2.6.4, and I wonder why the dependency mistake still
> existed. Anyway, probleam solved.

I'm glad you got it working and thanks for sharing how you solved the issue.
I'll keep this in hand when i get a chance to setup my own nfs server.:-)


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-11-20  5:19 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-18  5:17 [gentoo-user] nfsmount hangs or reading any file IO error on client,custom kernel on server 钱泽森
2013-11-18  7:35 ` edwardunix
2013-11-18  8:08   ` 钱泽森
2013-11-19  2:27     ` edwardunix
2013-11-19 14:57       ` 钱泽森
2013-11-20  5:19         ` edwardunix

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox