“Mitchell Schoenbrun” <firstname.lastname@example.org> wrote in message
First off… Sorry, it’s not really feasible to be doing a chkfsys on
production system (unless I want to come in at 3:00am and shut
down). BUT, I’m fairly certain the file system isn’t corrupt… we
had any bad data files for a very long time. I personally check on that
Corruption can take many forms. If for example you have ever turn ed the
power off while the system had files open it is possble that you’ve
created orphan sectors. These are sectors marked as used, but not
part of any file or directory. CHKFSYS is very good at recovering these.
You can intentionally create orphan’s with the ZAP command. If you have
a leak somehow, via ZAP maybe, eventually you will lose your entire hard
disk and then your system will stop in the middle of the day.
Thanks for your concern… I assure you, I’m a very prudent person. If
there was any practical way I could run chkfsys, I would. But, I’m 99% sure
this isn’t a file system corruption problem. I have run chkfsys on this
node previously, after I started noticing the disk usage discrepancies.
There was no corruption.
One thing I don’t know is how to turn off Fsys preallocation. Is it an
Fsys option? Ideally, I’d like to be able to tune it… or even better
access to some sort of ioctl mechanism, so it could be handles on a file
There does not seem to be an Fsys option to control preallocation. It
to work quite well, and I don’t know any reason why you would want to turn
off. The alternative would be to speed up fragmenation on your disk. You
however make an end run around it if you want. To do this, never just
open a file
and write to it. Instead, preallocate your files yourself. Open them for
create as large a file as you will need and then close the file. Then
file in update mode. You will have to keep track of the end of file
This is probably not what you are looking for.
Thanks for confirming that… I’m not blind! Yes, I agree, it does work
quite well. That’s why I’d prefer to tune it or deal with it on an
individual file basis.
One other thing I don’t know for sure… does the preallocation work on
open files or is it part of Fsys’ caching mechanism e.g. extends/exists
beyond a close of a file.
When you close a file properly, there should be no extra allocated
There may be some unallocated bytes in the last sector.
David’s response seems to contradict that… I’ll be investigating further.
The reason I ask is, we are a transaction
acquirer. We have a lot of (not so small) files. The basic method used
transaction logging is to open in append mode, write a transaction and
the file. At any given moment there really aren’t a lot of files open
the system, but over an extended period there are hundreds of files
appended to regularly.
This is likely to cause a lot of fragmentation on your disk.
I wonder if this is causing the system to create so many
inodes that they are leaching sectors from your system. Try
“ls -x” on one of your files. If the 2nd number is very
large then this may be your problem.
I totally undestand and agree. For transaction files, no it’s not a big
number. I’m beginning to conclude that “normal” append mode writes aren’t
the problem here.
Also, do you or anyone else out there know of any utilities I could use
diagnose this problem? The only thing that I’ve run across is the -x
to ls. And you know what… it’s got the ‘G’ flag set for all our
transactions files (Meaning an extent is reserved beyond the EOF)…
I’d really like to know how big that preallocated extent is on a file by
I recall Bill Flowers explaining that it is situation dependent. For
lets say you open a file and write 10 sequential sectors. The system
preallocate 10 more. If you keep on writing sequential sectors, the
preallocates larger and large blocks up to some limit. I don’t think the
itself is all that large compared to the size of a disk.
OK… now I’ll really through a wrench in all this…
We run redundant processing centers. Any transaction that hits one
processing center gets replicated to the other processing center. The
counter part to the node in question is pretty much a mirror, file
wise. Running a ‘df’ on that node reports 45% used for /u. Which is
would expect… it matches the ‘du -k’… ‘ls -x’ shows a ‘G’ for all
transaction files there also??
I think the G is probably just telling you that the file is open and being
written to. How is the 2nd machine mirror’d. Do the transactions come in
one by one, or are they updated in blocks?
A single transaction at a time. Transaction processing is identical on both
systems. Again, I don’t think append mode writes are the problem here.
See my database comments/suspicions in another reply.
The only other variable I can think of is there are more database
running on the node I’m having problems with (it’s counter part just
copies of the database files, but not the active processes). There
very may files associated with this, but they are always open. When
grow, they do so in rather large chunks (like 100-300k at a time). I
what the algorithm is for preallocation? Is it some multiple of the
requested extent/last write past EOF?
I think it is something like this.
Mitchell Schoenbrun --------- > email@example.com