Thanks for the answer.
I'm sorry I should have been more precise. In my case the files are more
than a couple of days old and they are not the last modified on the system,
is this still the desired behaviour?
Do you mean that the order and time the log records are written to disk
could not be the reason why my files have been truncated? Just out of
curiousity, where can I find information on what exactly the order and
timing of log records disk writes depend on? I read in this (
https://www.usenix.org/events/usenix05/tech/general/full_papers/prabhakaran/prabhakaran.pdf)
document that the journal writes are not triggered by the ordinary kupdate
deamon timer and that they are postponed indefinitely. If I understand
correctly the journal memory buffer should be written to disk when the
buffer is full or when there are sync activity or the partition is
unmounted. Since there have been a lot of disk activity after the files in
questions have been written to, and the files created after these files
still exist and have its content intact, it seems strange that this is, by
design, causing the logredo to truncate my files since their corresponding
transactions already should be comitted to disk and not considered in the
replay of the log, right?
The page cache flusher parameters sounds very interesting, what exactly is
this?
I do not need a ponies flag, just something to improve the situation a
little. I would be willing to accept that files were truncated, but not
files that are more than a couple of hours old. The best solution for me
would be something without having to modify the source of my own
applications if possible. Patching the kernel or jfsutils or modifying some
parameter would be better for my particular situation.
Regarding the fsync approach, would it be possible to do this system wide
or does it have to be the process holding the filedescriptor to that
particular file? I'm thinking something like a separate process with a
timer that issues a fsync every 10 min or so?
Regards
Mikael Liljeroth
2012/7/15 Peter Grandi <[email protected]>
> > Hi, I have a problem with my JFS partition and I have a couple
> > of questions. After an unclean unmount and a restart a couple
> > of files have been truncated to size 0.
>
> In virtually every case that is desired behavior, it is not a
> problem.
>
> > What could be the reason for these 0 sized files? [ ... ]
>
> O_PONIES. http://lwn.net/Articles/351422/
>
> > What I don't understand is when and in what order the log
> > records are written to disk.
>
> That depends, and does not matter.
>
> > Is there any way of preventing this from happening in the
> > future.
>
> Setting 'hdparm -W 0' and mounting with '-o sync' is the only
> safe way, with any filesystem type.
>
> Otherwise there are varying degrees of lower safety, such as
> modifying the applications you use to 'fsync' at the right
> times, or changing page cache flusher parameters.
>
> Whether people like it or not there is a (really huge) tradeoff
> between throughput and latency/safety as to how often writes are
> flushed to disk.
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Jfs-discussion mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/jfs-discussion
>
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Jfs-discussion mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jfs-discussion