LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 01-12-2011, 10:13 PM   #1
jrecortel
Member
 
Registered: Sep 2008
Location: Philippines
Distribution: slackware, FreeBSD
Posts: 123

Rep: Reputation: 19
journal mode of ext3 in slackware


Hello. I was reading about ext3 feature and I have read about its journaling modes. I would like to ask what is the default journaling mode of ext3 fs in slackware(or is it in all distro using ext3)? I'll install slackware when my new pc arrive and the fs I will use will be ext3 and I like it to have data=journal mode for its journaling. I have read in some wiki how to set the journaling mode into data=journal mode.
Code:
# tune2fs -O has_journal -o journal_data /dev/sdXY
Do i need to issue this command or is this the default mode in ext3 in slackware? Thanks in advance.
 
Old 01-13-2011, 06:47 AM   #2
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,629

Rep: Reputation: Disabled
You can do this during creation of the file system with tune2fs (including the journal size! Interesting e.g. for large files). My distribution (openSuSE) has tools integrated in the setup of the system.

Generally you'd control the journalling behaviour in /etc/fstab ("man fstab", "man mount") where you can set the mode even per partition (openSuSE does it according the choices one took during setup, one can change it later in /etc/fstab as well).

Last edited by JZL240I-U; 01-13-2011 at 07:14 AM.
 
Old 01-13-2011, 07:02 AM   #3
allend
LQ 5k Club
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware64-15.0
Posts: 6,371

Rep: Reputation: 2748Reputation: 2748Reputation: 2748Reputation: 2748Reputation: 2748Reputation: 2748Reputation: 2748Reputation: 2748Reputation: 2748Reputation: 2748Reputation: 2748
When installing Slackware 13.1 ( the current stable release) the file system defaults to ext4.
The defaults are contained in /etc/mke2fs.conf
Code:
[defaults]
        base_features = sparse_super,filetype,resize_inode,dir_index,ext_attr
        blocksize = 4096
        inode_size = 256
        inode_ratio = 16384

[fs_types]
        ext3 = {
                features = has_journal
        }
        ext4 = {
                features = has_journal,extent,huge_file,flex_bg,uninit_bg,dir_nlink,extra_isize
                inode_size = 256
        }
        ext4dev = {
                features = has_journal,extent,huge_file,flex_bg,uninit_bg,dir_nlink,extra_isize
                inode_size = 256
                options = test_fs=1
        }
...

Last edited by allend; 01-13-2011 at 07:05 AM.
 
Old 01-13-2011, 07:29 AM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,120

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
I don't understand why it even matters - if it ain't what you want, change it to suit.
Simple.
 
1 members found this post helpful.
Old 01-13-2011, 09:10 AM   #5
jrecortel
Member
 
Registered: Sep 2008
Location: Philippines
Distribution: slackware, FreeBSD
Posts: 123

Original Poster
Rep: Reputation: 19
Thank you to all those who replied.

To JZL240I-U:
I read the man page of fstab and it points me to check for the current setting by looking at /proc/mounts.
Here's the content of /proc/mounts:
Code:
rootfs / rootfs rw 0 0
/dev/sda1 / ext3 rw,errors=continue,data=ordered 0 0
proc /proc proc rw 0 0
sysfs /sys sysfs rw 0 0
tmpfs /dev tmpfs rw,mode=755 0 0
devpts /dev/pts devpts rw,gid=5,mode=620 0 0
fusectl /sys/fs/fuse/connections fusectl rw 0 0
usbfs /proc/bus/usb usbfs rw 0 0
tmpfs /dev/shm tmpfs rw 0 0
So, ext3 uses ordered as its journaling mode, am i right? Can I safely change the mode into journal by passing the boot parameter
Code:
rootflags=data=journal
to kernel or there are some steps that I have to accomplish first? Can I safely use it to fs that already contain files or I need to do it on an empty fs?

To allend:
Im using slackware 13.0. after using xfs as my fs of choice, I would like to try ext3. ext4, not yet.

To syg00:
Exactly. That's the reason why I'm asking question, for me to know how to change it.
 
Old 01-13-2011, 09:20 AM   #6
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,629

Rep: Reputation: Disabled
And "man fstab" points you to "man mount". If you combine both you know how to alter the appropriate lines in your /etc/fstab to
Code:
/dev/sdxy /your/mount/points ...,data=journal,... 1 1
ext3 doesn't use anything per se. You have to tell it what to do and you do it by allowing the system to use its defaults as pointed out by allend.

No need to pass a boot parameter. The kernel uses /etc/fstab to mount the partitions anyway. And I suggesst you change the trailing zeros to "1 1" as in my example. It makes the standard file system check happen on the "/" partition when necessary: "man tune2fs" .

Last edited by JZL240I-U; 01-13-2011 at 09:22 AM.
 
Old 01-13-2011, 04:21 PM   #7
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,120

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Simply use the command from your initial post. That way it's always mounted as you want - including if you mount it from another system or recovery CD say.
Can be run anytime - including online.

Have you thought of ext4 ?.

Last edited by syg00; 01-13-2011 at 04:26 PM.
 
Old 01-13-2011, 05:39 PM   #8
jrecortel
Member
 
Registered: Sep 2008
Location: Philippines
Distribution: slackware, FreeBSD
Posts: 123

Original Poster
Rep: Reputation: 19
To JZL240I-U:
Here's the content of my /etc/fstab
Quote:
/dev/sda2 swap swap defaults 0 0
/dev/sda1 / ext3 defaults 1 1
#/dev/cdrom /mnt/cdrom auto noauto,owner,ro 0 0
/dev/fd0 /mnt/floppy auto noauto,owner 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
proc /proc proc defaults 0 0
tmpfs /dev/shm tmpfs defaults 0 0
Changing it to
Quote:
/dev/sda2 swap swap defaults 0 0
/dev/sda1 / ext3 defaults,data=journal 1 1
#/dev/cdrom /mnt/cdrom auto noauto,owner,ro 0 0
/dev/fd0 /mnt/floppy auto noauto,owner 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
proc /proc proc defaults 0 0
tmpfs /dev/shm tmpfs defaults 0 0
give me a mounting error when booting. Should i remove the defaults and only the data=journal will be left in the mount option field or is there something else that needs to be included?

To syg00:
I will try the command in my laptop which uses slackware 13.0. Running it online means I can use it even if the drive is currently mounted and the operation is safe to the files that reside there, right? Do I still need to run e2fsck after running the tune2fs or reboot will take care of itself? Also, I know ext4 fs but my interest is in ext3.
 
Old 01-14-2011, 08:46 AM   #9
jrecortel
Member
 
Registered: Sep 2008
Location: Philippines
Distribution: slackware, FreeBSD
Posts: 123

Original Poster
Rep: Reputation: 19
I boot from parted magic and run
Code:
# tune2fs -O has_journal -o journal_data /dev/sda1
and after reboot, the computer did a fsck. And after another reboot, checked the /proc/mounts
Quote:
rootfs / rootfs rw 0 0
/dev/sda1 / ext3 rw,errors=continue,data=journal 0 0
proc /proc proc rw 0 0
sysfs /sys sysfs rw 0 0
tmpfs /dev tmpfs rw,mode=755 0 0
devpts /dev/pts devpts rw,gid=5,mode=620 0 0
fusectl /sys/fs/fuse/connections fusectl rw 0 0
usbfs /proc/bus/usb usbfs rw 0 0
tmpfs /dev/shm tmpfs rw 0 0
journaling mode of ext3 in my slackware 13.0 is now in data=journal mode. Thanks to everyone who replied to this thread.
 
Old 01-17-2011, 01:54 AM   #10
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,629

Rep: Reputation: Disabled
Quote:
Originally Posted by jrecortel View Post
To JZL240I-U:
...
give me a mounting error when booting
...
Uuups. Can't say anything without the actual error message.

You still didn't enable the automatic file system checks with the "...1 1" ate the end of the line. For the case you don't want that I suggest you check regularly by hand...
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Idenitfying current ext3 journal mode. Chrysalis Linux - Newbie 10 01-23-2012 01:35 AM
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

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

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

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration