Hi,
a 'Text file busy' case caused by nfs server.
nfs server: T7610, export /nfs
back-end filesystem: btrfs, xfs
nfs client1: T620, mount.nfs4 T7610:/nfs /nfs
nfs client2: T630, mount.nfs4 T7610:/nfs /nfs
linux kernel: 5.10.68, 5.15.0-rc3
nfs server/client use the same kernel version
The steps to reproduce:
1, nfs client1
cp /usr/bin/ls /nfs/ls.a
cat /usr/bin/ls >/nfs/ls.b; chmod a+x /nfs/ls.b
/nfs/ls.a >/dev/null
/nfs/ls.b >/dev/null
It works well.
2, nfs client2
/nfs/ls.a >/dev/null
/nfs/ls.b >/dev/null
it works well.
3, nfs server
/nfs/ls.a >/dev/null
-bash: /nfs/ls.a: Text file busy
'Text file busy' happen
/nfs/ls.b >/dev/null
-bash: /nfs/ls.b: Text file busy
'Text file busy' happen
systemctl stop nfs-server.service
/nfs/ls.a >/dev/null
/nfs/ls.b >/dev/null
it works well.
This 'Text file busy' happen when we exec/access the file through the
back-end filesystem directly, not through the nfs client/server.
so this is caused by some file handle(execute attr, and write mode?)
hold by nfs server?
Best Regards
Wang Yugui ([email protected])
2021/10/02