当前位置: 首页 > news >正文

centos7 soft raid每周自动同步的问题

之前redhat老版本时也遇到过这样的问题

https://blog.csdn.net/jolly10/article/details/108768360

centos7解决的办法略有不同,记录一下:

centos7默认是每周日凌晨1点进行raid检查,有点太频繁了

[oracle@qht117 data]$ ls /etc/cron*
/etc/cron.deny /etc/crontab
/etc/cron.d:
0hourly raid-check sysstat
/etc/cron.daily:
logrotate man-db.cron mlocate
/etc/cron.hourly:
0anacron
/etc/cron.monthly:
/etc/cron.weekly:
[oracle@qht117 data]$ cat /etc/crontab
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
# For details see man 4 crontabs
# Example of job definition:
# .---------------- minute (0 - 59)
# | .------------- hour (0 - 23)
# | | .---------- day of month (1 - 31)
# | | | .------- month (1 - 12) OR jan,feb,mar,apr ...
# | | | | .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat
# | | | | |
# * * * * * user-name command to be executed

默认的设置如下:

[root@qht117 ~]# cat /etc/cron.d/raid-check
# Run system wide raid-check once a week on Sunday at 1am by default
0 1 * * Sun root /usr/sbin/raid-check

将其修改为每月的第1个星期六进行检查 :

[root@qht117 ~]# cat /etc/cron.d/raid-check
# Run system wide raid-check once a week on Sunday at 1am by default
#0 1 * * Sun root /usr/sbin/raid-check
#modifyed to once a month on Sat at 1am.
0 1 1-7 * 6 root /usr/sbin/raid-check

重启一下crond服务,让更新生效:

root@qht117 ~]# systemctl restart crond.service

完成!

http://www.lryc.cn/news/31015.html

相关文章:

  • 嵌入式Linux内核代码风格
  • Andorid:关于Binder几个面试问题
  • 【剑指Offer-Java】包含min函数的栈?
  • 红队APT——邮件钓鱼攻击SwaksOffice漏洞RLO隐藏压缩释放
  • 【Java|基础篇】超详细讲解运算符
  • Promise-异步回调
  • 【设计模式之美 设计原则与思想:设计原则】21 | 理论七:重复的代码就一定违背DRY吗?如何提高代码的复用性?
  • 深度学习 | 入个Pytorch的小门
  • 应用上云指导
  • 进程概念~
  • 三天吃透Java基础八股文
  • YOLOv8训练自己的数据集(超详细)
  • 【洛谷 P1088】[NOIP2004 普及组] 火星人 题解(全排列+向量)
  • 基于混合蛙跳算法优化SVM的滚动轴承故障诊断python实现
  • 如何让AI帮你干活-娱乐(2)
  • 文件异步多备常用方案
  • java面试八股文之------Redis夺命连环25问
  • 【数据结构】AVL平衡二叉树底层原理以及二叉树的演进之多叉树
  • K8S篇-安装nfs插件
  • xmu 离散数学 卢杨班作业详解【4-7章】
  • 多重背包问题中的二进制状态压缩
  • 汇编语言程序设计(四)之汇编指令
  • Vant2 源码分析之 vant-sticky
  • 【自然语言处理】【大模型】大语言模型BLOOM推理工具测试
  • 云桌面技术初识:VDI,IDV,VOI,RDS
  • 基于本地centos构建gdal2.4.4镜像
  • 生产环境线程问题排查
  • Day908.joinsnljdist和group问题和备库自增主键问题 -MySQL实战
  • 算法 - 剑指Offer 丑数
  • 【ONE·C || 文件操作】