From kernel.shubham at gmail.com Sun Jan 20 14:09:24 2013 From: kernel.shubham at gmail.com (shubham) Date: Sun, 20 Jan 2013 19:39:24 +0530 Subject: Journal abortion in ext3 and its relation with remounting In-Reply-To: <509A8F38.5050202@gmail.com> References: <509A8F38.5050202@gmail.com> Message-ID: <50FBFA94.8050502@gmail.com> I was looking at the code of ext3 file system and found some strange implementation there : Can someone let me know the validity of below statements and with reasoning : 1. I found that it might also happen that journal is aborted but not re-mounted 2. Journal gets aborted but it might be possible to mount it in read-write mode. 3. Can we write some data on the partition where journal is aborted. One more question, how unlinked inode is handled by ext3 ? Regards Shubham From tytso at mit.edu Mon Jan 21 02:42:04 2013 From: tytso at mit.edu (Theodore Ts'o) Date: Sun, 20 Jan 2013 21:42:04 -0500 Subject: Journal abortion in ext3 and its relation with remounting In-Reply-To: <50FBFA94.8050502@gmail.com> References: <509A8F38.5050202@gmail.com> <50FBFA94.8050502@gmail.com> Message-ID: <20130121024204.GB9886@thunk.org> On Sun, Jan 20, 2013 at 07:39:24PM +0530, shubham wrote: > I was looking at the code of ext3 file system and found some strange > implementation there : > > Can someone let me know the validity of below statements and with > reasoning : > > 1. I found that it might also happen that journal is aborted but not > re-mounted > 2. Journal gets aborted but it might be possible to mount it in > read-write mode. > 3. Can we write some data on the partition where journal is aborted. Sorry, I'm not at all sure what you're asking. Can you go into more detail about what you're concerned about? Since I'm guessing English is not your first language, perhaps you can demonstrates with a series of commands which triggers what you think could happen? Or point at the explicit C code that for which you have questions? > One more question, how unlinked inode is handled by ext3 ? Handled in what way? Again, what are you wondering about? - Ted From kernel.shubham at gmail.com Mon Jan 21 15:18:23 2013 From: kernel.shubham at gmail.com (shubham) Date: Mon, 21 Jan 2013 20:48:23 +0530 Subject: Journal abortion in ext3 and its relation with remounting In-Reply-To: <20130121024204.GB9886@thunk.org> References: <509A8F38.5050202@gmail.com> <50FBFA94.8050502@gmail.com> <20130121024204.GB9886@thunk.org> Message-ID: <50FD5C3F.7010205@gmail.com> I have RHEL-5.8 installed server. Due to some inconsistent read write operation, ext3 journal got corrupted and aborted but filesystem was not remounted read only. In my understanding when there is ext3 journal has some corruption then it should mount the filesystem read only . So, I want to know in what cases this will not happen. For unlinked inodes, I want to know the logic of handling unlinked inodes in filesystem. For an ex: - Situation where unlinked inode will be found. - How ext3 identifies unlinked inode ? - What ext3 does when it sees an unlinked inode. Regards Shubham On 21-Jan-13 8:12 AM, Theodore Ts'o wrote: > On Sun, Jan 20, 2013 at 07:39:24PM +0530, shubham wrote: >> I was looking at the code of ext3 file system and found some strange >> implementation there : >> >> Can someone let me know the validity of below statements and with >> reasoning : >> >> 1. I found that it might also happen that journal is aborted but not >> re-mounted >> 2. Journal gets aborted but it might be possible to mount it in >> read-write mode. >> 3. Can we write some data on the partition where journal is aborted. > Sorry, I'm not at all sure what you're asking. Can you go into more > detail about what you're concerned about? > > Since I'm guessing English is not your first language, perhaps you can > demonstrates with a series of commands which triggers what you think > could happen? Or point at the explicit C code that for which you have > questions? > >> One more question, how unlinked inode is handled by ext3 ? > Handled in what way? Again, what are you wondering about? > > - Ted From rwheeler at redhat.com Mon Jan 21 15:23:41 2013 From: rwheeler at redhat.com (Ric Wheeler) Date: Mon, 21 Jan 2013 10:23:41 -0500 Subject: Journal abortion in ext3 and its relation with remounting In-Reply-To: <50FD5C3F.7010205@gmail.com> References: <509A8F38.5050202@gmail.com> <50FBFA94.8050502@gmail.com> <20130121024204.GB9886@thunk.org> <50FD5C3F.7010205@gmail.com> Message-ID: <50FD5D7D.90802@redhat.com> On 01/21/2013 10:18 AM, shubham wrote: > I have RHEL-5.8 installed server. > > Due to some inconsistent read write operation, ext3 journal got corrupted and > aborted but filesystem was not remounted read only. > In my understanding when there is ext3 journal has some corruption then it > should mount the filesystem read only . > So, I want to know in what cases this will not happen. > > For unlinked inodes, I want to know the logic of handling unlinked inodes in > filesystem. > > For an ex: > - Situation where unlinked inode will be found. > - How ext3 identifies unlinked inode ? > - What ext3 does when it sees an unlinked inode. > > Regards > Shubham Hi Shubham, If you are a Red Hat customer, you can always contact Red Hat Support. Upstream lists can be helpful with ext3 in general, but we carry a lot of backports in RHEL kernels that most upstream focused developers don't usually have to pay attention to. Best regards, Ric > > On 21-Jan-13 8:12 AM, Theodore Ts'o wrote: >> On Sun, Jan 20, 2013 at 07:39:24PM +0530, shubham wrote: >>> I was looking at the code of ext3 file system and found some strange >>> implementation there : >>> >>> Can someone let me know the validity of below statements and with >>> reasoning : >>> >>> 1. I found that it might also happen that journal is aborted but not >>> re-mounted >>> 2. Journal gets aborted but it might be possible to mount it in >>> read-write mode. >>> 3. Can we write some data on the partition where journal is aborted. >> Sorry, I'm not at all sure what you're asking. Can you go into more >> detail about what you're concerned about? >> >> Since I'm guessing English is not your first language, perhaps you can >> demonstrates with a series of commands which triggers what you think >> could happen? Or point at the explicit C code that for which you have >> questions? >> >>> One more question, how unlinked inode is handled by ext3 ? >> Handled in what way? Again, what are you wondering about? >> >> - Ted > > _______________________________________________ > Ext3-users mailing list > Ext3-users at redhat.com > https://www.redhat.com/mailman/listinfo/ext3-users From tytso at mit.edu Mon Jan 21 15:55:18 2013 From: tytso at mit.edu (Theodore Ts'o) Date: Mon, 21 Jan 2013 10:55:18 -0500 Subject: Journal abortion in ext3 and its relation with remounting In-Reply-To: <50FD5C3F.7010205@gmail.com> References: <509A8F38.5050202@gmail.com> <50FBFA94.8050502@gmail.com> <20130121024204.GB9886@thunk.org> <50FD5C3F.7010205@gmail.com> Message-ID: <20130121155518.GA10270@thunk.org> On Mon, Jan 21, 2013 at 08:48:23PM +0530, shubham wrote: > I have RHEL-5.8 installed server. > > Due to some inconsistent read write operation, ext3 journal got > corrupted and aborted but filesystem was not remounted read only. > In my understanding when there is ext3 journal has some corruption > then it should mount the filesystem read only . > So, I want to know in what cases this will not happen. It will be remounted read-only if the file system has been configured to do so. See the man page for tune2fs, and it's documentation abouts its -e option, which allows you to set the behavior when a file system corruption is detected. You can configure the superblock so that on detection of a fs corruption, it will either continue (this is the "don't worry, be happy" option), remount the file system read-only, or panic the kernel. (The last might be appropriate if you have a high availability setup where a backup system can take cover immediately; in that case, a panic and reboot so the file system can be repaired using fsck might be the best thing to do.) > For unlinked inodes, I want to know the logic of handling unlinked > inodes in filesystem. > > For an ex: > - Situation where unlinked inode will be found. > - How ext3 identifies unlinked inode ? > - What ext3 does when it sees an unlinked inode. I assume what you mean by this is when a directory discovers a file name which points at a deleted inode? In that case, it will log a file system error, which will cause an EXT3-fs error message to appear in the system log, and then either reboot, remount read-only, or continue. Regards, - Ted