What is the journal?












8















I shut down my computer the hard way and next startup there was message on boot for several seconds saying recovering journal. Four startups later and the message was not there - only the first time. Looks like there are no consequences or side effects. Thanks to this question I know why it happened but nowhere on the internet says what the journal is. There are no problems with it, I'm just interested in what it is.










share|improve this question





























    8















    I shut down my computer the hard way and next startup there was message on boot for several seconds saying recovering journal. Four startups later and the message was not there - only the first time. Looks like there are no consequences or side effects. Thanks to this question I know why it happened but nowhere on the internet says what the journal is. There are no problems with it, I'm just interested in what it is.










    share|improve this question



























      8












      8








      8


      1






      I shut down my computer the hard way and next startup there was message on boot for several seconds saying recovering journal. Four startups later and the message was not there - only the first time. Looks like there are no consequences or side effects. Thanks to this question I know why it happened but nowhere on the internet says what the journal is. There are no problems with it, I'm just interested in what it is.










      share|improve this question
















      I shut down my computer the hard way and next startup there was message on boot for several seconds saying recovering journal. Four startups later and the message was not there - only the first time. Looks like there are no consequences or side effects. Thanks to this question I know why it happened but nowhere on the internet says what the journal is. There are no problems with it, I'm just interested in what it is.







      boot ext4






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Jan 12 at 20:33









      wjandrea

      9,09542362




      9,09542362










      asked Jan 12 at 19:51









      GarromGarrom

      3451218




      3451218






















          2 Answers
          2






          active

          oldest

          votes


















          5














          Many modern file systems employ a journal including NTFS, Ext3/4, XFS, HFS+, and others. The journal helps with two things, avoiding file system corruption and speeding up recovery after a failure such as a power loss or system crash. There are two major components to a file system, the data and the metadata. The data is the contents of a file, image, video, documents, and ultimately it is what gives the file system it's value. The metadata is what describes the structure of the filesystem including how files are named, stored in directories, access permissions, file modification times, and recording areas of the disk that are in use or are free to be allocated to other files as they grow or are created. If the metadata becomes corrupted because of a system crash, it could lead to further data loss/corruption. For example, part of the disk might be selected for allocation to a file, but if it's not recorded correctly before a crash, it might be added to the file's list of data blocks, but still in the list of free data blocks and allocated to a second file later on. Now, there are two files that are sharing the same data blocks/content.



          The journal is a place on the disk reserved for recording changes to the file system. The exact details of what is being changed it written first to the journal located in a single location on disk, then, after the journal is updated, the changes are applied to the appropriate locations on the disk which might require several writes. One the updates are done, the journal entry is marked as complete. After a crash, the system only need to examine the journal for incomplete entries and complete them to fix the file system. This speeds recovery and ensures a change is made entirely or not at all. If a block is allocated to a growing file, it will be added to the file's block list and also marked as in use.



          Also, on file systems that support journalling, most often it's only metadata journalling to preserve the structure, but not the data itself. Full data journalling is normally quite expensive and slow, but less crucial than metadata. It's possible to enable for data as well if needed.



          Also, to complete this, there are some file systems that don't currently offer journalling including FAT32, exFAT, Ext2, and UDF. If there's a crash during an update, a full scan of the filesystem needs to be done to track down any errors or corruption.






          share|improve this answer































            8















            Does someone knows what journal is?




            Part of a modern day filesystem is a feature called "journaling". We use "ext4" as a filesystem. (ext3, ext2 are older versions. NTFS is a Microsoft equivalent.)




            A journaling file system is a file system that keeps track of changes not yet committed to the file system's main part by recording the intentions of such changes in a data structure known as a "journal", which is usually a circular log. In the event of a system crash or power failure, such file systems can be brought back online more quickly with a lower likelihood of becoming corrupted




            Source: Wikipedia - Journaling file system, cites: IBM - Anatomy of Linux journaling file systems



            Basically the message means the system did an integrity check on this part of your filesystem. It is forced by the system, so generally there is nothing to worry about. When you have power cutoffs, the journal can get damaged and, unless your harddisk is really busted, tends to get repaired during this check.






            share|improve this answer





















            • 1





              Is it correct to say, that journaling is used to protect the filesystems integrity, but not necessarily the integrity of the files (their content)?

              – Ralf
              Jan 12 at 20:15






            • 2





              @Ralf: That depends solely on what is being journaled. JFFS2, for example, journals every write, thus, it protects the integrity of all data. Apple's HFS+ only journals filesystem metadata, thus it only protects filesystem metadata, but not file data. Ext4 is configurable: you can journal everything, nothing, or only filesystem metadata. The default setting is to journal, but only filesystem metadata. In that case, it only protects filesystem metadata, but not file data. The main reason for making this choice is that journaling means writing twice.

              – Jörg W Mittag
              Jan 12 at 21:37








            • 2





              The other extreme are so-called log-structured filesystems, which have only a journal. In other words, they only ever append to a journal, but they don't have a regular data area. That way, they avoid the "double write" of a journaling filesystem, but they now have the problem that the filesystem never shrinks, because even deletions are just appended to the journal. So, they need kind-of a "garbage collector" to clean out redundant journal entries and compact the journal again. (Some of those FS call this "vacuuming".)

              – Jörg W Mittag
              Jan 12 at 21:41






            • 1





              @JörgWMittag Thank you. I think it is important to understand, that journaling FS doesn't generally mean, that you can't loose data.

              – Ralf
              Jan 12 at 21:45






            • 1





              @Ralf: Yes, journaling does not protect you from data loss, only from data corruption. It only ensures that an operation either completely succeeds or does not happen at all, it does not guarantee that an operation always succeeds. And secondly, journaling only protects that which is journaled, which for most common implementations is only FS metadata.

              – Jörg W Mittag
              Jan 12 at 21:47











            Your Answer








            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "89"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1109205%2fwhat-is-the-journal%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            5














            Many modern file systems employ a journal including NTFS, Ext3/4, XFS, HFS+, and others. The journal helps with two things, avoiding file system corruption and speeding up recovery after a failure such as a power loss or system crash. There are two major components to a file system, the data and the metadata. The data is the contents of a file, image, video, documents, and ultimately it is what gives the file system it's value. The metadata is what describes the structure of the filesystem including how files are named, stored in directories, access permissions, file modification times, and recording areas of the disk that are in use or are free to be allocated to other files as they grow or are created. If the metadata becomes corrupted because of a system crash, it could lead to further data loss/corruption. For example, part of the disk might be selected for allocation to a file, but if it's not recorded correctly before a crash, it might be added to the file's list of data blocks, but still in the list of free data blocks and allocated to a second file later on. Now, there are two files that are sharing the same data blocks/content.



            The journal is a place on the disk reserved for recording changes to the file system. The exact details of what is being changed it written first to the journal located in a single location on disk, then, after the journal is updated, the changes are applied to the appropriate locations on the disk which might require several writes. One the updates are done, the journal entry is marked as complete. After a crash, the system only need to examine the journal for incomplete entries and complete them to fix the file system. This speeds recovery and ensures a change is made entirely or not at all. If a block is allocated to a growing file, it will be added to the file's block list and also marked as in use.



            Also, on file systems that support journalling, most often it's only metadata journalling to preserve the structure, but not the data itself. Full data journalling is normally quite expensive and slow, but less crucial than metadata. It's possible to enable for data as well if needed.



            Also, to complete this, there are some file systems that don't currently offer journalling including FAT32, exFAT, Ext2, and UDF. If there's a crash during an update, a full scan of the filesystem needs to be done to track down any errors or corruption.






            share|improve this answer




























              5














              Many modern file systems employ a journal including NTFS, Ext3/4, XFS, HFS+, and others. The journal helps with two things, avoiding file system corruption and speeding up recovery after a failure such as a power loss or system crash. There are two major components to a file system, the data and the metadata. The data is the contents of a file, image, video, documents, and ultimately it is what gives the file system it's value. The metadata is what describes the structure of the filesystem including how files are named, stored in directories, access permissions, file modification times, and recording areas of the disk that are in use or are free to be allocated to other files as they grow or are created. If the metadata becomes corrupted because of a system crash, it could lead to further data loss/corruption. For example, part of the disk might be selected for allocation to a file, but if it's not recorded correctly before a crash, it might be added to the file's list of data blocks, but still in the list of free data blocks and allocated to a second file later on. Now, there are two files that are sharing the same data blocks/content.



              The journal is a place on the disk reserved for recording changes to the file system. The exact details of what is being changed it written first to the journal located in a single location on disk, then, after the journal is updated, the changes are applied to the appropriate locations on the disk which might require several writes. One the updates are done, the journal entry is marked as complete. After a crash, the system only need to examine the journal for incomplete entries and complete them to fix the file system. This speeds recovery and ensures a change is made entirely or not at all. If a block is allocated to a growing file, it will be added to the file's block list and also marked as in use.



              Also, on file systems that support journalling, most often it's only metadata journalling to preserve the structure, but not the data itself. Full data journalling is normally quite expensive and slow, but less crucial than metadata. It's possible to enable for data as well if needed.



              Also, to complete this, there are some file systems that don't currently offer journalling including FAT32, exFAT, Ext2, and UDF. If there's a crash during an update, a full scan of the filesystem needs to be done to track down any errors or corruption.






              share|improve this answer


























                5












                5








                5







                Many modern file systems employ a journal including NTFS, Ext3/4, XFS, HFS+, and others. The journal helps with two things, avoiding file system corruption and speeding up recovery after a failure such as a power loss or system crash. There are two major components to a file system, the data and the metadata. The data is the contents of a file, image, video, documents, and ultimately it is what gives the file system it's value. The metadata is what describes the structure of the filesystem including how files are named, stored in directories, access permissions, file modification times, and recording areas of the disk that are in use or are free to be allocated to other files as they grow or are created. If the metadata becomes corrupted because of a system crash, it could lead to further data loss/corruption. For example, part of the disk might be selected for allocation to a file, but if it's not recorded correctly before a crash, it might be added to the file's list of data blocks, but still in the list of free data blocks and allocated to a second file later on. Now, there are two files that are sharing the same data blocks/content.



                The journal is a place on the disk reserved for recording changes to the file system. The exact details of what is being changed it written first to the journal located in a single location on disk, then, after the journal is updated, the changes are applied to the appropriate locations on the disk which might require several writes. One the updates are done, the journal entry is marked as complete. After a crash, the system only need to examine the journal for incomplete entries and complete them to fix the file system. This speeds recovery and ensures a change is made entirely or not at all. If a block is allocated to a growing file, it will be added to the file's block list and also marked as in use.



                Also, on file systems that support journalling, most often it's only metadata journalling to preserve the structure, but not the data itself. Full data journalling is normally quite expensive and slow, but less crucial than metadata. It's possible to enable for data as well if needed.



                Also, to complete this, there are some file systems that don't currently offer journalling including FAT32, exFAT, Ext2, and UDF. If there's a crash during an update, a full scan of the filesystem needs to be done to track down any errors or corruption.






                share|improve this answer













                Many modern file systems employ a journal including NTFS, Ext3/4, XFS, HFS+, and others. The journal helps with two things, avoiding file system corruption and speeding up recovery after a failure such as a power loss or system crash. There are two major components to a file system, the data and the metadata. The data is the contents of a file, image, video, documents, and ultimately it is what gives the file system it's value. The metadata is what describes the structure of the filesystem including how files are named, stored in directories, access permissions, file modification times, and recording areas of the disk that are in use or are free to be allocated to other files as they grow or are created. If the metadata becomes corrupted because of a system crash, it could lead to further data loss/corruption. For example, part of the disk might be selected for allocation to a file, but if it's not recorded correctly before a crash, it might be added to the file's list of data blocks, but still in the list of free data blocks and allocated to a second file later on. Now, there are two files that are sharing the same data blocks/content.



                The journal is a place on the disk reserved for recording changes to the file system. The exact details of what is being changed it written first to the journal located in a single location on disk, then, after the journal is updated, the changes are applied to the appropriate locations on the disk which might require several writes. One the updates are done, the journal entry is marked as complete. After a crash, the system only need to examine the journal for incomplete entries and complete them to fix the file system. This speeds recovery and ensures a change is made entirely or not at all. If a block is allocated to a growing file, it will be added to the file's block list and also marked as in use.



                Also, on file systems that support journalling, most often it's only metadata journalling to preserve the structure, but not the data itself. Full data journalling is normally quite expensive and slow, but less crucial than metadata. It's possible to enable for data as well if needed.



                Also, to complete this, there are some file systems that don't currently offer journalling including FAT32, exFAT, Ext2, and UDF. If there's a crash during an update, a full scan of the filesystem needs to be done to track down any errors or corruption.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Jan 13 at 3:01









                penguin359penguin359

                34624




                34624

























                    8















                    Does someone knows what journal is?




                    Part of a modern day filesystem is a feature called "journaling". We use "ext4" as a filesystem. (ext3, ext2 are older versions. NTFS is a Microsoft equivalent.)




                    A journaling file system is a file system that keeps track of changes not yet committed to the file system's main part by recording the intentions of such changes in a data structure known as a "journal", which is usually a circular log. In the event of a system crash or power failure, such file systems can be brought back online more quickly with a lower likelihood of becoming corrupted




                    Source: Wikipedia - Journaling file system, cites: IBM - Anatomy of Linux journaling file systems



                    Basically the message means the system did an integrity check on this part of your filesystem. It is forced by the system, so generally there is nothing to worry about. When you have power cutoffs, the journal can get damaged and, unless your harddisk is really busted, tends to get repaired during this check.






                    share|improve this answer





















                    • 1





                      Is it correct to say, that journaling is used to protect the filesystems integrity, but not necessarily the integrity of the files (their content)?

                      – Ralf
                      Jan 12 at 20:15






                    • 2





                      @Ralf: That depends solely on what is being journaled. JFFS2, for example, journals every write, thus, it protects the integrity of all data. Apple's HFS+ only journals filesystem metadata, thus it only protects filesystem metadata, but not file data. Ext4 is configurable: you can journal everything, nothing, or only filesystem metadata. The default setting is to journal, but only filesystem metadata. In that case, it only protects filesystem metadata, but not file data. The main reason for making this choice is that journaling means writing twice.

                      – Jörg W Mittag
                      Jan 12 at 21:37








                    • 2





                      The other extreme are so-called log-structured filesystems, which have only a journal. In other words, they only ever append to a journal, but they don't have a regular data area. That way, they avoid the "double write" of a journaling filesystem, but they now have the problem that the filesystem never shrinks, because even deletions are just appended to the journal. So, they need kind-of a "garbage collector" to clean out redundant journal entries and compact the journal again. (Some of those FS call this "vacuuming".)

                      – Jörg W Mittag
                      Jan 12 at 21:41






                    • 1





                      @JörgWMittag Thank you. I think it is important to understand, that journaling FS doesn't generally mean, that you can't loose data.

                      – Ralf
                      Jan 12 at 21:45






                    • 1





                      @Ralf: Yes, journaling does not protect you from data loss, only from data corruption. It only ensures that an operation either completely succeeds or does not happen at all, it does not guarantee that an operation always succeeds. And secondly, journaling only protects that which is journaled, which for most common implementations is only FS metadata.

                      – Jörg W Mittag
                      Jan 12 at 21:47
















                    8















                    Does someone knows what journal is?




                    Part of a modern day filesystem is a feature called "journaling". We use "ext4" as a filesystem. (ext3, ext2 are older versions. NTFS is a Microsoft equivalent.)




                    A journaling file system is a file system that keeps track of changes not yet committed to the file system's main part by recording the intentions of such changes in a data structure known as a "journal", which is usually a circular log. In the event of a system crash or power failure, such file systems can be brought back online more quickly with a lower likelihood of becoming corrupted




                    Source: Wikipedia - Journaling file system, cites: IBM - Anatomy of Linux journaling file systems



                    Basically the message means the system did an integrity check on this part of your filesystem. It is forced by the system, so generally there is nothing to worry about. When you have power cutoffs, the journal can get damaged and, unless your harddisk is really busted, tends to get repaired during this check.






                    share|improve this answer





















                    • 1





                      Is it correct to say, that journaling is used to protect the filesystems integrity, but not necessarily the integrity of the files (their content)?

                      – Ralf
                      Jan 12 at 20:15






                    • 2





                      @Ralf: That depends solely on what is being journaled. JFFS2, for example, journals every write, thus, it protects the integrity of all data. Apple's HFS+ only journals filesystem metadata, thus it only protects filesystem metadata, but not file data. Ext4 is configurable: you can journal everything, nothing, or only filesystem metadata. The default setting is to journal, but only filesystem metadata. In that case, it only protects filesystem metadata, but not file data. The main reason for making this choice is that journaling means writing twice.

                      – Jörg W Mittag
                      Jan 12 at 21:37








                    • 2





                      The other extreme are so-called log-structured filesystems, which have only a journal. In other words, they only ever append to a journal, but they don't have a regular data area. That way, they avoid the "double write" of a journaling filesystem, but they now have the problem that the filesystem never shrinks, because even deletions are just appended to the journal. So, they need kind-of a "garbage collector" to clean out redundant journal entries and compact the journal again. (Some of those FS call this "vacuuming".)

                      – Jörg W Mittag
                      Jan 12 at 21:41






                    • 1





                      @JörgWMittag Thank you. I think it is important to understand, that journaling FS doesn't generally mean, that you can't loose data.

                      – Ralf
                      Jan 12 at 21:45






                    • 1





                      @Ralf: Yes, journaling does not protect you from data loss, only from data corruption. It only ensures that an operation either completely succeeds or does not happen at all, it does not guarantee that an operation always succeeds. And secondly, journaling only protects that which is journaled, which for most common implementations is only FS metadata.

                      – Jörg W Mittag
                      Jan 12 at 21:47














                    8












                    8








                    8








                    Does someone knows what journal is?




                    Part of a modern day filesystem is a feature called "journaling". We use "ext4" as a filesystem. (ext3, ext2 are older versions. NTFS is a Microsoft equivalent.)




                    A journaling file system is a file system that keeps track of changes not yet committed to the file system's main part by recording the intentions of such changes in a data structure known as a "journal", which is usually a circular log. In the event of a system crash or power failure, such file systems can be brought back online more quickly with a lower likelihood of becoming corrupted




                    Source: Wikipedia - Journaling file system, cites: IBM - Anatomy of Linux journaling file systems



                    Basically the message means the system did an integrity check on this part of your filesystem. It is forced by the system, so generally there is nothing to worry about. When you have power cutoffs, the journal can get damaged and, unless your harddisk is really busted, tends to get repaired during this check.






                    share|improve this answer
















                    Does someone knows what journal is?




                    Part of a modern day filesystem is a feature called "journaling". We use "ext4" as a filesystem. (ext3, ext2 are older versions. NTFS is a Microsoft equivalent.)




                    A journaling file system is a file system that keeps track of changes not yet committed to the file system's main part by recording the intentions of such changes in a data structure known as a "journal", which is usually a circular log. In the event of a system crash or power failure, such file systems can be brought back online more quickly with a lower likelihood of becoming corrupted




                    Source: Wikipedia - Journaling file system, cites: IBM - Anatomy of Linux journaling file systems



                    Basically the message means the system did an integrity check on this part of your filesystem. It is forced by the system, so generally there is nothing to worry about. When you have power cutoffs, the journal can get damaged and, unless your harddisk is really busted, tends to get repaired during this check.







                    share|improve this answer














                    share|improve this answer



                    share|improve this answer








                    edited Jan 12 at 20:39









                    wjandrea

                    9,09542362




                    9,09542362










                    answered Jan 12 at 20:06









                    RinzwindRinzwind

                    206k28395527




                    206k28395527








                    • 1





                      Is it correct to say, that journaling is used to protect the filesystems integrity, but not necessarily the integrity of the files (their content)?

                      – Ralf
                      Jan 12 at 20:15






                    • 2





                      @Ralf: That depends solely on what is being journaled. JFFS2, for example, journals every write, thus, it protects the integrity of all data. Apple's HFS+ only journals filesystem metadata, thus it only protects filesystem metadata, but not file data. Ext4 is configurable: you can journal everything, nothing, or only filesystem metadata. The default setting is to journal, but only filesystem metadata. In that case, it only protects filesystem metadata, but not file data. The main reason for making this choice is that journaling means writing twice.

                      – Jörg W Mittag
                      Jan 12 at 21:37








                    • 2





                      The other extreme are so-called log-structured filesystems, which have only a journal. In other words, they only ever append to a journal, but they don't have a regular data area. That way, they avoid the "double write" of a journaling filesystem, but they now have the problem that the filesystem never shrinks, because even deletions are just appended to the journal. So, they need kind-of a "garbage collector" to clean out redundant journal entries and compact the journal again. (Some of those FS call this "vacuuming".)

                      – Jörg W Mittag
                      Jan 12 at 21:41






                    • 1





                      @JörgWMittag Thank you. I think it is important to understand, that journaling FS doesn't generally mean, that you can't loose data.

                      – Ralf
                      Jan 12 at 21:45






                    • 1





                      @Ralf: Yes, journaling does not protect you from data loss, only from data corruption. It only ensures that an operation either completely succeeds or does not happen at all, it does not guarantee that an operation always succeeds. And secondly, journaling only protects that which is journaled, which for most common implementations is only FS metadata.

                      – Jörg W Mittag
                      Jan 12 at 21:47














                    • 1





                      Is it correct to say, that journaling is used to protect the filesystems integrity, but not necessarily the integrity of the files (their content)?

                      – Ralf
                      Jan 12 at 20:15






                    • 2





                      @Ralf: That depends solely on what is being journaled. JFFS2, for example, journals every write, thus, it protects the integrity of all data. Apple's HFS+ only journals filesystem metadata, thus it only protects filesystem metadata, but not file data. Ext4 is configurable: you can journal everything, nothing, or only filesystem metadata. The default setting is to journal, but only filesystem metadata. In that case, it only protects filesystem metadata, but not file data. The main reason for making this choice is that journaling means writing twice.

                      – Jörg W Mittag
                      Jan 12 at 21:37








                    • 2





                      The other extreme are so-called log-structured filesystems, which have only a journal. In other words, they only ever append to a journal, but they don't have a regular data area. That way, they avoid the "double write" of a journaling filesystem, but they now have the problem that the filesystem never shrinks, because even deletions are just appended to the journal. So, they need kind-of a "garbage collector" to clean out redundant journal entries and compact the journal again. (Some of those FS call this "vacuuming".)

                      – Jörg W Mittag
                      Jan 12 at 21:41






                    • 1





                      @JörgWMittag Thank you. I think it is important to understand, that journaling FS doesn't generally mean, that you can't loose data.

                      – Ralf
                      Jan 12 at 21:45






                    • 1





                      @Ralf: Yes, journaling does not protect you from data loss, only from data corruption. It only ensures that an operation either completely succeeds or does not happen at all, it does not guarantee that an operation always succeeds. And secondly, journaling only protects that which is journaled, which for most common implementations is only FS metadata.

                      – Jörg W Mittag
                      Jan 12 at 21:47








                    1




                    1





                    Is it correct to say, that journaling is used to protect the filesystems integrity, but not necessarily the integrity of the files (their content)?

                    – Ralf
                    Jan 12 at 20:15





                    Is it correct to say, that journaling is used to protect the filesystems integrity, but not necessarily the integrity of the files (their content)?

                    – Ralf
                    Jan 12 at 20:15




                    2




                    2





                    @Ralf: That depends solely on what is being journaled. JFFS2, for example, journals every write, thus, it protects the integrity of all data. Apple's HFS+ only journals filesystem metadata, thus it only protects filesystem metadata, but not file data. Ext4 is configurable: you can journal everything, nothing, or only filesystem metadata. The default setting is to journal, but only filesystem metadata. In that case, it only protects filesystem metadata, but not file data. The main reason for making this choice is that journaling means writing twice.

                    – Jörg W Mittag
                    Jan 12 at 21:37







                    @Ralf: That depends solely on what is being journaled. JFFS2, for example, journals every write, thus, it protects the integrity of all data. Apple's HFS+ only journals filesystem metadata, thus it only protects filesystem metadata, but not file data. Ext4 is configurable: you can journal everything, nothing, or only filesystem metadata. The default setting is to journal, but only filesystem metadata. In that case, it only protects filesystem metadata, but not file data. The main reason for making this choice is that journaling means writing twice.

                    – Jörg W Mittag
                    Jan 12 at 21:37






                    2




                    2





                    The other extreme are so-called log-structured filesystems, which have only a journal. In other words, they only ever append to a journal, but they don't have a regular data area. That way, they avoid the "double write" of a journaling filesystem, but they now have the problem that the filesystem never shrinks, because even deletions are just appended to the journal. So, they need kind-of a "garbage collector" to clean out redundant journal entries and compact the journal again. (Some of those FS call this "vacuuming".)

                    – Jörg W Mittag
                    Jan 12 at 21:41





                    The other extreme are so-called log-structured filesystems, which have only a journal. In other words, they only ever append to a journal, but they don't have a regular data area. That way, they avoid the "double write" of a journaling filesystem, but they now have the problem that the filesystem never shrinks, because even deletions are just appended to the journal. So, they need kind-of a "garbage collector" to clean out redundant journal entries and compact the journal again. (Some of those FS call this "vacuuming".)

                    – Jörg W Mittag
                    Jan 12 at 21:41




                    1




                    1





                    @JörgWMittag Thank you. I think it is important to understand, that journaling FS doesn't generally mean, that you can't loose data.

                    – Ralf
                    Jan 12 at 21:45





                    @JörgWMittag Thank you. I think it is important to understand, that journaling FS doesn't generally mean, that you can't loose data.

                    – Ralf
                    Jan 12 at 21:45




                    1




                    1





                    @Ralf: Yes, journaling does not protect you from data loss, only from data corruption. It only ensures that an operation either completely succeeds or does not happen at all, it does not guarantee that an operation always succeeds. And secondly, journaling only protects that which is journaled, which for most common implementations is only FS metadata.

                    – Jörg W Mittag
                    Jan 12 at 21:47





                    @Ralf: Yes, journaling does not protect you from data loss, only from data corruption. It only ensures that an operation either completely succeeds or does not happen at all, it does not guarantee that an operation always succeeds. And secondly, journaling only protects that which is journaled, which for most common implementations is only FS metadata.

                    – Jörg W Mittag
                    Jan 12 at 21:47


















                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Ask Ubuntu!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1109205%2fwhat-is-the-journal%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    MongoDB - Not Authorized To Execute Command

                    Npm cannot find a required file even through it is in the searched directory

                    in spring boot 2.1 many test slices are not allowed anymore due to multiple @BootstrapWith