Is there a way to identify filesystem ext3 data mode ?
I am trying to identify which data mode is being set for my ext3 filesystem. I didn't install my OS. So is there a way that using some command or tool I can use to get info about my ext3 filesystem and which data mode (Ordered. journal, writeback) is being used.
The purpose of this is to then find out a reliable solution to secure delete/erase files on my system. Thanks in advance |
try looking into your /etc/fstab or menu.lst to see if you see anything like data=[option here] you can also use options like this to set it to what you want.
Code:
tune2fs -o journal_data_writeback /dev/hda2 |
tune2fs will show you the fs features.
|
I found in http://batleth.sapienti-sat.org/proj.../ext3-faq.html a description of the journaling modes (which you clearly already know, since you are asking this advanced a question).
If you look in your /var/log/messages, you should see something like this: Nov 22 17:01:55 athlon4k6 kernel: EXT3 FS on sda2, internal journal Nov 22 17:01:55 athlon4k6 kernel: EXT3-fs: mounted filesystem with ordered data mode. Nov 22 17:01:55 athlon4k6 kernel: kjournald starting. Commit interval 5 seconds Nov 22 17:01:55 athlon4k6 kernel: EXT3 FS on sda1, internal journal Nov 22 17:01:55 athlon4k6 kernel: EXT3-fs: mounted filesystem with ordered data mode. Nov 22 17:01:55 athlon4k6 kernel: kjournald starting. Commit interval 5 seconds Nov 22 17:01:55 athlon4k6 kernel: EXT3-fs warning: maximal mount count reached, running e2fsck is recommended Nov 22 17:01:55 athlon4k6 kernel: EXT3 FS on md0, internal journal Nov 22 17:01:55 athlon4k6 kernel: EXT3-fs: mounted filesystem with ordered data mode. Nov 22 17:01:55 athlon4k6 kernel: kjournald starting. Commit interval 5 seconds Nov 22 17:01:55 athlon4k6 kernel: EXT3-fs warning: maximal mount count reached, running e2fsck is recommended Nov 22 17:01:55 athlon4k6 kernel: EXT3 FS on md2, internal journal Nov 22 17:01:55 athlon4k6 kernel: EXT3-fs: mounted filesystem with ordered data mode. That'll tell you how the mount was done. |
If i use tunefs and set it to ordered mode. I won't loose any data right? or face any filesystem related problems?
|
I've removed and re-added journals a few times with no problems, but it gave me the "creeps" each time I had to do it.
Unless I had a good reason to change it, I'd leave it as-is. |
How do you use tunefs to get info about filesystem, instead of setting any data mode ?
I checked /etc/fstab and /var/log/messages but couldn't find any info. |
just use the -l option
|
Quote:
Code:
cat /var/log/messages | grep EXT3 |
So if something says like this
Quote:
Sorry if the questions sound silly, am just confused about the logs. |
If you can't see the mount messages in messages (or kern.log or ...) check if they have been rotated. Tune2fs shows "features" - ordered mode ain't a feature (it's default), so it doesn't show.
|
I found this in /var/log/messages.1
Quote:
what does this mean ? hda3 is ordered or journal ?? |
it's both. if you read the tune2fs manpage you'll see the details there.
|
In ext3 v2, which is a journalling filesystem, there are three journalling methods:
- Journal mode - Ordered mode - Writeback mode Yours is Ordered mode (the default). Clearly, whoever wrote the code could have chosen better terms for the three modes. Journal mode should have been renamed something like "Full mode". Even so, I am grateful for the countless hours (days?, weeks?) that the authors have put in, and am happy to use, for free, the results of their hard work... And I'd chose elegant bulletproof code over documentation prose any day. |
Quote:
BTW: is this question something for the newbie thread? |
All times are GMT -5. The time now is 06:46 PM. |