Quản trị net diễn đàn chia sẻ thông tin các thủ thuật mạng, internet bảo mật thông tin dành cho giới IT VIệt hy vọng là nơi bổ ích cho cộng đồng

Quản trị net diễn đàn chia sẻ thông tin các thủ thuật mạng, internet bảo mật thông tin dành cho giới IT VIệt hy vọng là nơi bổ ích cho cộng đồng (http://quantrinet.com/forum/index.php)
-   Software Raid, Software SAN... (http://quantrinet.com/forum/forumdisplay.php?f=279)
-   -   Giám sát Linux software raid qua email (smart monitoring) (http://quantrinet.com/forum/showthread.php?t=9609)

hoctinhoc 08-04-2014 04:03 PM

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


:battay:


Bây giờ là 06:15 PM. Giờ GMT +7

Diễn đàn tin học QuantriNet
quantrinet.com | quantrimang.co.cc
Founded by Trương Văn Phương | Developed by QuantriNet's members.
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.