Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
![Reply](https://www.linuxquestions.org/questions/images/buttons/reply.gif) |
01-20-2009, 11:14 PM
|
#1
|
LQ Newbie
Registered: Oct 2003
Location: UK
Distribution: Debian
Posts: 8
Rep:
|
Idenitfying current ext3 journal mode.
I got a server supplied to me with the filesystem on sda1 drive created by datacentre techs.
I created the filesystems on md0 md1 and sdc1 myself.
When these are mounted in /var/log/messages I see the current journal type like these below.
Jan 21 01:20:38 kernel: EXT3 FS on dm-2, internal journal
Jan 21 01:20:38 kernel: EXT3-fs: mounted filesystem with ordered data mode
However this is what I see for sda1
Jan 19 16:45:06 kernel: EXT3 FS on sda1, internal journal
Thats it, no journal type information.
tune2fs -l shows this
Default mount options: (none)
No help either.
Ordered data mode is the default, I suspect my sda1 is using writeback mode or maybe no journaling at all, if my sda1 is using ordered then why doesnt it say so like all my other drives.
Thanks in advance.
|
|
|
01-21-2009, 04:17 AM
|
#2
|
Senior Member
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,637
Rep: ![Reputation: Disabled](https://www.linuxquestions.org/questions/images/reputation/reputation_off.gif)
|
AFAIR the mount mode is determined in "/etc/fstab". To make sure
Code:
man mount
man fstab
man tune2fs
Last edited by JZL240I-U; 01-21-2009 at 04:18 AM.
|
|
|
01-21-2009, 01:25 PM
|
#3
|
LQ Newbie
Registered: Oct 2003
Location: UK
Distribution: Debian
Posts: 8
Original Poster
Rep:
|
Have read all them before I even made the post they dont answer my question.
fstab tells me its ext3 but no other info.
If the partition is formatted as ext3 with all default settings then journal is enabled in ordered mode as evident in my new drives. However I didnt format sda1 so I dont know if default settings were used, all I know is it is ext3. Fstab can overide these default settings but isnt, so all I know is that sda1 is been mounted using the settings that were defined on the format.
So you have pointed me to man files that dont help. All they do is tell me how to overide the defaults (I not asking how to do this), tell me how fstab works (already know this), and how to change current settings on the device, however sda1 is my boot device so I cant unmount it and the only useable tune2fs command I can run on it is tune2fs -l /dev/sda1 which I have already done and it does 'not' tell me the journal configuration as I stated in my first post.
/dev/sda1 / ext3 errors=remount-ro 0 1
Last edited by Chrysalis; 01-21-2009 at 01:27 PM.
|
|
|
01-22-2009, 02:44 AM
|
#4
|
Senior Member
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,637
Rep: ![Reputation: Disabled](https://www.linuxquestions.org/questions/images/reputation/reputation_off.gif)
|
Quote:
Originally Posted by Chrysalis
Have read all them before I even made the post they dont answer my question....
|
What is your problem then with this (from man tune2fs):
Code:
-o [^]mount-option[,...]
Set or clear the indicated default mount options in the filesys-
tem. Default mount options can be overridden by mount options
specified either in /etc/fstab(5) or on the command line argu-
ments to mount(8). Older kernels may not support this feature;
in particular, kernels which predate 2.4.20 will almost cer-
tainly ignore the default mount options field in the superblock.
More than one mount option can be cleared or set by separating
features with commas. Mount options prefixed with a caret char-
acter (’^’) will be cleared in the filesystem’s superblock;
mount options without a prefix character or prefixed with a plus
character (’+’) will be added to the filesystem.
The following mount options can be set or cleared using tune2fs:
debug Enable debugging code for this filesystem.
bsdgroups
Emulate BSD behaviour when creating new files: they
will take the group-id of the directory in which
they were created. The standard System V behaviour
is the default, where newly created files take on
the fsgid of the current process, unless the direc-
tory has the setgid bit set, in which case it takes
the gid from the parent directory, and also gets the
setgid bit set if it is directory itself.
user_xattr
Enable user-specified extended attributes.
acl Enable Posix Access Control Lists.
uid16 Disables 32-bit UIDs and GIDs. This is for interop-
erability with older kernels which only store and
expect 16-bit values.
journal_data
When the filesystem is mounted with journalling
enabled, all data (not just metadata) is committed
into the journal prior to being written into the
main filesystem.
journal_data_ordered
When the filesystem is mounted with journalling
enabled, all data is forced directly out to the main
file system prior to its metadata being committed to
the journal.
journal_data_writeback
When the filesystem is mounted with journalling
enabled, data may be written into the main filesys-
tem after its metadata has been committed to the
journal. This may increase throughput, however, it
may allow old data to appear in files after a crash
and journal recovery.
|
|
|
01-22-2009, 10:05 PM
|
#5
|
LQ Newbie
Registered: Oct 2003
Location: UK
Distribution: Debian
Posts: 8
Original Poster
Rep:
|
I was asking how to "view" not "set" the current journal settings.
If I understand you right it seems there is no answer and the only thing I can do is just set a new default setting so I will do that.
|
|
|
01-26-2009, 04:42 AM
|
#6
|
Senior Member
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,637
Rep: ![Reputation: Disabled](https://www.linuxquestions.org/questions/images/reputation/reputation_off.gif)
|
Quote:
Originally Posted by Chrysalis
I was asking how to "view" not "set" the current journal settings...
|
Sorry, that was not clear to me.
Funny, that this should be possible at all, I mean your machine must handle the file system without defaults now?!?
I have never seen the output from "tune2fs -l" the way you posted it, normally tune2fs seems rather garrulous. Is this the latest version of tune2fs? Maybe "dump2fs" or "debugfs" could help but I never tried, so there is no experience here...
|
|
|
01-26-2009, 05:46 AM
|
#7
|
Senior Member
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,637
Rep: ![Reputation: Disabled](https://www.linuxquestions.org/questions/images/reputation/reputation_off.gif)
|
Quote:
Originally Posted by Chrysalis
I got a server supplied to me with the filesystem on sda1 drive created by datacentre techs.
I created the filesystems on md0 md1 and sdc1 myself.
...
|
Just had an idea ... perhaps they created sda1 as ext 2 ... after all, the difference between ext2 and ext3 is mainly the journal.
Last edited by JZL240I-U; 01-26-2009 at 05:47 AM.
|
|
|
01-26-2009, 06:02 AM
|
#8
|
LQ Guru
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509
|
Here is an excerpt form the ext3 FAQ:
Quote:
Q: I updated ext3 today. Got all of my mounts converted. Now on boot, I see: "EXT3-fs: mounted filesystem with ordered data mode". Is this normal?
Nigel Metheringham answered this on the ext3-users mailing list as follows:
That's fine. The EXT3-fs message is just telling you it mounted the fs OK. It's also telling you what form of journaling you are using.
ext3 has 2 formats of journal:
* version 1 - default and only possibility for ext3 releases 0.0.3* and earlier
* version 2 - default for filesystems created with 0.0.4 and later
Version 2 journals support additional semantics required to allow metadata journaling, and provide 2 new forms of journaling - ordered and writeback. Both V1 & V2 journals support data journaling (where everything that would go to disk is journaled).
The CHANGES file in the distribution says this:
New mount options:
"mount -o journal=update"
Mounts a filesystem with a Version 1 journal, upgrading the
journal dynamically to Version 2.
"mount -o data=journal"
Journals all data and metadata, so data is written twice. This
is the mode which all prior versions of ext3 used.
"mount -o data=ordered"
Only journals metadata changes, but data updates are flushed to
disk before any transactions commit. Data writes are not atomic
but this mode still guarantees that after a crash, files will
never contain stale data blocks from old files.
"mount -o data=writeback"
Only journals metadata changes, and data updates are entirely
left to the normal "sync" process. After a crash, files will
may contain stale data blocks from old files: this mode is
exactly equivalent to running ext2 with a very fast fsck on reboot.
Ordered and Writeback data modes require a Version 2 journal: if you do
not update the journal format then only the Journaled data will be
allowed.
The default data mode is Journaled for a V1 journal, and Ordered for V2.
|
Since the 0.0.4 version of ext3 was introduced in early 2000s, I guess recent distributions have a quite newer release of ext3 filesystem, so I'd stick with the fact that the default is ordered data mode. If the filesystem had a value other than the default it should be viewed by tune2fs -l as:
Code:
Default mount options: journal_data_writeback
|
|
|
09-30-2010, 09:57 PM
|
#9
|
LQ Newbie
Registered: Sep 2008
Posts: 3
Rep:
|
Answer to original question: dmesg
As the original question, how to read/view the settings, was not answered I am adding to this old post.
dmesg | grep ext3
or
dmesg | grep sda
If you want to get additional information, use 'dmesg | less' then search for your drive. Things like "ordered data" will show up nearby.
|
|
|
01-21-2012, 09:12 AM
|
#10
|
LQ Newbie
Registered: Aug 2006
Distribution: Various versions of Redhat, CentOS, Fedora, Debian, Mint, *buntu
Posts: 18
Rep:
|
Quote:
Originally Posted by Chrysalis
I was asking how to "view" not "set" the current journal settings.
If I understand you right it seems there is no answer and the only thing I can do is just set a new default setting so I will do that.
|
May be too late for this thread - but it can help someone googling for this...
sudo tune2fs -l | grep features
if has_journal is listed, it's there, otherwise not.
|
|
|
01-23-2012, 02:35 AM
|
#11
|
Senior Member
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,637
Rep: ![Reputation: Disabled](https://www.linuxquestions.org/questions/images/reputation/reputation_off.gif)
|
Thanks for coming back and clarifying things. Nice to learn this even when I've long since switched to ext4. It is just good to know anyhow ![Smilie](https://www.linuxquestions.org/questions/images/smilies/smile.gif) .
|
|
|
All times are GMT -5. The time now is 11:44 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|