1753477 Members
4909 Online
108794 Solutions
New Discussion юеВ

Re: disk space

 
SOLVED
Go to solution
GuentherF
Trusted Contributor

Re: disk space

Wife-mode on...
Bob,

to get both used and allocated it is DIR/SIZE=ALL.

Wife-mode off. ;-)

Just in case there is a misconception: Any unused block of a disk cluster is included in the allocated space of the file.

/Guenther
Richard W Hunt
Valued Contributor

Re: disk space

First I would run ANALYZE/DISK/REPAIR at a time when the system is relatively idle. This will move hidden or otherwise unaccounted files to [SYSLOST]. It will also delete files marked for delete but not yet deleted. If you haven't done this in a while, the number can be pretty big, particularly if you experience lots of crashes or other improper shutdowns.

Then I would run something like SET FILE [000000...]*.*;* /TRUNCATE to reclaim any whole allocated but unused disk clusters. See below for a way to find out the number of files on a disk. Your expected slack space on an optimally allocated disk is equal to the number of files times 1/2 the size of a single disk allocation unit (disk cluster).

Then I would see if the REPAIR and TRUNCATE ops got back enough space to account for the missing space.

If that was not enough, I would try to do a BACKUP of the entire disk to some other disk or a fast tape device, then restore the disk. That will defrag the volume as much as it is possible to do so. Defragging will take care of losses caused by having too big an index file.

As a sanity check, look at the INDEXF.SYS allocation. There is usually less than 100 blocks of overhead in the INDEXF.SYS, mostly due to the index bitmap and the alternate copies of the home block and boot block.

After that, if the number of blocks in the INDEXF.SYS is WAY more than the number of files on the disk, you need to clean up the index file. FYI, a command such as DIR [000000...]*.*;*/TOTAL will give you a grand total line that tells you how many files are actually on the disk. On a good disk, 1 file requires the overhead of 1 block in INDEXF.SYS, so this DIR command would give you a feel for how big INDEXF.SYS should be, within a hundred blocks or so.

It is possible to have a huge allocation due to having a lot of little files or a lot of FRAGMENTED files (so badly fragmented as to become multi-header). A backup & restore will reduce these factors to the best possible state.
Sr. Systems Janitor
GuentherF
Trusted Contributor

Re: disk space

"SET FILE [000000...]*.*;* /TRUNCATE"

Dainger-dainger! Some applications do not like this to be done to their files. So be careful with this.

/Guenther
Robert Gezelter
Honored Contributor

Re: disk space

Gunther,

I guess that I was more asleep than I thought when I posted my comment about DIRECTORY/ALLOCATE.

Indeed, DIRECTORY accepts BOTH /SIZE:ALL and /SIZE:ALLOCATION (ALLOCATION only lists the allocated space, ALL lists both used and allocated). /SUMMARY will reduce the output to a single item per directory.

No offence taken and no apology needed. I was not careful enough when posting in the wee hours of the morning.

- Bob Gezelter, http://www.rlgsc.com