Shiva <
subrama...@gmail.com> wrote in
news:b78886b5-c19d-454a...@googlegroups.com:
> I'd like to embark on a journey to find the size of all the
> files present in a sub volume. I'd like to build a macro that
> would do that. It would be pretty simple, as it would involve
> just getting the file info for those files and using set many to
> get the EOF, but I would like to convert the answer to our real
> life values. Like MB, GB etc.
EOF won't really help you. That just tells you where the EOF pointer is in the file, but gives
no indication of how much space the file is actually taking up on disk, other than as a lower
limit.
>
> So what's the math for that?
The space in bytes which a file takes up is given by
(primary extent size + secondary extent size * (extents allocated - 1)) * 2048
Divide by 1024 to get KB
Divide by 1024 again to get MB
Divide by 1024 a third time to get GB
>
> And also when I do a FUP VOLS, I get the following information
> about all the disks in the system.
>
> Volume, (M), TOTAL, FREE, % FREE, Free Extents (count), Free
> Extents (biggest)
>
> What does (M) mean in the above?
Whether the volume listed is the mirror volume, or not: Y means it's the mirror drive, blank
means the primary drive.
>And what does the free extents mean?
The "count" is the number of areas of free (unallocated) space on that disk, and "biggest"
means (you've probably guessed this already) the size of the largest chunk of free space
on that disk.
>I have seen that in the cup info <file-name>, detail. But
> I don't know much about the relation between extents, pages, max
> extents etc.. I have started reading the Enscribe programmer's
> guide a few days ago, and I still couldn't find any explanation
> for that (crossed some 40 pages now, of the 200 pages book).
> Possibly the FUP manual will have that information?
Every Guardian file has one primary extent, and 0 to (maxextents - 1) secondary extents,
which are allocated as needed to provide space for the data stored in the file. Primary and
secondary extents need not be the same size, although they frequently are. Extent sizes are
specified in pages; one page is 2048 bytes.