我们在支持我们的版本控制服务器的RHEL6 VM上有一个NFS挂载 – 最近,其中一个存储库有点疯狂,这就是我在服务器上找到的:
ls -latri repo.git/refs/heads/
total 28
5551210 drwxr-xr-x. 2 git git 8192 Jun 1 21:21 .
5551210 drwxr-xr-x. 2 git git 8192 Jun 1 21:21
5551210 drwxr-xr-x. 2 git git 8192 Jun 1 21:21
5551209 drwxr-xr-x. 3 git git 4096 Jun 1 22:09 ..
当我对着dir运行树时,它似乎是无限递归的 – 例如:
repo.git/refs/heads/
├──
│ ├──
│ │ ├──
│ │ │ ├──
│ │ │ │ ├──
│ │ │ │ │ ├──
│ │ │ │ │ │ ├──
│ │ │ │ │ │ │ ├──
│ │ │ │ │ │ │ │ ├──
│ │ │ │ │ │ │ │ │ ├──
│ │ │ │ │ │ │ │ │ │ ├──
│ │ │ │ │ │ │ │ │ │ │ ├──
│ │ │ │ │ │ │ │ │ │ │ │ ├──
│ │ │ │ │ │ │ │ │ │ │ │ │ ├──
│ │ │ │ │ │ │ │ │ │ │ │ │ │ ├──
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├──
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├──
我试图通过其inode ref删除存储库:
[root@node repo.git/refs]# ls -latri
total 16
5551210 drwxr-xr-x. 2 git git 8192 Jun 1 21:21 heads
[root@node repo.git/refs]# find . -inum 5551210 -exec rm -rf {} \;
rm: cannot remove `./refs/heads': Directory not empty
find: `./refs/heads/': No such file or directory
find: `./refs/heads/': No such file or directory
我有点不知道在这里做什么 – ls -latri命令的inode信息似乎表明’heads’目录中有2个目录是head目录的硬链接?
关于如何清理它的任何想法都是最受欢迎的 – 我认为我已经解决了它导致的应用程序问题,但文件系统的更大问题需要排序.
谢谢!
编辑:附加输出位:
没有隐藏的字符:
[root@node repo.git/refs]# ls -latrib heads/
total 28
5551210 drwxr-xr-x. 2 git git 8192 Jun 1 21:21 .
5551210 drwxr-xr-x. 2 git git 8192 Jun 1 21:21
5551210 drwxr-xr-x. 2 git git 8192 Jun 1 21:21
5551209 drwxr-xr-x. 3 git git 4096 Jun 1 22:09 ..
但是当我实际上在头部目录时,这里有一些有趣的输出:
[root@node repo.git/refs/heads]# ls -latrib
ls: cannot access : No such file or directory
ls: cannot access : No such file or directory
total 12
? -?????????? ? ? ? ? ?
? -?????????? ? ? ? ? ?
5551210 drwxr-xr-x. 2 git git 8192 Jun 1 21:21 .
5551209 drwxr-xr-x. 3 git git 4096 Jun 1 22:09 ..