7
1
(1) mentions that "With a journal the file is first written to the journal, punch-in, and then the journal writes the file to disk when ready. Once it has successfully written to the disk, it is removed from the journal, punch-out, and the operation is complete."
So, when I create a file it's written to the journal and written to the disk later. If I create a file of 1MB, them actually 2MB of data is written to the disk, 1 MB to the journal and another to the disk later. This might actually decrease the lifespan of the disk. My question is when is data in the journal transferred to the disk? If it's not done immediately then subsequent reads for the data in the disk is not possible. Also, is the write complete to the user when the data is written to the journal or to the disk?
Also, there is a mention that because of the journaling the defragmentation in some of the file systems is less. How is disk defragmentation related to journal?
(1) http://www.howtogeek.com/howto/33552/htg-explains-which-linux-file-system-should-you-choose/
the journals can be in many locations in the clusters of the drive (non sequential) and they are not normally movable files, so they cannot be normally defragged. could still be defragged at boot, with a program that did that. – Psycogeek – 2011-10-04T13:46:26.930