Find out the failed disk

 
Thread Tools Search this Thread
Operating Systems Linux Red Hat Find out the failed disk
# 1  
Old 04-17-2012
Find out the failed disk

Hi Masters,

How to find out the failed disk in redhat linux (OR)
How to decalare whether our hard disk goes bad ?

My option is:

dmesg | grep "failed"
check in /var/log/messages with the kernel error.

Please corrrect me if im wrong.

And also i heard "smartctl" command. But it's difficult to understand. Please help me out how to use this command ...

Any reply(s) would be a great !!!

Thanks !
# 2  
Old 09-17-2012
Code:
#!/bin/bash

# Who should e-mails about failure go to
MAILTO='admin@domain.com'

LOG_FILE=/root/raid.log
OK_FILE=/root/raid.ok

# If OK file doesn't exist create it
if [ ! -e $OK_FILE ]; then
cat /proc/mdstat > $OK_FILE
fi

rm -f $LOG_FILE

SYSTEM=`uname --nodename`

cat /proc/mdstat > $LOG_FILE

DIFF=`diff $OK_FILE $LOG_FILE | wc -l `

if [ $DIFF -ne 0 ]; then
echo "RAID failed"
mail -s "URGENT: RAID disk failure detected on $SYSTEM" $MAILTO < $LOG_FILE
else
echo "RAID OK"
fi
exit 0


Last edited by Corona688; 09-17-2012 at 01:11 PM..
# 3  
Old 09-25-2012
#hpacucli ctrl all show config execute as root.

this will clearly show the status of the disks.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Replacing a failed disk using SVM

Hi Please can you help me on replacing or removing a faulty disk drive on a SUN NETRA X4250server with 4 internal drives only. the format comand show me the following: format Searching for disks...done AVAILABLE DISK SELECTIONS: 0. c0t0d0 <drive type unknown> ... (9 Replies)
Discussion started by: fretagi
9 Replies

2. AIX

Failed Disk,unable to varyonvg

Iam new to AIX I am unable varyonvg on the vios,some of the disk are reported as harware failure. I am going to replace the disk,Please tell me how to remove the disk without any corruption in the VG lspv -l hdiskx also didn't work (0 Replies)
Discussion started by: roayaix
0 Replies

3. Solaris

Recover failed system disk

I have an oldish Solaris 10 system (SunFire x4240), which due to a recent heating event in the server room, lost it's system disk. I have rsync backups of all the other (data) disks, but apparently I do not have a backup of /. :-( I can start the machine up in failsafe mode, but running fsck on... (4 Replies)
Discussion started by: jj5406
4 Replies

4. UNIX for Advanced & Expert Users

read sectors from disk failed with timeout

i'm writing some code to simulate the boot progress after power on but when i try to read the 2nd sector from a floppy disk, this operation always fail with ah=0x80h which means timeout, how can i get over this problem? my code would be like this: $ cat boot.S .code16 #define SETUPLEN 4... (0 Replies)
Discussion started by: wljackhero
0 Replies

5. Linux

read sectors from disk failed with timeout

i'm writing some code to simulate the boot progress after power on but when i try to read the 2nd sector from a floppy disk, this operation always fail with ah=0x80h which means timeout, how can i get over this problem? my code would be like this: $ cat boot.S .code16 #define SETUPLEN 4... (0 Replies)
Discussion started by: wljackhero
0 Replies

6. Boot Loaders

read sectors from disk failed with timeout

i'm writing some code to simulate the boot progress after power on but when i try to read the 2nd sector from a floppy disk, this operation always fail with ah=0x80h which means timeout, how can i get over this problem? my code would be like this: $ cat boot.S .code16 #define SETUPLEN 4... (0 Replies)
Discussion started by: wljackhero
0 Replies

7. Solaris

Cannot remove and replace failed disk

-bash-3.00# zpool detach zonepool c1t1d0 cannot detach c1t1d0: only applicable to mirror and replacing vdevs -bash-3.00# zpool remove zonepool c1t1d0 cannot remove c1t1d0: only inactive hot spares, cache, top-level, or log devices can be removed -bash-3.00# zpool offline zonepool c1t1d0... (3 Replies)
Discussion started by: LittleLebowski
3 Replies

8. Solaris

How to replace failed disk?

Dear all Please can any one explain me how to replace failed disk in Solaris 10. Please tell me the step by step procedure. (9 Replies)
Discussion started by: suneelieg
9 Replies

9. Solaris

How can we confirm that, the disk has failed in Solaris?

Hi All, Seems to be one of the disk has failed on my Solaris server. How do i confirm that disk has really failed or not? Here are alert details. ------- iostat -En out/put c1t3d0 Soft Errors: 1884 Hard Errors: 153 Transport Errors: 54 Vendor: FUJITSU Product:... (3 Replies)
Discussion started by: Naresh Kommina
3 Replies

10. UNIX for Advanced & Expert Users

Scsi Disk Failed

My WS boot disk has failed so when i want to boot system (by OK boot -s or Ok boot disk0 ) i get these mesgs: disk read error boot :can not find misc/sparc9v/krtld boot:error loading interperetor (misc/sparc9v/krtld) Elf64 read error. boot failed. although it's probed ,finally i try... (1 Reply)
Discussion started by: nikk
1 Replies
Login or Register to Ask a Question