View previous topic :: View next topic |
Author |
Message |
lekto Apprentice
Joined: 20 Sep 2014 Posts: 170 Location: Ancient Rome
|
Posted: Mon Jun 06, 2022 2:20 pm Post subject: Distfiles over NFS: OSError: [Errno 5] Input/output error |
|
|
Hi, I’m trying to share distfiles over NFS. Server is on OpenBSD 7.1, configuration:
/etc/fstab:
Code: | ce1040dca93ae296.d /exports/distfiles ffs rw,nodev,nosuid,softdep 0 2 |
mount:
Code: | /dev/sd1d on /exports/distfiles type ffs (NFS exported, local, nodev, nosuid, softdep) |
/etc/exports:
Code: | /exports/distfiles -network=192.168.2.0 -mask=255.255.255.0 -mapall=root |
ls -l /exports:
Code: | drwxrwxr-x 2 250 250 18432 Jun 6 15:34 distfiles |
ls -l /exports/distfiles/
Code: | total 2468664
-rw-rw-r-- 1 250 250 9704 Jan 21 2021 0d96df4d4110e5c43fbfb17f2d347ea6aa65421d.asc
-rw-rw-r-- 1 250 250 890559 Nov 23 2021 CPAN-2.29.tar.gz
-rw-rw-r-- 1 250 250 2056308 Aug 9 2021 Encode-3.12.tar.gz
-rw-rw-r-- 1 250 250 76988 Oct 3 2020 File-Temp-0.2311.tar.gz
-rw-rw-r-- 1 250 250 8150 Mar 1 2008 HTML-Tagset-3.20.tar.gz
-rw-rw-r-- 1 250 250 29673 Nov 19 2019 HTTP-Date-6.05.tar.gz
-rw-rw-r-- 1 250 250 1241269 Jun 14 2021 M2Crypto-0.38.0.tar.gz
-rw-rw-r-- 1 250 250 18668 Mar 15 14:23 MarkupSafe-2.1.1.tar.gz
-rw-rw-r-- 1 250 250 3225 Nov 2 2016 Mozilla-CA-20999999.tar.gz
(…) |
Linux client (ppc):
/etc/fstab:
Code: | gateway:/exports/distfiles /usr/portage/distfiles nfs vers=3,_netdev 0 0 |
mount:
Code: | gateway:/exports/distfiles on /usr/portage/distfiles type nfs (rw,relatime,vers=3,rsize=65536,wsize=65536,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=192.168.2.1,mountvers=3,mountport=810,mountproto=udp,local_lock=none,addr=192.168.2.1,_netdev) |
ls -l /usr/portage:
Code: | drwxrwxr-x 2 portage portage 18432 Jun 6 15:34 distfiles |
ls -l /usr/portage/distfiles:
Code: | -rw-rw-r-- 1 portage portage 9704 Jan 21 2021 0d96df4d4110e5c43fbfb17f2d347ea6aa65421d.asc
-rw-rw-r-- 1 portage portage 6884 Jan 21 2021 a035c8c19219ba821ecea86b64e628f8d684696d.asc
-rw-rw-r-- 1 portage portage 355676 Mar 16 2021 acl-2.3.1.tar.xz
-rw-rw-r-- 1 portage portage 18540012 Mar 18 2019 adwaita-icon-theme-3.32.0.tar.xz
-rw-rw-r-- 1 portage portage 9840 May 13 2020 appdirs-1.4.4.tar.gz
-rw-rw-r-- 1 portage portage 303952 Mar 24 13:28 atk-2.38.0.tar.xz
-rw-rw-r-- 1 portage portage 689944 May 21 2021 atkmm-2.28.2.tar.xz
-rw-rw-r-- 1 portage portage 97464 Sep 12 2020 at-spi2-atk-2.38.0.tar.xz
-rw-rw-r-- 1 portage portage 209780 Apr 21 23:13 at-spi2-core-2.44.1.tar.xz
(…) |
I have read-write access to NFS share using root and portage (su portage -s /bin/bash), but when portage is trying to fetch anything I get this error:
Code: | ibook ~ # ebuild /usr/portage/sys-apps/systemd/systemd-250.4-r2.ebuild fetch
portage.util.futures.executor.fork._RemoteTraceback:
"""
Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/portage/util/futures/executor/fork.py", line 74, in _guarded_fn_call
result = fn(*args, **kwargs)
File "/usr/lib/python3.9/site-packages/portage/package/ebuild/doebuild.py", line 1316, in _fetch_subprocess
return fetch(
File "/usr/lib/python3.9/site-packages/portage/package/ebuild/fetch.py", line 1257, in fetch
file_lock = lockfile(myfile_path, wantnewlockfile=1, **lock_kwargs)
File "/usr/lib/python3.9/site-packages/portage/locks.py", line 167, in lockfile
lock = _lockfile_iteration(
File "/usr/lib/python3.9/site-packages/portage/locks.py", line 301, in _lockfile_iteration
locking_method(myfd, fcntl.LOCK_EX | fcntl.LOCK_NB)
File "/usr/lib/python3.9/site-packages/portage/__init__.py", line 365, in __call__
rval = self._func(*args, **kwargs)
OSError: [Errno 5] Input/output error
"""
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/lib/python-exec/python3.9/ebuild", line 349, in <module>
a = portage.doebuild(ebuild, arg, settings=tmpsettings,
File "/usr/lib/python3.9/site-packages/portage/package/ebuild/doebuild.py", line 1337, in doebuild
success = loop.run_until_complete(
File "/usr/lib/python3.9/site-packages/portage/util/_eventloop/asyncio_event_loop.py", line 129, in _run_until_complete
return self._loop.run_until_complete(future)
File "/usr/lib/python3.9/asyncio/base_events.py", line 647, in run_until_complete
return future.result()
OSError: [Errno 5] Input/output error |
Also, I configured client using Gentoo wiki (https://wiki.gentoo.org/wiki/Nfs-utils) and for some reason I’m missing rpc.idmapd service (tried nfs-utils 2.5.4-r4 and 2.6.1):
Code: | ibook ~ # rc-service nfsclient start
* ERROR: nfsclient needs service(s) rpc.idmapd
ibook ~ # equery uses nfs-utils
[ Legend : U - final flag setting for installation]
[ : I - package is installed with flag ]
[ Colors : set, unset ]
* Found these USE flags for net-fs/nfs-utils-2.6.1:
U I
- - caps : Use Linux capabilities library to control privilege
- - junction : Enable NFS junction support in nfsref
+ - libmount : Link mount.nfs with libmount
- - nfsdcld : Enable nfsdcld NFSv4 clientid tracking daemon
+ - nfsidmap : Enable support for newer nfsidmap helper
- - nfsv41 : Enable support for NFSv4.1
- - tcpd : Add support for TCP wrappers
+ - uuid : Support UUID lookups in rpc.mountd
ibook ~ # equery f nfs-utils | grep bin
/sbin
/sbin/mount.nfs
/sbin/mount.nfs4
/sbin/rpc.statd
/sbin/umount.nfs
/sbin/umount.nfs4
/usr/sbin
/usr/sbin/exportfs
/usr/sbin/mountstats
/usr/sbin/nfsconf
/usr/sbin/nfsdclnts
/usr/sbin/nfsiostat
/usr/sbin/nfsstat
/usr/sbin/rpc.mountd
/usr/sbin/rpc.nfsd
/usr/sbin/rpcdebug
/usr/sbin/showmount
/usr/sbin/sm-notify
/usr/sbin/start-statd |
kernel:
Code: | <M> NFS client support
<M> NFS client support for NFS version 2
<M> NFS client support for NFS version 3
[ ] NFS client support for the NFSv3 ACL protocol extension
< > NFS client support for NFS version 4
[ ] Provide swap over NFS support
[*] NFS: Disable NFS UDP protocol support
< > NFS server support |
What am I missing? |
|
Back to top |
|
|
mike155 Advocate
Joined: 17 Sep 2010 Posts: 4438 Location: Frankfurt, Germany
|
Posted: Mon Jun 06, 2022 3:10 pm Post subject: |
|
|
Code: | locking_method(myfd, fcntl.LOCK_EX | fcntl.LOCK_NB) |
It seems that NFS Locking does not work.
This can be either a problem with NFS file locking or a general permission problem.
First of all, check you NFS Server. Is a NFS lock daemon up and running?
Do you know strace? You could run
Code: | strace -f -o /tmp/strace.log ebuild /usr/portage/sys-apps/systemd/systemd-250.4-r2.ebuild fetch |
Look at /tmp/strace.log. Which file operations on the mounted NFS share work? And which file operation does not work?
You could also temporarily allow user login as user "portage" on your client machine. Log in as user "portage", chdir to the mounted NFS share and try various file commands: create a file, write to the file, read from the file, delete the file. Which commands work? And which commands fail? |
|
Back to top |
|
|
lekto Apprentice
Joined: 20 Sep 2014 Posts: 170 Location: Ancient Rome
|
Posted: Mon Jun 06, 2022 3:30 pm Post subject: |
|
|
mike155 wrote: | First of all, check you NFS Server. Is a NFS lock daemon up and running? |
That was it, rpc.lockd wasn't running, thanks! Weird thing is none of tutorials on NFS on OpenBSD didn't mention this at all. |
|
Back to top |
|
|
sabayonino Veteran
Joined: 03 Jan 2012 Posts: 1012
|
Posted: Mon Jun 06, 2022 7:17 pm Post subject: |
|
|
Hi
Consider to add "nolock" option to NFS mountpoint options
Quote: | lock / nolock Selects whether to use the NLM sideband protocol to lock files on the server. If neither option is specified (or if lock is specified), NLM
locking is used for this mount point. When using the nolock option, applications can lock files, but such locks provide exclusion only
against other applications running on the same client. Remote applications are not affected by these locks.
NLM locking must be disabled with the nolock option when using NFS to mount /var because /var contains files used by the NLM implementation on
Linux. Using the nolock option is also required when mounting exports on NFS servers that do not support the NLM protocol. |
_________________ LRS i586 on G.Drive
LRS x86-64 EFI on MEGA |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|