Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: How to detect a defected disk?
Bence Toth wrote:
>
> Hello,
> We have many disks per system (more than 20). When a disk falls out I should find the defected
> disk. When I run fsck or dmesg (Solaris report utility), they just hang.
>
> Could you describe a method (on UNIX or Oracle level) that I (as non-root, dba) can use to
> identify the defected disk as quick as possible? We have SOLARIS 2.5, but I would thank for a
> general solution useable on other platforms, as well.
>
You could read from the raw device. You will need to be in group "sys" to do this.
#!/usr/local/bin/perl
# The raw slice to check. $disk = "c0d0s0"; # Where to start reading from. $offset = 0; # The number of bytes to read. $bytes = 512; # The buffer to store the bytes read. $buffer = ""; if (! open(DD, "/dev/rdsk/$disk") || ! sysread(DD, $buffer, $bytes, $offset)) { print "$disk isnt responding..\n"; } close(<DD>);
Regards
Peter Marelas
-- The Fulcrum Consulting Group Peter Marelas - Consultant 12/10-16 Queen St, Melbourne VIC 3000,Australia Ph: +61-3-9621-2100 PGP Key -> finger maral_at_fusion.mel.sprint.com.au Fx: +61-3-9621-2724Received on Sat Mar 22 1997 - 00:00:00 CST