zoukankan      html  css  js  c++  java
  • linux 磁盘满了,vim 编辑文件时无法保存

    早上来发现 redis 不能用,报 

    MISCONF Redis is configured to save RDB snapshots, but it is currently not able to persist on disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error.

    百度了一下,说是 因为强制把redis快照关闭了导致不能持久化的问题 ( 具体参考:https://blog.csdn.net/qq_31766907/article/details/78715935 )

    修改 redis.conf 文件后 发现无法保存,报

    E514: write error (file system full?)

    回到 服务器,输入 df -h

    发现是磁盘满了

    cd /usr  进入到 usr 目录下

    通过 du -sh * 查看目录所占空间,发现是 local 占的空间最大

    继续深入查看

     发现是 nexus 占了 16G,找到原因了,是搭的私服占了空间

    时间仓促, 没仔细研究各个文件的作用,于是就把 nexus 整个文件夹删了

     进入 nexus 的bin 目录,nexus stop 打算停止服务,发现服务未启动( 没有设置开机自启 )

     

     于是直接 删除 nexus 目录(肉疼……)

     再次编辑 就可以了

    补充:

    du -m --max-depth=1或du -h --max-depth=1du  命令可以查看磁盘中文件或目录所占磁盘空间的大小

    发现 /var 目录所占空间最大,cd 进入,再次查找,发现是

     log 文件最大,再次查找,发现是 jenkins 的所占空间最大

    清除其中内容:echo > jenkins.log ,磁盘顿时多出32个G

  • 相关阅读:
    java集合
    linux网络配置(iproute2)
    linux网络配置(ifcfg)
    linuxshell编程之数组和字符串处理工具
    linux网络配置文件
    linux 内核版本和发行版本区别
    linux 相关零碎知识整理
    linux计算机网络基础
    linux bash编程之函数和循环控制
    linux bash shell编程之参数变量和流程控制。
  • 原文地址:https://www.cnblogs.com/wtx106/p/11948816.html
Copyright © 2011-2022 走看看