この状況の原因は何ですか?
カーネル5.19にアップグレードし、NFSサーバーのディレクトリから小さなファイルを読み取ろうとしました。
あなたがした(またはしなかった)正確にどんなことが効果的(または非効果的)でしたか?
仕える人:
WinNFSd.exe -log on "F/Kernel5.19/NFS"
顧客:
mount -t nfs 192.168.0.21:/F/Kernel5.19/NFS /mnt/img -o noatime,nfsvers=3
cd /mnt/img/GPCImageV4.0
cat parts
この行動の結果は何でしたか?
Input/output error.
端末インタフェースが停止しました。
どのような結果を期待していますか?
ファイルを正常に読み取ることができます(この良い結果はカーネル5.14以下で表示されます)。
問題の詳細WinNFSd.exe
ツールをサーバーとして使用し、Windows 10でディレクトリを共有し、Debian 11(カーネルバージョン5.19)をクライアントとして使用して、NFSv3プロトコルを使用してインストールするのに問題があります。マウントプロセスはエラーなしで完了するか、またはをls
使用してディレクトリ情報に正常にアクセスできます ls -l
。ただし、コマンドを使用してディレクトリの内容にアクセスしようとすると、という cat
エラーメッセージが表示されます Input/output error
。
touchを使用してクライアント側で新しいファイルを作成するときは、catを使用して新しく作成されたファイルの内容を読み取ることもできます。ただし、サーバー側でファイルが生成された場合、クライアントはlsを使用して新しく生成されたファイルを表示してファイル情報を取得できますが、catを使用してその内容を読み取ろうとすると、「入力/出力エラー」が発生します。これは私を混乱させる奇妙な部分です。アクセス制御の問題のようです。
また、しばらくしてマウントされたディレクトリにアクセスしようとすると、ターミナルインターフェイスが応答しなくなります。タイミングがランダムであるようなので、この問題を引き起こす原因が何であるか正確にはわかりません。応答しない現象が発生するまでに数分かかることがありますが、問題なく最大30分間作業できる場合があります。
興味深いことに、カーネルバージョンを5.14以下にダウングレードすると、この問題は解決されます。実際、同じネットワーク環境、マウントディレクトリ、およびマウントパラメータを使用してカーネルバージョン6.1、5.18、5.15、5.14、5.10、および4.19をテストしました。これらのバージョンの最初の3つのバージョンでのみこの問題が発生しましたが、最後の3つのサブバージョンでは問題なくNFS共有ディレクトリのファイルの内容を読み取ることができました。
新しい試験情報の更新 Wireshark出力
実際の長さ15のファイルの内容を読み、Wiresharkを使用してパケットをキャプチャしようとしています。 Linuxカーネルの下位バージョン(バージョン4.19)では、NFSクライアントが15(実際の長さ)の長さを要求したことがわかりました。
No. Source Destination Protocol Length Info
212 192.168.0.100 192.168.0.21 NFS 206 V3 READ Call(Reply In 213), FH:0x6ee4af5f Offset: 0 Len:15
213 192.168.0.21 192.168.0.100 NFS 202 V3 READ Reply(Call In 212) Len:15
ただし、将来のバージョンのLinuxカーネル(バージョン5.19)では、要求の長さは4096です。
No. Source Destination Protocol Length Info
443 192.168.0.100 192.168.0.21 NFS 206 V3 READ Call(Reply In 446), FH:0x6ee4af5f Offset: 0 Len:4096
444 192.168.0.21 192.168.0.100 TCP 1514 2049->714 [ACK] Seq=44717 Ack=4613 Win=8210 Len=1460 [TCP segment of a reassembled PDU]
445 192.168.0.21 192.168.0.100 TCP 1514 2049->714 [ACK] Seq=46177 Ack=4613 Win=8210 Len=1460 [TCP segment of a reassembled PDU]
446 192.168.0.21 192.168.0.100 NFS 1362 V3 READ Reply(Call In 443) Len:15
この動作が「入力/出力エラー」に関連しているかどうかはわかりません。
誰でもこれについてどんな考えを持っていますか?
問題のテスト環境の具体的な詳細は次のとおりです。
仕える人:
- オペレーティングシステム:Windows 10
- NFSサーバーツール:WinNFSd.exe 2.4.0
顧客:
- オペレーティングシステム:Debian 11.0
- カーネルバージョン:
Linux gpc 5.19.0-0.deb11.2-amd64 #1 SMP PREEMPT_DYNAMIC Debian 5.19.11-1~bpo11+1 (2022-10-03) x86_64 GNU/Linux
規約:
- NFSバージョン:NFSv3
- nfs-common/oldstable、今1:1.3.4-6 amd64 [インストール済み]
- rpcbind/oldstable, 現在 1.2.5-9 amd64 [インストール済み, 自動]
CMDマウント
root@gpc:mount -t nfs 192.168.0.21:/F/Kernel5.19/NFS /mnt/img -o noatime,nfsvers=3
観察結果:
root@gpc:/mnt/img# ls -l
total 4
drwxrwxrwx 1 root root 4096 Jul 28 2023 GPCImageV4.0
root@gpc:/mnt/img/GPCImageV4.0# ls -l
total 2400393
-rwxrwxrwx 1 root root 1529 Jul 26 18:54 blkdev.list
-rwxrwxrwx 1 root root 1424 Jul 26 18:54 blkid.list
-rwxrwxrwx 1 root root 13562 Jul 26 18:54 clonezilla-img
-rwxrwxrwx 1 root root 300 Jul 26 18:54 dev-fs.list
-rwxrwxrwx 1 root root 4 Jul 26 18:54 disk
-rwxrwxrwx 1 root root 1207 Jul 26 18:54 efi-nvram.dat
-rwxrwxrwx 1 root root 201 Nov 2 2022 GantryConfiguration.xml
-rwxrwxrwx 1 root root 22373 Jul 26 18:54 Info-dmi.txt
-rwxrwxrwx 1 root root 236 Jul 26 18:54 Info-img-id.txt
-rwxrwxrwx 1 root root 61 Jul 26 18:54 Info-img-size.txt
-rwxrwxrwx 1 root root 27602 Jul 26 18:54 Info-lshw.txt
-rwxrwxrwx 1 root root 1592 Jul 26 18:54 Info-lspci.txt
-rwxrwxrwx 1 root root 1539 Jul 26 18:54 Info-OS-prober.txt
-rwxrwxrwx 1 root root 200 Jul 26 18:54 Info-packages.txt
-rwxrwxrwx 1 root root 96 Jul 26 18:54 Info-saved-by-cmd.txt
-rwxrwxrwx 1 root root 4724 Jul 26 18:54 Info-smart.txt
-rwxrwxrwx 1 root root 35 Jul 26 18:54 parts
-rwxrwxrwx 1 root root 2158265 Jul 26 18:54 sda1.vfat-ptcl-img.gz
-rwxrwxrwx 1 root root 2210653199 Jul 26 18:54 sda2.ext4-ptcl-img.gz
-rwxrwxrwx 1 root root 225310835 Jul 26 18:53 sda3.ext4-ptcl-img.gz
-rwxrwxrwx 1 root root 4227536 Jul 26 18:52 sda4.ext4-ptcl-img.gz
-rwxrwxrwx 1 root root 7246389 Jul 26 18:52 sda5.ext4-ptcl-img.gz
-rwxrwxrwx 1 root root 2314988 Jul 26 18:52 sda6.ext4-ptcl-img.gz
-rwxrwxrwx 1 root root 5948542 Jul 26 18:52 sda7.ext4-ptcl-img.gz
-rwxrwxrwx 1 root root 37 Jul 26 18:54 sda-chs.sf
-rwxrwxrwx 1 root root 17408 Jul 26 18:54 sda-gpt-1st
-rwxrwxrwx 1 root root 16384 Jul 26 18:54 sda-gpt-2nd
-rwxrwxrwx 1 root root 17920 Jul 26 18:54 sda-gpt.gdisk
-rwxrwxrwx 1 root root 967 Jul 26 18:54 sda-gpt.sgdisk
-rwxrwxrwx 1 root root 512 Jul 26 18:54 sda-mbr
-rwxrwxrwx 1 root root 644 Jul 26 18:54 sda-pt.parted
-rwxrwxrwx 1 root root 540 Jul 26 18:54 sda-pt.parted.compact
-rwxrwxrwx 1 root root 1229 Jul 26 18:54 sda-pt.sf
-rwxrwxrwx 1 root root 53 Jul 26 18:52 swappt-sda8.info
root@gpc:/mnt/img/GPCImageV4.0# cat parts
cat: parts: Input/output error
root@gpc:/mnt/img/GPCImageV4.0# cat disk
cat: disk: Input/output error
一般的なテスト環境の具体的な詳細は次のとおりです。
仕える人:
- オペレーティングシステム:Windows 10
- NFSサーバーツール:WinNFSd.exe 2.4.0
顧客:
- オペレーティングシステム:Debian 9.1
- カーネルバージョン:
Linux gpc 4.9.0-6-amd64 #1 SMP Debian 4.9.88-1+deb9u1 (2018-05-07) x86_64 GNU/Linux
規約:
- NFSバージョン:NFSv3
- nfs-common/now 1:1.3.4-2.1ubuntu5.5 amd64 [インストール済み、ローカル]
- rpcbind/now 0.2.3-0.6ubuntu0.18.04.4 amd64 [インストール済み、ローカル]
CMDマウント
root@gpc:mount -t nfs 192.168.0.21:/F/Kernel5.19/NFS /mnt/img -o noatime,nfsvers=3
観察結果:
root@gpc:/mnt/img# ls -l
total 4
drwxrwxrwx 1 root root 4096 Jul 28 2023 GPCImageV4.0
root@gpc:/mnt/img/GPCImageV4.0# ls -l
total 2400393
-rwxrwxrwx 1 root root 1529 Jul 26 2023 blkdev.list
-rwxrwxrwx 1 root root 1424 Jul 26 2023 blkid.list
-rwxrwxrwx 1 root root 13562 Jul 26 2023 clonezilla-img
-rwxrwxrwx 1 root root 300 Jul 26 2023 dev-fs.list
-rwxrwxrwx 1 root root 4 Jul 26 2023 disk
-rwxrwxrwx 1 root root 1207 Jul 26 2023 efi-nvram.dat
-rwxrwxrwx 1 root root 201 Nov 2 2022 GantryConfiguration.xml
-rwxrwxrwx 1 root root 22373 Jul 26 2023 Info-dmi.txt
-rwxrwxrwx 1 root root 236 Jul 26 2023 Info-img-id.txt
-rwxrwxrwx 1 root root 61 Jul 26 2023 Info-img-size.txt
-rwxrwxrwx 1 root root 27602 Jul 26 2023 Info-lshw.txt
-rwxrwxrwx 1 root root 1592 Jul 26 2023 Info-lspci.txt
-rwxrwxrwx 1 root root 1539 Jul 26 2023 Info-OS-prober.txt
-rwxrwxrwx 1 root root 200 Jul 26 2023 Info-packages.txt
-rwxrwxrwx 1 root root 96 Jul 26 2023 Info-saved-by-cmd.txt
-rwxrwxrwx 1 root root 4724 Jul 26 2023 Info-smart.txt
-rwxrwxrwx 1 root root 35 Jul 26 2023 parts
-rwxrwxrwx 1 root root 2158265 Jul 26 2023 sda1.vfat-ptcl-img.gz
-rwxrwxrwx 1 root root 2210653199 Jul 26 2023 sda2.ext4-ptcl-img.gz
-rwxrwxrwx 1 root root 225310835 Jul 26 2023 sda3.ext4-ptcl-img.gz
-rwxrwxrwx 1 root root 4227536 Jul 26 2023 sda4.ext4-ptcl-img.gz
-rwxrwxrwx 1 root root 7246389 Jul 26 2023 sda5.ext4-ptcl-img.gz
-rwxrwxrwx 1 root root 2314988 Jul 26 2023 sda6.ext4-ptcl-img.gz
-rwxrwxrwx 1 root root 5948542 Jul 26 2023 sda7.ext4-ptcl-img.gz
-rwxrwxrwx 1 root root 37 Jul 26 2023 sda-chs.sf
-rwxrwxrwx 1 root root 17408 Jul 26 2023 sda-gpt-1st
-rwxrwxrwx 1 root root 16384 Jul 26 2023 sda-gpt-2nd
-rwxrwxrwx 1 root root 17920 Jul 26 2023 sda-gpt.gdisk
-rwxrwxrwx 1 root root 967 Jul 26 2023 sda-gpt.sgdisk
-rwxrwxrwx 1 root root 512 Jul 26 2023 sda-mbr
-rwxrwxrwx 1 root root 644 Jul 26 2023 sda-pt.parted
-rwxrwxrwx 1 root root 540 Jul 26 2023 sda-pt.parted.compact
-rwxrwxrwx 1 root root 1229 Jul 26 2023 sda-pt.sf
-rwxrwxrwx 1 root root 53 Jul 26 2023 swappt-sda8.info
root@gpc:/mnt/img/GPCImageV4.0# cat parts
sda1 sda2 sda3 sda4 sda5 sda6 sda7
root@gpc:/mnt/img/GPCImageV4.0# cat disk
sda