LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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

Reply
 
LinkBack Search this Thread
Old 01-20-2009, 10:14 PM   #1
Chrysalis
LQ Newbie
 
Registered: Oct 2003
Location: UK
Distribution: Debian
Posts: 8

Rep: Reputation: 0
Question 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.
 
Old 01-21-2009, 03:17 AM   #2
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE 13.1 / 12.3_64-KDE, Ubuntu 12.04, Fedora 17, Mint 16, Chakra
Posts: 3,618

Rep: Reputation: Disabled
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 03:18 AM.
 
Old 01-21-2009, 12:25 PM   #3
Chrysalis
LQ Newbie
 
Registered: Oct 2003
Location: UK
Distribution: Debian
Posts: 8

Original Poster
Rep: Reputation: 0
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 12:27 PM.
 
Old 01-22-2009, 01:44 AM   #4
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE 13.1 / 12.3_64-KDE, Ubuntu 12.04, Fedora 17, Mint 16, Chakra
Posts: 3,618

Rep: Reputation: Disabled
Quote:
Originally Posted by Chrysalis View Post
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.
 
Old 01-22-2009, 09:05 PM   #5
Chrysalis
LQ Newbie
 
Registered: Oct 2003
Location: UK
Distribution: Debian
Posts: 8

Original Poster
Rep: Reputation: 0
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.
 
Old 01-26-2009, 03:42 AM   #6
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE 13.1 / 12.3_64-KDE, Ubuntu 12.04, Fedora 17, Mint 16, Chakra
Posts: 3,618

Rep: Reputation: Disabled
Quote:
Originally Posted by Chrysalis View Post
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...
 
Old 01-26-2009, 04:46 AM   #7
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE 13.1 / 12.3_64-KDE, Ubuntu 12.04, Fedora 17, Mint 16, Chakra
Posts: 3,618

Rep: Reputation: Disabled
Quote:
Originally Posted by Chrysalis View Post
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 ext2 ... after all, the difference between ext2 and ext3 is mainly the journal.

Last edited by JZL240I-U; 01-26-2009 at 04:47 AM.
 
Old 01-26-2009, 05:02 AM   #8
colucix
Moderator
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,362

Rep: Reputation: 1910Reputation: 1910Reputation: 1910Reputation: 1910Reputation: 1910Reputation: 1910Reputation: 1910Reputation: 1910Reputation: 1910Reputation: 1910Reputation: 1910
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
 
Old 09-30-2010, 08:57 PM   #9
trindflo
LQ Newbie
 
Registered: Sep 2008
Posts: 3

Rep: Reputation: 0
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.
 
Old 01-21-2012, 08:12 AM   #10
Tijn
LQ Newbie
 
Registered: Aug 2006
Distribution: Various versions of Redhat, CentOS, Fedora, Debian, Mint
Posts: 13

Rep: Reputation: 0
Quote:
Originally Posted by Chrysalis View Post
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.
 
Old 01-23-2012, 01:35 AM   #11
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE 13.1 / 12.3_64-KDE, Ubuntu 12.04, Fedora 17, Mint 16, Chakra
Posts: 3,618

Rep: Reputation: Disabled
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 .
 
  


Reply

Tags
ext3, journaling


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ext3 journal location Elhedi Linux - Newbie 3 10-28-2008 03:54 PM
Ext3 Journal mohit.saha Linux - Newbie 2 05-07-2008 04:07 AM
ext3 journal idol007 Linux - Kernel 6 12-19-2007 10:02 PM
Western Digital My Book Ext3 format reports "Ext3-fs: Journal inode is deleted" ChronusDark Linux - Desktop 3 10-31-2006 03:56 PM
Turning off the ext3 journal? Phaethar Red Hat 2 02-04-2004 10:43 AM


All times are GMT -5. The time now is 07:53 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration