Atom feed of this document
  

 发现失效的磁盘驱动器

根据我们的经验,当驱动器即将失败时,会在/var/log/kern.log中出现错误消息。这里有一个脚本,叫做swift-drive-audit,可以通过计划任务来运行从而时刻监视着损坏的磁盘。一旦发现错误,它会卸载损坏的磁盘,然后对象存储会自我修复。此脚本的配置文件需要下面的配置:

表 5.1. [drive-audit]drive-audit.conf中的配置属性描述
配置属性=默认值 描述
device_dir = /srv/node Directory devices are mounted under
error_limit = 1 Number of errors to find before a device is unmounted
log_address = /dev/log Location where syslog sends the logs to
log_facility = LOG_LOCAL0 Syslog log facility
log_file_pattern = /var/log/kern.*[!.][!g][!z] Location of the log file with globbing pattern to check against device errors locate device blocks with errors in the log file
log_level = INFO Logging level
log_max_line_length = 0 Caps the length of log lines to the value given; no limit if set to 0, the default.
log_to_console = False No help text available for this option.
minutes = 60 Number of minutes to look back in `/var/log/kern.log`
recon_cache_path = /var/cache/swift Directory where stats for a few items will be stored
regex_pattern_1 = \berror\b.*\b(dm-[0-9]{1,2}\d?)\b No help text available for this option.
unmount_failed_device = True No help text available for this option.

此脚本仅在Ubuntu 10.04下测试过,所以如果你使用的是不同的发行版或不同的操作系统,请在使用到生产环境中时务必小心。

Questions? Discuss on ask.openstack.org
Found an error? Report a bug against this page


loading table of contents...