LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (http://www.linuxquestions.org/questions/debian-26/)
-   -   Ext3 Journaling level on Debian Etch (http://www.linuxquestions.org/questions/debian-26/ext3-journaling-level-on-debian-etch-564674/)

kingpotnoodle 06-26-2007 04:25 PM

Ext3 Journaling level on Debian Etch
 
Ok I installed Debian Etch, finally got my hardware all sorted out! I have a lot of valuable data on the server so I want the maximum/safest journaling level (I formatted with ext3) - data=journal?

Is the Debian Etch default journal, ordered or writeback? (I hope it not writeback!)

fstab currently just has 'defaults' under options.

Thanks

Daws 06-26-2007 06:19 PM

Code:

cat /var/log/syslog | grep EXT3
Reveals that my Debian (Sid) uses data=ordered, it is likely that your box does too.

Fortunately it is not too hard to change.

nx5000 06-26-2007 06:39 PM

In /etc there is a file mkfs something that defines the default options when mkfs.ext3 is called without parameter. Probably during install the same configuration file is used... hopefully.
I don't have access to my machine at the moment, I don't know exactly the name.

Daws 06-26-2007 06:58 PM

Code:

cat /etc/mke2fs.conf
[defaults]
        base_features = sparse_super,filetype,resize_inode,dir_index
        blocksize = 4096
        inode_ratio = 8192

[fs_types]
        small = {
                blocksize = 1024
                inode_ratio = 4096
        }
        floppy = {
                blocksize = 1024
        }
        news = {
                inode_ratio = 4096
        }
        largefile = {
                inode_ratio = 1048576
        }
        largefile4 = {
                inode_ratio = 4194304
        }

Would that be the one?

nx5000 06-27-2007 07:18 AM

Quote:

Originally Posted by Daws
Code:

cat /etc/mke2fs.conf
[defaults]
        base_features = sparse_super,filetype,resize_inode,dir_index
        blocksize = 4096
        inode_ratio = 8192

[fs_types]
        small = {
                blocksize = 1024
                inode_ratio = 4096
        }
        floppy = {
                blocksize = 1024
        }
        news = {
                inode_ratio = 4096
        }
        largefile = {
                inode_ratio = 1048576
        }
        largefile4 = {
                inode_ratio = 4194304
        }

Would that be the one?

Yes! Exactly.

farslayer 06-27-2007 08:47 AM

I would think tune2fs would be used to alter journal options on a existing file system.

nx5000 06-27-2007 10:48 AM

Quote:

Originally Posted by farslayer
I would think tune2fs would be used to alter journal options on a existing file system.

For existing ones, I'm not sure anymore. Looking at the man page is not so clear.
I recall that -o remount can not do a lot of things so I guess you are right, tune2fs has to be used.

"man mount:"
Code:

      -o [^]mount-option[,...]
              Set or clear the indicated default mount options in the filesystem.  Default mount options can be  overridden  by  mount
              options  specified  either in /etc/fstab(5) or on the command line arguments to mount(8).  Older kernels may not support
              this feature; in particular, kernels which predate 2.4.20 will almost certainly 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 character (’^’) will be cleared in the filesystem’s superblock; mount options without a prefix character  or  pre‐
              fixed 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 directory 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 a 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 interoperability 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 filesystem 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.


Daws 06-27-2007 02:12 PM

Quote:

I recall that -o remount can not do a lot of things so I guess you are right,
You are correct, you cannot change journal mode on a remount.

To change it I would normally add "rootflags=data=journal" as a kernel boot option to the grub menu.lst.

kingpotnoodle 06-28-2007 03:52 AM

All sorted...
 
var/log/dmesg revealed that ordered was being used...

ran "tune2fs /dev/hdeX -o data_journal" and rebooted, checking dmesg again showsthe partitions mounted as intended.

:)

syg00 06-28-2007 04:42 AM

You might also be interested in this from a gentoo forum.

nx5000 06-28-2007 08:01 AM

Thanks for the infos.

Digging in my bookmarks.. I have some good articles there:

http://www-128.ibm.com/developerworks/library/l-fs.html
to
http://www-128.ibm.com/developerwork...ry/l-fs11.html


* The benefits of journalling and ReiserFS (Part 1)
* Setting up a ReiserFS system (Part 2)
* Using the tmpfs virtual memory filesystem and bind mounts (Part 3)
* The benefits of devfs, the device management filesystem (Part 4)
* Beginning the conversion to devfs (Part 5)
* Completing the conversion to devfs using an init wrapper (Part 6)
* The benefits of the ext3 filesystem (Part 7)
* An in-depth look at ext3 and the latest kernel updates (Part 8)
* The technology behind XFS (Part 9)

I'll have to reread them..


All times are GMT -5. The time now is 09:18 AM.