Linux - NewbieThis 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.
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.
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.
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.
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,629
Rep:
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.
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,629
Rep:
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...
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:
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.