早上来发现 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 -sh .[!.]*

 

查看隐藏和非隐藏文件

du -chs .[!.]* *

 

 

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

 

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

 

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

 

 

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

 

posted on 2019-11-28 11:35  文泽9527  阅读(622)  评论(0编辑  收藏  举报