|
||||||||
|
||||||||
|
|
Công Cụ | Xếp Bài |
08-04-2014, 04:03 PM | #1 |
Guest
Trả Lời: n/a
|
Giám sát Linux software raid qua email (smart monitoring)
Giám sát Linux software raid qua email (smart monitoring) 1. S.M.A.R.T monitoring Installing S.M.A.R.T drive monitoring apt-get install smartmontools Uncomment the “start_smartd=yes” line vim /etc/default/smartmontools Now we have to specify which disk drives we want to monitor vim /etc/smartd.conf Insert the following lines: /dev/sda -a -I 194 -W 4,45,55 -R 5 -m <your_email_address> /dev/sdb -a -I 194 -W 4,45,55 -R 5 -m <your_email_address> /dev/sdd -a -I 194 -W 4,45,55 -R 5 -m <your_email_address> /dev/sde -a -I 194 -W 4,45,55 -R 5 -m <your_email_address> Simulating a drive failure Simulating a faulty disk and removing it from the array mdadm --manage /dev/md0 --set-faulty /dev/sdb1 mdadm --manage /dev/md0 --remove /dev/sdb1 Adding again the disk to the array mdadm --manage /dev/md0 --add /dev/sdb1 Replacing a Faulty Disk mdadm --manage /dev/md0 --set-faulty /dev/sdb1 mdadm --manage /dev/md1 --set-faulty /dev/sdb2 mdadm --manage /dev/md0 --remove /dev/sdb1 mdadm --manage /dev/md1 --remove /dev/sdb2 Replacing the disk sfdisk -d /dev/sda | sfdisk /dev/sdb mdadm --manage /dev/md0 --add /dev/sdb1 mdadm --manage /dev/md1 --add /dev/sdb2 grub-install /dev/sdb If the Disk is out of Sync you might need to delete the superblock mdadm --zero-superblock /dev/sdb Whatching the sync in progress watch cat /proc/mdstat Testing that all disks are synchronized /usr/share/mdadm/checkarray /dev/md0 Now I have Proxmox 3.1-114 running on a software RAID5 with mdadm |
|
|