Results 1 to 5 of 5

Thread: Turn off journalling in ext3/4

  1. #1
    Join Date
    May 2011
    Location
    #/bin/sh
    Beans
    193
    Distro
    Ubuntu 12.10 Quantal Quetzal

    Exclamation Turn off journalling in ext3/4

    Basically, I have to turn off journalling for a tool called Shred to work properly. I have formatted ext4. Is there any way to solve this without going back to good ol' ext2 or similar? I know you have to add a date in fstab, but I don't understand what you need to do?
    Too many cooks don't spoil the broth with Linux, and Ubuntu is the best broth!

    Mint-Ireland, Ubuntu-UK, SUSE-Germany, Fedora-USA, ROSA-From Russia, with Love!

  2. #2
    Join Date
    Jun 2011
    Location
    The Shadow Gallery
    Beans
    6,807

    Re: Turn off journalling in ext3/4

    Quote Originally Posted by Robert Moyse View Post
    Basically, I have to turn off journalling for a tool called Shred to work properly. I have formatted ext4. Is there any way to solve this without going back to good ol' ext2 or similar? I know you have to add a date in fstab, but I don't understand what you need to do?
    Code:
    umount <partition or drive>
    Code:
    tune4fs -O ^has_journal /dev/sdax
    where sdax is where you want to disable it

    You may want to do a fs check after then reboot

    You can check it is off with

    Code:
    sudo dumpe2fs /dev/sdax | more
    again where x is the number of drive, and look for fs features, has_journal means it is enabled

    Peace
    Last edited by haqking; January 16th, 2013 at 05:58 PM.
    Feel Free to Bitcoin Tip: 135Rp4pwwYTHEJ4u8bxKaDQiC91N9LUoV2

    Backtrack - Giving machine guns to monkeys since 2006
    Kali-Linux - Adding a grenade launcher to the machine guns since 2013

  3. #3
    Join Date
    Feb 2007
    Location
    West Hills CA
    Beans
    8,660
    Distro
    Ubuntu 12.10 Quantal Quetzal

    Re: Turn off journalling in ext3/4

    Shred is a simple, file overwriting tool. Depending on your security requirements, there may be some data left over in journalling buffers, but for routine use you can still use the tool. I think you might suffer a bigger risk by frequently turning journalling on and off on an ext4 system than by data exposure after using shred. But that is just my opinion.

    If you are working in a secured/classified environment, then you should probably only be running ext2 anyway. If you are a casual home user, I would spend more time making a tinfoil hat.

    You have to add an ext4 option in fstab to turn journalling off:

    According to

    Code:
    man mount
    ext4 will interpret ext3 options:

    data={journal|ordered|writeback}
    Specifies the journalling mode for file data. Metadata is always journaled. To use modes other than
    ordered on the root filesystem, pass the mode to the kernel as boot parameter, e.g. rootflags=data=jour‐
    nal.

    journal
    All data is committed into the journal prior to being written into the main filesystem.

    ordered
    This is the default mode. All data is forced directly out to the main file system prior to its
    metadata being committed to the journal.

    writeback
    Data ordering is not preserved - data may be written into the main filesystem after its metadata has
    been committed to the journal. This is rumoured to be the highest-throughput option. It guarantees
    internal filesystem integrity, however it can allow old data to appear in files after a crash and
    journal recovery.

    And when data=somethingelse journaling is turned off.

    Again the risk of messing up a bootable disk is not worth it to me. Any vulnerable data should be on a separate ext2 partition--which is simple enough to create using gparted.
    -------------------------------------
    Oooh Shiny: PopularPages

    Unumquodque potest reparantur. Patientia sit virtus.

  4. #4
    Join Date
    Nov 2011
    Location
    /dev/root
    Beans
    Hidden!

    Re: Turn off journalling in ext3/4

    Quote Originally Posted by tgalati4 View Post
    Shred is a simple, file overwriting tool. Depending on your security requirements, there may be some data left over in journalling buffers, but for routine use you can still use the tool. I think you might suffer a bigger risk by frequently turning journalling on and off on an ext4 system than by data exposure after using shred. But that is just my opinion.
    ...
    +1

    An alternative is to use Ubuntu's encrypted home system (ecryptfs).

  5. #5
    Join Date
    May 2011
    Location
    #/bin/sh
    Beans
    193
    Distro
    Ubuntu 12.10 Quantal Quetzal

    Question Re: Turn off journalling in ext3/4

    As my security requirements are very high, and I am not turning off the journal or using anything else apart from ext3/4, how would I clear the journal securely, if I left it on using shred.
    Too many cooks don't spoil the broth with Linux, and Ubuntu is the best broth!

    Mint-Ireland, Ubuntu-UK, SUSE-Germany, Fedora-USA, ROSA-From Russia, with Love!

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
  •