i am having issues with logrotate rotating a log file that is being constantly written to. i am using copytruncate option and it gets the job done properly on first rotation but after that, all new rotations leave a file with binary data at the top and OS shows file size bigger than before. binary data means i have missed the logs and i might be ok with that but increasing file does not make any sense.
also, when i view size using "du -ah" the sizes seem ok i.e. new files size are lower compared to the rotated ones but displaying same sizes using "ls -lh" shows increased sizes.
i think the OS still sees all of those a single file but i could be wrong.
please help me out in this matter.