Results 1 to 10 of 57

Thread: ext4 without journaling

Hybrid View

  1. #1
    Join Date
    Feb 2010
    Location
    Italy
    Beans
    62
    Distro
    Ubuntu 10.04 Lucid Lynx

    ext4 without journaling

    Hello,

    I want to use the ext4 since i had problems with ext2.

    I have a sdd and i heard it would be better to remove the journaling...

    I found on the net this command for to remove it:
    sudo tune2fs -O ^has_journal /dev/sdXN

    is it safe? or maybe it is better to leave it on?

    Thank you

  2. #2
    Join Date
    Nov 2007
    Location
    Sweden
    Beans
    2,200

    Re: ext4 without journaling

    If you feel uncertain, I would recommend to use the default settings of EXT4 or read the wiki document and see if it gives you something.
    Debian 11 "Bullseye"
    HP Envy 2021 laptop
    Linux user since 1999.

  3. #3
    Join Date
    Jan 2007
    Beans
    3,202

    Re: ext4 without journaling

    Quote Originally Posted by gabrielcik View Post

    i had problems with ext2.
    What does this mean -- what problems?

    I cannot think of a "ext2 problem" that will be solved by using ext3 or ext4, except for the lack of a journal and extents.
    Intel Core i7-950 / Asus P6X58D-E / Nvidia GTX480 / siduction 64-bit on OCZ Revodrive SSD / KDE4.10.2/ Kubuntu 13.04

  4. #4
    Join Date
    Feb 2010
    Location
    Italy
    Beans
    62
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: ext4 without journaling

    With ext2 it happens that after a simple crush (due to the gnome power control which didn't switch off the pc on low battery) the system didn't restart anymore.

    In the same time with ext2, when the pc reboot after i update ubuntu packages the system restart making a file system check.

    With ext4 journaled the restart is fine without any particular check...

    Thank you

  5. #5
    Join Date
    Jul 2005
    Location
    Hughenden, Australia
    Beans
    5,100
    Distro
    Ubuntu Mate 20.04 Focal Fossa

    Re: ext4 without journaling

    I have an SSD and I use ext4.

    There was only ext2 and then file system journaling was added to make ext3.
    If you remove or turn off the journaling you have ext2 and if you turn it on again you have ext3. (Basically speaking in simple terms).
    Following are some interesting links for you to read if you want to know more details, Design and Implementation of the Second Extended Filesystem , EXT3, Journaling Filesystem , and Linux ext3 FAQ.

    The new version of ext3 is called ext4 and it is excellent to use for SSD drive and all kinds of flash memory. Ext4 - kernelnewbies

    Theodore Ts'o - Wikipedia link
    Theodore Ts'o is the lead developer and maintainer of e2fsprogs and a maintainer of the ext4 file systems and he knows a lot about SSD drives too.
    We are not 'left out in the cold', here is a link to blog he wrote on this subject, Archive for the ‘SSD’.

    If you can spare the time, I recommend thoroughly studying all of those links and also the good quality sub-links those pages contain. There's a wealth of information there for you if you have the time to absorb it all.
    I have been interested enough to read them all repeatedly myself. The short answer in my opinion is to use file system journaling, meaning we should use ext4 (with journaling).
    Last edited by Herman; March 6th, 2010 at 01:00 PM.
    Ubuntu user since 2004 (Warty Warthog)

  6. #6
    Join Date
    Feb 2010
    Location
    Italy
    Beans
    62
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: ext4 without journaling

    And what about to add noatime, is it really good for ssd?

  7. #7
    Join Date
    Jan 2007
    Beans
    3,202

    Re: ext4 without journaling

    Quote Originally Posted by gabrielcik View Post
    With ext2 it happens that after a simple crush (due to the gnome power control which didn't switch off the pc on low battery) the system didn't restart anymore.

    In the same time with ext2, when the pc reboot after i update ubuntu packages the system restart making a file system check.

    With ext4 journaled the restart is fine without any particular check...

    Thank you
    You need to have the filesystem checked periodically, and especially after you lose power. It is not a bad thing that ext2 requires a filesystem check after a hard power-off. ext3 and ext4 also require a fsck after hard power-off.

    The Ted Ts'o article recommends the noatime option on ext4 if you want to minimize disk writes.
    Intel Core i7-950 / Asus P6X58D-E / Nvidia GTX480 / siduction 64-bit on OCZ Revodrive SSD / KDE4.10.2/ Kubuntu 13.04

  8. #8
    Join Date
    Jul 2005
    Location
    Hughenden, Australia
    Beans
    5,100
    Distro
    Ubuntu Mate 20.04 Focal Fossa

    Re: ext4 without journaling

    And what about to add noatime, is it really good for ssd?
    I think it's best to use noatime for installations in all kinds of flash memory, I think that Mr Ts'o probably knows what he's talking about.
    It's easy to do that by editing the /etc/fstab file.

    I also like to set swappiness to 10 in my /etc/sysctl.conf file so the operating system will prefer to use RAM but will use the swap file or swap area if it needs to. Performance tuning with 'swappiness' - Ubuntu Community Docs.


    I like to add the boot option 'elevator=noop' to my grub.cfg too, Noop scheduler - wikipedia.

    I use these settings to get the best performance from my SSD or flash drive. So far I have not noticed any problems with flash memory wearing out.

    Let me know if you want more details on anything, I'll elaborate if you're interested.
    Ubuntu user since 2004 (Warty Warthog)

  9. #9
    Join Date
    Feb 2010
    Location
    Italy
    Beans
    62
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: ext4 without journaling

    How can i use this option (elevator=noop) in Karmic?
    I know it uses grub2 and so there is not more menu.lst...

    Thank you

  10. #10
    psusi is offline Ubuntu addict and loving it
    Join Date
    Sep 2005
    Location
    Orlando, FL
    Beans
    3,980
    Distro
    Ubuntu Development Release

    Re: ext4 without journaling

    Quote Originally Posted by gabrielcik View Post
    Hello,

    I want to use the ext4 since i had problems with ext2.

    I have a sdd and i heard it would be better to remove the journaling...

    I found on the net this command for to remove it:
    sudo tune2fs -O ^has_journal /dev/sdXN

    is it safe? or maybe it is better to leave it on?

    Thank you
    Turning off journaling is not a good idea since it leaves your filesystem vulnerable to corruption if you crash.

    Quote Originally Posted by dabl View Post
    You need to have the filesystem checked periodically, and especially after you lose power. It is not a bad thing that ext2 requires a filesystem check after a hard power-off. ext3 and ext4 also require a fsck after hard power-off.
    No, you don't; that's the whole point of journaling. As long as you have the journal, you DON'T need a fsck after a crash, or ever really, unless you think something went horribly wrong and corrupted your filesystem.

    Quote Originally Posted by Herman View Post
    According to the following link we probably don't need to worry about it too much because if we're using an OCZ SSD with an indilinx controller it's already taken care of. The indilinx controller will do the job by itself without waiting to be told, Indilinx firmware cleans dirty SSDs, restores performance while idle.
    We would need to check if we have the right firmware update for that to work.
    That's exactly what the TRIM command is for; to tell the drive what blocks are free so that it CAN clean them. This article seems to be misleading in that it suggests that their firmware does it by magic rather than with TRIM.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •