我们确实有几台服务器(CentOS 7)具有相同的 CIFS 存储,并且在一台服务器上创建的文件存在问题,并且此后不稳定。
过程是
- server1 正在 /DATA/CARTO_TEST 上创建数据
- server1正在调用server2 API来配置新的图像仓库
- server2 正在访问相同的 /DATA/CARTO_TEST 文件
但是我们在第3步遇到了这个问题:
2021-09-22 13:15:30,042 WARN [shapefile.shp] - Could not open the .shx file, continuing assuming the .shp file is not sparse
java.io.FileNotFoundException: /DATA/CARTO_TEST/TEST_LEVEL5/pyramid/2/2.shx (No such file or directory)
at java.base/java.io.RandomAccessFile.open0(Native Method)
at java.base/java.io.RandomAccessFile.open(RandomAccessFile.java:345)
在 CIFS 存储上生成数据后,我们遇到奇怪的行为:
[geoproc@server1 pyramid]$ cd 10/
[geoproc@server1 10]$ ls -al
total 17
drwxr-xr-x 2 geoproc geoproc 0 Sep 29 11:13 .
drwxr-xr-x 2 geoproc geoproc 0 Sep 29 11:13 ..
drwxr-xr-x 2 geoproc geoproc 0 Sep 28 10:57 1
-rwxr-xr-x 1 geoproc geoproc 65 Sep 29 11:13 10.dbf
-rwxr-xr-x 1 geoproc geoproc 13 Sep 29 11:13 10.fix
-rwxr-xr-x 1 geoproc geoproc 929 Sep 29 11:13 10.prj
-rwxr-xr-x 1 geoproc geoproc 100 Sep 29 11:13 10.shp
-rwxr-xr-x 1 geoproc geoproc 100 Sep 29 11:13 10.shx
[geoproc@server1 10]$ rm 10.*
rm: cannot remove ‘10.shp’: No such file or directory
[geoproc@server1 10]$ ls -al
total 16
drwxr-xr-x 2 geoproc geoproc 0 Sep 29 11:14 .
drwxr-xr-x 2 geoproc geoproc 0 Sep 29 11:13 ..
drwxr-xr-x 2 geoproc geoproc 0 Sep 28 10:57 1
-rwxr-xr-x 1 geoproc geoproc 65 Sep 29 11:13 10.dbf
-rwxr-xr-x 1 geoproc geoproc 929 Sep 29 11:13 10.prj
-rwxr-xr-x 1 geoproc geoproc 100 Sep 29 11:13 10.shp
-rwxr-xr-x 1 geoproc geoproc 100 Sep 29 11:13 10.shx
[geoproc@server1 10]$ rm 10.*
rm: cannot remove ‘10.dbf’: No such file or directory
rm: cannot remove ‘10.prj’: No such file or directory
rm: cannot remove ‘10.shp’: No such file or directory
rm: cannot remove ‘10.shx’: No such file or directory
[geoproc@server1 10]$ ls -al
total 16
drwxr-xr-x 2 geoproc geoproc 0 Sep 29 11:14 .
drwxr-xr-x 2 geoproc geoproc 0 Sep 29 11:13 ..
drwxr-xr-x 2 geoproc geoproc 0 Sep 28 10:57 1
-rwxr-xr-x 1 geoproc geoproc 65 Sep 29 11:13 10.dbf
-rwxr-xr-x 1 geoproc geoproc 929 Sep 29 11:13 10.prj
-rwxr-xr-x 1 geoproc geoproc 100 Sep 29 11:13 10.shp
-rwxr-xr-x 1 geoproc geoproc 100 Sep 29 11:13 10.shx
[geoproc@server1 10]$ cat 10.prj
cat: 10.prj: No such file or directory
CIFS 存储通过以下选项安装在我们的服务器 server1 和 server2 上:
//<servername>/<share>$/GEOSERVER /DATA/CARTO_TEST cifs vers=2.0,noserverino,username=<username>,password=<password>,domain=<domaine name>,uid=<uid>,gid=<gid> 0 0
我们还可以在 var/log/messages 中读取此内容,但不确定它是否相关:
kernel: CIFS VFS: DFS capability contradicts DFS flag
有没有人遇到过类似的问题?
您有什么建议吗
- 问题的根本原因是什么?
- 怎么解决呢?
我们尝试在挂载中使用和不使用 noserverino 选项:没有区别
我们尝试在本地文件上生成:这里没有问题