From:	SMTP%"mainedw@hsdvxa.hsd.utc.com" 20-OCT-1994 18:15:36.58
To:	EVERHART
CC:	
Subj:	RE: Problem with disk free block counts

X-Newsgroups: comp.os.vms
From: mainedw@hsdvxa.hsd.utc.com
Subject: RE: Problem with disk free block counts
Message-ID: <1994Oct20.194456.10645@cronkite.res.utc.com>
Keywords: rebuild,force
Lines: 84
Sender: news@cronkite.res.utc.com
Nntp-Posting-Host: 60.0.0.233
Organization: HSD
Date: Thu, 20 Oct 1994 10:28:36 GMT
To: Info-VAX@Mvb.Saic.Com
X-Gateway-Source-Info: USENET

In Article <1994Oct20.133112.116@southpower.co.nz>
fowlerk@southpower.co.nz (Ken Fowler - Systems Administrator) writes:
>
>For some reason the free block count (from sh dev d) lately got way out of
>synch with the actual free space that is on the disk.  I am not sure why,
>it is not due to system crash or an impropper dismount etc.  This caused us
>problems when a directory tried to extend.
>
>At first I thought the problem was due to insufficent contiguous free space
>but that was not the case.  I then did a "set volume/rebuild=force" on the
>disk and like magic, the free block count went from about 50,000 free to 0.
>
>1.  Has anyone seen the free block count get out of synch like this??
>
>2.  I am not sure exactly how "set volume/rebuild=force" works and the docs
>    didn't help either.  Do I need to execute it on all volume set
>    members?? or does the command automatically fix the other members in
>    the volume set??  Is the "force" option necessary??
>
>

We have also seen this problem at our site. We only see it (or more likely
only notice it) when we delete a database backup file and do not recover the
space (1.5 Million blocks). The machine in question is running VMS V5.3, the
/REBUILD=FORCE option wasn't there, but a patch was available (specifically
CSCPAT_0184014).

Some key sections from the release notes:

     1. There are a number of problem reports raised against the free block
        count on disks.  After investigation, the free blocks count discrepancy 
        is most often seen in a cluster environment.  The $SHOW DEVICE displays 
        the count from the disk volume's lock value block on the primary node.  
        If the primary node is lost during the cluster transition, and a new 
        primary node is formed, the correct value kept on the lost primary node 
        is no longer available to the new primary node.  This causes the count 
        to be incorrect on the new primary node.


	SET VOLUME/REBUILD[=option]

          /REBUILD

              Recovers caching limits for a volume that was improperly 
              dismounted.

              If a disk volume was dismounted improperly (such as during a  
	      system failure),  and  was then remounted with the 
              MOUNT/NOREBUILD command, you can use SET VOLUME/REBUILD to 
              recover the caching  that  was  in effect at the time of the 
              dismount.  As a result, this will update  the correct count in 
              the disk volume's lock value block.

              Now with the new SET.CLD and SET.EXE you can specify 
              the following option to /REBUILD:

                FORCE      Forces a rebuild to occur unconditionally

	      NOFORCE      Same as /REBUILD (default)

           /NOREBUILD	   No change

        Therefore, $SET VOLUME/REBUILD=FORCE  will " force " the volume 
        to be rebuilt unconditionally when the FORCE option is 
        issued.  As a result, this will update the correct count in the 
        disk volume's lock value block.
	
	This action should be taken by the operator when the disk
        freeblocks discrepancy is discovered, e.g., user thought there
        was enough space on the disk for the file operation based on
        the given free block count, when in reality there was not.
  
        In addition it is recommended to take  this action following a cluster
        state transition, specifically if a new primary node is formed for
        a mounted disk volume.
     

The way Colorado described the rebuild to me, when you say /REBUILD the
system decides whether or not to do anything. Therefore we didn't get anywhere
until we installed the patch and could FORCE the rebuild to take place.

Dale Maine                          !
Hamilton Standard                   !  Your message can appear here!
Division of United Technologies     !
