ls /usr/linkapp 没反应

本文记录了一次使用ls命令时遇到的无响应问题及解决过程。问题与GlusterFS文件系统有关,通过停止Gluster服务并结束相关进程最终解决了问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

ls /usr/linkapp  

ll /usr/linkapp  都是一样无反应

没有任何反应, ctrl + c /  ctrl + d 都不行

 

但是

ls /usr/linkapp/ | wc -l
14

 

却是有结果的

 

只能通过kill -9 杀死

#ls /usr/linkapp


^C

已杀死

 

 

网上查找无结果,后面突然相对了 glusterFS,

 

 

gluster volume info 
 
Volume Name: myvolume
Type: Distribute
Volume ID: 3e89963f-6879-4e43-af5e-e10325faeb1e
Status: Started
Number of Bricks: 1
Transport-type: tcp
Bricks:
Brick1: 192.168.4.49:/smbtest
[root@/usr/linkapp/bin/tomcat-master-bam]#gluster peer  info 
unrecognized word: info (position 1)
[root@/usr/linkapp/bin/tomcat-master-bam]#gluster peer status 
Number of Peers: 1

Hostname: 192.168.4.178
Uuid: 31236807-bcc8-43a8-9e68-e42202cf192a
State: Accepted peer request (Disconnected)
[root@/usr/linkapp/bin/tomcat-master-bam]#
[root@/usr/linkapp/bin/tomcat-master-bam]#service glusterd stop 
[root@/usr/linkapp/bin/tomcat-master-bam]#
[root@/usr/linkapp/bin/tomcat-master-bam]#
[root@/usr/linkapp/bin/tomcat-master-bam]#gluster peer status 


Connection failed. Please check if gluster daemon is operational.
[root@/usr/linkapp/bin/tomcat-master-bam]#
[root@/usr/linkapp/bin/tomcat-master-bam]#
[root@/usr/linkapp/bin/tomcat-master-bam]#gluster volume info 
Connection failed. Please check if gluster daemon is operational

好了,但是重试 ls 还是不行,

#ps -ef | grep  glust
root      2314  2312  0 May24 ?        00:00:00 mount -t glusterfs 192.168.4.231:/myvolume /usr/linkapp/data
root      2315  2314  0 May24 ?        00:00:00 /bin/sh /sbin/mount.glusterfs 192.168.4.231:/myvolume /usr/linkapp/data -o rw
root      2367  2315  0 May24 ?        00:00:00 /usr/local/sbin/glusterfs --volfile-server=192.168.4.231 --volfile-id=/myvolume /usr/linkapp/data
root      2368  2367  0 May24 ?        00:00:00 /usr/local/sbin/glusterfs --volfile-server=192.168.4.231 --volfile-id=/myvolume /usr/linkapp/data
root      2369  2367  0 May24 ?        00:00:15 /usr/local/sbin/glusterfs --volfile-server=192.168.4.231 --volfile-id=/myvolume /usr/linkapp/data
root      2374  2368  0 May24 ?        00:00:00 /bin/mount -i -f -t fuse.glusterfs -o default_permissions,allow_other,max_read=131072 192.168.4.231:/myvolume /usr/linkapp/data
root      7665  7508  0 16:09 pts/7    00:00:00 grep glust

 

ps 一看, 还有很多啊!

 

全部杀掉,kill -9 2314 2315 2367 2367 2369 2374 

 

可以了!

#ll /usr/linkapp/
总用量 3647632

xxx

 

### 如何验证 Linux 系统中 libxml2 库的安装路径和依赖关系 #### 验证 libxml2 安装路径 可以通过以下方法来确认 `libxml2` 的安装路径及其文件结构: 1. 使用命令查找头文件的位置: ```bash find /usr -name "libxml*.h" ``` 如果按照默认方式编译并安装,则头文件通常位于 `/usr/local/include/libxml2` 下[^1]。 2. 查找库文件的位置: ```bash find /usr -name "libxml*" ``` 默认情况下,动态链接库会放置在 `/usr/local/lib` 或者系统的标准库目录下(如 `/lib` 和 `/usr/lib`)。如果自定义了前缀路径,则需要根据实际指定的 `--prefix` 参数寻找相应目录下的 `lib` 子目录[^5]。 3. 列出已知的共享库路径中的 libxml2 文件: ```bash ls -l /usr/local/lib | grep libxml ``` #### 检查 libxml2 的依赖关系 要检查 `libxml2` 是否存在以及其依赖关系,可以执行以下操作: 1. 执行 `ldd` 命令查看特定程序或库的依赖情况。例如,假设有一个名为 `example_program` 的应用程序使用了 `libxml2`,则运行: ```bash ldd example_program | grep xml ``` 输出可能类似于以下内容: ``` libxml2.so.2 => /usr/local/lib/libxml2.so.2 (0x...) ``` 2. 对于单独的共享对象文件,也可以直接通过 `ldd` 来分析它的依赖链路: ```bash ldd /path/to/libxml2.so.2 ``` 此外还可以观察到其他必要的支持库是否存在,比如 DNS 解析器 `libresolv.so.2` 可能会被加载[^3]。 3. 查询系统包管理工具的状态以了解是否已经预装好该软件包。对于基于 Debian 的发行版来说,这一步骤涉及查询 apt-get 数据库;而对于 RedHat/CentOS 类型的操作系统而言则是 yum/dnf 资料库。 - Ubuntu/Debian: ```bash dpkg -L libxml2-dev ``` - CentOS/Fedora/RHEL: ```bash rpm -ql libxml2-devel ``` 以上步骤能够帮助定位 `libxml2` 的具体部署状况连同其所关联的各种外部资源一起呈现出来。 ```python import os def check_libxml_installation(): include_path = "/usr/local/include/libxml2/" library_paths = ["/usr/local/lib", "/lib", "/usr/lib"] if not os.path.exists(include_path): print(f"Header files are missing at {include_path}.") found_libraries = False for path in library_paths: if any(name.startswith('libxml') for name in os.listdir(path)): found_libraries = True if not found_libraries: print("No libraries detected under standard locations.") check_libxml_installation() ```
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值