View previous topic :: View next topic |
Author |
Message |
Zhang Zheng n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/98464605660fed2b412145.jpg)
Joined: 26 Jul 2021 Posts: 11 Location: Xi'an, China
|
Posted: Sun Jul 24, 2022 9:30 am Post subject: (solved) how to enable NFS v2 support of server side ? |
|
|
Hello,
I'm following this link to run open genera, which requires NFS v2.
I enabled NFS client support for NFS version 2,
in File Systems -> Network File Systems
But "NFS server support for NFS version 2" seems not here,
so I only enabled the client support.
Below is my /etc/conf.d/nfs
Code: | NFS_NEEDED_SERVICES="rpc.idmapd"
OPTS_RPC_NFSD="8 -V 2 --udp"
OPTS_RPC_MOUNTD="-V2 --manage-gids"
EXPORTFS_TIMEOUT=30
# others are empty strings |
Kernel is gentoo-sources:5.18.14 and openrc.
USE flags enabled of net-fs/nfs-utils is:
Code: | +libmount +nfsidmap +nfsv4 +uuid |
The result of "sudo /etc/init.d/nfs start" is
Code: | nfs | * Exporting NFS directories [ ok ]
nfs | * Starting NFS mountd ... [ ok ]
nfs | * Starting NFS daemon ...
nfs |2: Unsupported version [ !! ]
nfs | * Starting NFS smnotify ... [ ok ]
nfs | * ERROR: nfs failed to start
|
I'd like to know if the "NFS v2 support of server side"
is not supported in newest kernel,
or it is my kernel/USE/etc. configuration that goes wrong.
It will be much appreciated if anyone could help ![Smile :)](images/smiles/icon_smile.gif)
Last edited by Zhang Zheng on Sun Jul 24, 2022 1:40 pm; edited 1 time in total |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
mike155 Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
Joined: 17 Sep 2010 Posts: 4438 Location: Frankfurt, Germany
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Zhang Zheng n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/98464605660fed2b412145.jpg)
Joined: 26 Jul 2021 Posts: 11 Location: Xi'an, China
|
Posted: Sun Jul 24, 2022 10:37 am Post subject: |
|
|
Dear mike155,
the result of "rpcinfo -p" is
Code: | 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 40378 status
100024 1 tcp 58469 status
100005 1 udp 47653 mountd
100005 1 tcp 37757 mountd
100005 2 udp 38970 mountd
100005 2 tcp 55073 mountd
100005 3 udp 41410 mountd
100005 3 tcp 45251 mountd
|
nfs is not here is probably because that the nfs failed to start:
Code: | nfs | * Exporting NFS directories ... [ ok ]
nfs | * Starting NFS mountd ... [ ok ]
nfs | * Starting NFS daemon ...
nfs |2: Unsupported version [ !! ]
nfs | * Starting NFS smnotify ... [ ok ]
nfs | * ERROR: nfs failed to start
|
Last edited by Zhang Zheng on Sun Jul 24, 2022 12:49 pm; edited 1 time in total |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
mike155 Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
Joined: 17 Sep 2010 Posts: 4438 Location: Frankfurt, Germany
|
Posted: Sun Jul 24, 2022 11:18 am Post subject: |
|
|
Please remove '-V 2' from OPTS_RPC_NFSD. rpc.nfsd does not support '-V 2'. See 'man nfsd'.
After that, the error message '2: Unsupported version' should have gone away and
Code: | rpcinfo -p <server> |
should show the lines below (in addition to the lines you already posted):
Code: | 100003 3 tcp 0.0.0.0.8.1 nfs superuser
100003 4 tcp 0.0.0.0.8.1 nfs superuser |
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Zhang Zheng n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/98464605660fed2b412145.jpg)
Joined: 26 Jul 2021 Posts: 11 Location: Xi'an, China
|
Posted: Sun Jul 24, 2022 11:46 am Post subject: |
|
|
Dear mike,
removing '-V 2' from OPTS_RPC_NFSD does solved the '2: Unsupported version',
and the nfs does start successfully.
And result of "rpcinfo -p localhost" does have the following two lines:
Code: | 100003 3 tcp 2049 nfs
100003 3 udp 2049 nfs
|
But what confuses me is still the version 3, while what I need is version 2 ![Sad :(](images/smiles/icon_sad.gif)
Last edited by Zhang Zheng on Sun Jul 24, 2022 12:49 pm; edited 1 time in total |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
mike155 Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
Joined: 17 Sep 2010 Posts: 4438 Location: Frankfurt, Germany
|
Posted: Sun Jul 24, 2022 11:53 am Post subject: |
|
|
Try to mount one of the exported volumes on your server.
The command below lists the exported volumes:
Code: | showmount -e <server> |
Mount one of those volumes:
Code: | mount -t nfs -o nfsvers=2 <server>:<volume> /mnt |
Does that work? If not: which error message do you get?
Please try nfsvers=3 and nfsvers=4 as well.
Don't forget to unmount the volume after the test:
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Zhang Zheng n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/98464605660fed2b412145.jpg)
Joined: 26 Jul 2021 Posts: 11 Location: Xi'an, China
|
Posted: Sun Jul 24, 2022 12:17 pm Post subject: |
|
|
Dear mike,
"showmount -e localhost" gives
Code: | Export list for genteel:
/ genera |
and "mount -t nfs -o nfsvers=2 localhost:/ /mnt" gives
Code: | mount.nfs: requested NFS version or transport protocol is not supported |
"mount -t nfs -o nfsvers=3 localhost:/ /mnt" is
Code: | mount.nfs: access denied by server while mounting localhost:/
# nfsvers=4 is the same
|
Mounting / seems ridiculous but that is specified here
I tried changing / to something like /share (in /etc/exports as well) and start over, but result is same.
Thanks for your reply
Last edited by Zhang Zheng on Sun Jul 24, 2022 12:59 pm; edited 1 time in total |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
mike155 Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
Joined: 17 Sep 2010 Posts: 4438 Location: Frankfurt, Germany
|
Posted: Sun Jul 24, 2022 12:49 pm Post subject: |
|
|
It looks like NFSv2 support was removed from nfs-utils in January 2022: commit message.
You could try to install an older version of nfs-utils: nfs-utils-2.5.4, for example. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
NeddySeagoon Administrator
![Administrator Administrator](/images/ranks/rank-admin.gif)
![](images/avatars/3946266373f47d606a2db3.jpg)
Joined: 05 Jul 2003 Posts: 54834 Location: 56N 3W
|
Posted: Sun Jul 24, 2022 12:49 pm Post subject: |
|
|
Zhang Zheng,
Are you running the new kernel with NFS2 support?
What is the date/time in
That's the build date/time of the running kernel. Is it before or after your kernel update?
Its very easy to forget to mount /boot, then the kernel is correctly installed to the wrong place. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Zhang Zheng n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/98464605660fed2b412145.jpg)
Joined: 26 Jul 2021 Posts: 11 Location: Xi'an, China
|
Posted: Sun Jul 24, 2022 12:51 pm Post subject: |
|
|
mike155 wrote: | It looks like NFSv2 support was removed from nfs-utils in January 2022: commit message.
You could try to install an older version of nfs-utils: nfs-utils-2.5.4, for example. |
Dear mike,
thanks a lot for your reply, and the nfs v2 removal commit.
Best regards ![Smile :)](images/smiles/icon_smile.gif) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Zhang Zheng n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/98464605660fed2b412145.jpg)
Joined: 26 Jul 2021 Posts: 11 Location: Xi'an, China
|
Posted: Sun Jul 24, 2022 12:57 pm Post subject: |
|
|
NeddySeagoon wrote: | Zhang Zheng,
Are you running the new kernel with NFS2 support?
What is the date/time in
That's the build date/time of the running kernel. Is it before or after your kernel update?
Its very easy to forget to mount /boot, then the kernel is correctly installed to the wrong place. |
Dear NeddySeagoon,
I'm runnning the newest kernel 5.18.14 built yesterday, and I always make sure
/boot is not malfunctioning after each kernel update.
According to the link mike posted, NFS v2 support was removed last November,
so I better revert to something older than that ![Smile :)](images/smiles/icon_smile.gif) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Zhang Zheng n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/98464605660fed2b412145.jpg)
Joined: 26 Jul 2021 Posts: 11 Location: Xi'an, China
|
Posted: Sun Jul 24, 2022 1:34 pm Post subject: |
|
|
Dear everyone who may concerns,
It turns out that the newest nfs-utils:2.6.1 is the error reason.
Thanks to mike, I decided to try out nfs-utils:2.5.4
Luckily there are not so much changes and patches, so simply
> cp P-2.6.1.ebuild P-2.5.4.ebuild, then regenerate manifest,
will emerge nfs-utils:2.5.4 successfully, re-slotting is also needed.
After that change /etc/conf.d/nfs Code: | OPTS_RPC_NFSD="8 -V 2 --udp" |
"rpcinfo -p" gives
Code: | 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
100227 2 udp 2049 nfs_acl
100227 3 udp 2049 nfs_acl
|
All in all to start an NFS v2 server is working now,,
thanks everyone ![Smile :)](images/smiles/icon_smile.gif) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|