您现在的位置是: 首页 > 运维 Linux no space left on device 出现设备上没有空间问题
Linux no space left on device 出现设备上没有空间问题
2020-06-09 【运维】 3167人已围观 6262次浏览
简介Linux no space left on device 出现设备上没有空间问题
今早发现 Redis 服务不可用,提示设备上没有空间,想到服务器上磁盘是完全够用的,不应该出现此类问题才对,ssh 连上服务器,df -h 发现磁盘已经 100% 了,怀疑是某日志文件过大导致
首先是在系统根目录执行下面命令,查看具体是那个文件夹导致磁盘消耗
cd /
du -sh *
发现 /root 文件夹消耗了 60 多G的空间,这是完全不合理的,之后进入 /root 文件夹,查看所有的文件(包含隐藏文件)
cd /root
ls -la
输出的信息中,发现了三个常见的,会比较大的文件夹
.npm
.nvm
.pm2
首先第一个就怀疑的是 .pm2 文件夹,因为会输出大量的日志文件,执行下面的命令查看具体的磁盘消耗
du -h --max-depth=1 /root/.pm2
输出的信息中,/root/.pm2/logs 文件夹,就占用了 59G 的磁盘空间
之后进入 logs 文件查看,发现都是一些很久以前的没用的日志信息
果断删除,磁盘空间恢复,问题解决,Redis 也正常了
很赞哦! (0)
相关文章
- Linux 安装 Tengine
- Redis 提示 MISCONF Redis is configured to save RDB snapshots, but it is currently not able to persist on disk 解决方案
- 解决Lost connection to MySQL server at 'reading initial communication packet' 的方法
- nginx 出现 the "ssl" directive is deprecated, use the "listen ... ssl" directive instead in 错误解决方案
- LNMP 手动更新 SSL 证书
- Linux 查看磁盘、磁盘分区、挂载磁盘、卸载磁盘操作
- Oracle ORA-12541:TNS:no listener错误解决方法
- Docker 批量操作命令
- Zookeeper 找不到或无法加载主类 org.apache.zookeeper.server.quorum.QuorumPeerMain
- 常见端口号
点击排行
- Error in execution; nested exception is io.lettuce.core.RedisCommandExecutionException: ERR DISABLE You can't write or read against a disable instance
- Debian apt 使用国内镜像
- RocketMQ 出现 sendDefaultImpl call timeout 问题
- 类 BASE64Decoder 程序包 sun.misc 找不到符号
- SpringBoot @NotBlank 不生效问题
- 记一次 Mybatis-Plus 自动填充无效问题解决
- SpringBoot 2.x 文件上传出现 The field file exceeds its maximum permitted size of 1048576 bytes
- nuxt 项目完整部署方案
站长推荐
猜你喜欢
- 记一次 Mybatis-Plus 自动填充无效问题解决
- LNMP 手动更新 SSL 证书
- 删除Git仓库所有历史提交记录,成为一个干净的仓库
- Windows CMD 常用命令
- Laravel项目出现could not be opened: failed to open stream: Permission denied
- Mac 设置允许任何来源
- PHP 中list()出现Undefined offset: 0错误
- Vue 报错 Avoid using non-primitive value as key, use string/number value instead
- mybatis中大于等于小于等于的写法
- SpringBoot 集成 Elasticsearch 7.8.1 出现错误 Factory method 'elasticsearchRestHighLevelClient' threw exception; nested exception is java.lang.NoSuchFieldError: IGNORE_DEPRECATIONS