Operating System - OpenVMS
1755056 Members
3030 Online
108829 Solutions
New Discussion юеВ

How to reset the error count of disk.

 
kumar sanjay_1
New Member

How to reset the error count of disk.

There is general Problem with disk error in VMS. if i analyze the error it will show me the type of errors, As I know the error count is stored in Badblk.sys in root directory. can I reset the error count without rebooting the system? Is there any way to reset the error count to make it zero?



$ sh dev dsa6012:

Device Device Error Volume Free Trans Mnt
Name Status Count Label Blocks Count Cnt
DSA6012: Mounted 0 VAX_app12 32 2 2
$4$DUA3300: (UKMH4D) ShadowSetMember 46 (member of DSA6012:)
$4$DUA3200: (UKMH3F) ShadowSetMember 2 (member of DSA6012:)


If I analyze the error log i will get this error.

DEVICE SUMMARY LOGGED BY SID 17000201

ERRORS TIMEOUTS UCB ERROR UCB OPERATION
[HARD] [SOFT] [HARD] [SOFT] COUNT COUNT

_$4$DUA3200:
""
0. 2. 0. 0. 0. 0.
------- ------- ------- ------- ------------ -------------
TOTALS 0. 2. 0. 0. 0. 0.

_$4$DUA3300:
""
0. 30. 0. 0. 0. 0.
------- ------- ------- ------- ------------ -------------
TOTALS 0. 30. 0. 0. 0. 0.

9 REPLIES 9
Karl Rohwedder
Honored Contributor

Re: How to reset the error count of disk.

If your VMS version is not too old you may use the SET DEVICE/RESET=(ERROR,OPERATION) command.
For older versions (and for VAXen) you may use the ZDEC utility (found on the Freeware V8).

regards Kalle
labadie_1
Honored Contributor

Re: How to reset the error count of disk.

$set device dsa200:/reset=error
will reset the error counter on recent Vms versions. For older versions, various hacks can be found on comp.os.vms for example.

Use with caution
:-)
kumar sanjay_1
New Member

Re: How to reset the error count of disk.

currently I am using the Open VMS 6.2
Karl Rohwedder
Honored Contributor

Re: How to reset the error count of disk.

The ZDEC utility works fine on V6,2, used it a lot before VMS was enhanced.
You find it here:
http://h71000.www7.hp.com/freeware/freeware80/zdec/

regards Kalle
Volker Halle
Honored Contributor

Re: How to reset the error count of disk.

Please note that the error count is NOT stored in any file on disk, but in the UCB (Unit Control Block) in memory.

You should analyze the errors with $ ANAL/ERROR without using /SUMMARY. Then decide based upon the error detail information, what should be done. Resetting the error count does not make the underlying HW problems go away.

Volker.
Guy Peleg
Respected Contributor

Re: How to reset the error count of disk.

Sanjay,

If you feel adventurous, you may write
a program to reset the error count.

A quick (and dirty) approach would be:

* assign a channel to the device.
* Call ioc$chan_to_ccb to get the CCB
* Get the address of the UCB from CCB$L_UCB
* set UCB$L_ERRCNT to 0

Guy Peleg
BRUDEN-OSSG
http://www.brudenossg.com
Volker Halle
Honored Contributor

Re: How to reset the error count of disk.

.. and don't forget to call $CMKRNL first and make real sure, you do not make any programming mistakes leading to exceptions ! That would also clear the error count - by a crash and reboot ;-)

Volker.
Guy Peleg
Respected Contributor

Re: How to reset the error count of disk.

The call to sys$cmkrnl is required
before accessing the UCB. IOC$CHAN_TO_CCB
can be called from user mode.

fwiw,

Guy Peleg
BRUDEN-OSSG
http://www.brudenossg.com
Ian Miller.
Honored Contributor

Re: How to reset the error count of disk.

Really adventurous people use XDELTA to clear device error counts :-)

However using zdec or clear_errors is a better idea.

http://h71000.www7.hp.com/freeware/freeware80/clear_errors/
____________________
Purely Personal Opinion