Slashdot Mirror


How To Move Your Linux Systems To ext4

LinucksGirl writes "Ext4 is the latest in a long line of Linux file systems, and it's likely to be as important and popular as its predecessors. As a Linux system administrator, you should be aware of the advantages, disadvantages, and basic steps for migrating to ext4. This article explains when to adopt ext4, how to adapt traditional file system maintenance tool usage to ext4, and how to get the most out of the file system."

25 of 304 comments (clear)

  1. Not for the casual user by halivar · · Score: 4, Informative

    ext4fs is designed to be used in systems requiring many terabytes of storage and vast directory trees. It is unlikely the common desktop (or even, for that matter, the common server) will see appreciable performance increase with it.

    1. Re:Not for the casual user by Vellmont · · Score: 5, Informative


      It is unlikely the common desktop (or even, for that matter, the common server) will see appreciable performance increase with it.

      Disk sizes are going up. In a few years you'll see a terabyte on a single drive. I'd also say that features like undelete, and online de-frag are important to anyone.

      So while you may not see any real performance increases, that's really beside the point.

      --
      AccountKiller
    2. Re:Not for the casual user by Uncle+Focker · · Score: 4, Informative

      Disk sizes are going up. Since last year we've seen a terabyte on a single drive. Fix'd it for you.
    3. Re:Not for the casual user by LWATCDR · · Score: 2, Informative

      No file system likes a power failure. Bet a UPS that will shut down the PC. They are cheap.
      And if you care about that data make a backup and even better run a raid.

      Remember EVERY HARD DRIVE IS GOING TO FAIL SOMEDAY.

      --
      See my blog http://ilovecookes.blogspot.com/ for light hearted technical information.
    4. Re:Not for the casual user by instagib · · Score: 2, Informative

      Correct, and that's why outsourcing your fscking needs is the way to go. These days it is more and more common to not maintain fscking resources inhouse; instead you choose from a variety of service level agreements who will take care of everything around fsck and related issues.

    5. Re:Not for the casual user by whmac33 · · Score: 3, Informative

      from
      man fsck
      "filesystems on different drives will be checked at the same time to utilize parallelism available in the hardware."

      If / is small it will be quicker. If / is a large partition then it hinders any parallelism.

                    The sixth field, (fs_passno), is used by the fsck(8) program to deter-
                    mine the order in which filesystem checks are done at reboot time. The
                    root filesystem should be specified with a fs_passno of 1, and other
                    filesystems should have a fs_passno of 2. Filesystems within a drive
                    will be checked sequentially, but filesystems on different drives will
                    be checked at the same time to utilize parallelism available in the
                    hardware. If the sixth field is not present or zero, a value of zero
                    is returned and fsck will assume that the filesystem does not need to
                    be checked.

    6. Re:Not for the casual user by Xabraxas · · Score: 3, Informative

      Ext4 has a lot of performance improvements, like extents or delayed allocation. Desktop users will notice that ext4 is much faster

      XFS has both extents and delayed allocation. I really don't know why we need Ext4. XFS has been a very solid fs for quite some time now, it's sad that more attention hasn't been payed to it from kernel hackers. The whole idea behind Ext4 seems to be more of a NIH syndrome than anything else. I could understand if it was radically different but it isn't.

      --
      Time makes more converts than reason
    7. Re:Not for the casual user by turing_m · · Score: 2, Informative

      Several points as to why the need for massive TB of storage of video (backups of course):
      1) People wanting a lossless copy of the original media. i.e. purists.
      2) Bonus content.
      3) HD video.
      4) Kids - they will want to watch different movies, over and over and over, at different ages.
      5) Watching a movie with friends.
      6) Keeping it all out of sight, out of mind.
      7) Wanting to keep the NAS within a small power threshold, i.e. more easily done with higher storage density/fewer HDD. Better for the environment too with fewer HDD.
      8) Never underestimate the bandwidth of a stationwagon full of HDD.
      9) As someone else said, the packrat mentality. Who knows when that movie you want to watch will be out of production or perhaps banned?

      --
      If I have seen further it is by stealing the Intellectual Property of giants.
  2. Wikipedia entry by drgould · · Score: 5, Informative

    Link to Ext4 entry on Wikipedia for people who aren't familar with it (like me).

  3. To all ext3 users... by c0l0 · · Score: 5, Informative

    ...who are on the lookout for a new fs to entrust with keeping their precious data: make sure to check out btrfs ( http://oss.oracle.com/projects/btrfs/ ). It's a really neatly spec'd filesystem (with all the zfsish stuff like data checksumming and so on), developed by Oracle employees under GPLv2, which will feature a converter application for ext3's on-disk-format - so you can migrate from ext3 to the much more feature-packed and modern btrfs without having to mkfs anew.

    On a related sidenode: I'm very happy with SGI's xfs right now. ext\d isn't the only player in the field, so please, go out and boldly evaluate available alternatives. You won't be disappointed, I promise.

    --
    :%s/Open Source/Free Software/g

    YTARY!
    1. Re:To all ext3 users... by manitoulinnerd · · Score: 2, Informative

      I moved to XFS from Reiser3 and ext3 because of file delete times coming up on 2 years ago. XFS has lightening fast deletes of large files over Reiser3, I was blown away. I only use it on a data partition (/home) and have left the rest of my system on reiser3 or ext3. XFS has a great set of tools and is stable. I see no reason not to use it (at home at least).

      --
      Burn Bright or Fade Away
  4. Step 1 by vga_init · · Score: 2, Informative

    Step 1: Install Fedora 9

    OK, all done!

  5. undelete by Nimey · · Score: 4, Informative

    Oh, please. ext2 had "undelete" capability, just as it had filesystem compression capability. Neither were ever implemented.

    --
    Hail Eris, full of mischief...

    E pluribus sanguinem
  6. Re:Wait, what? by Waffle+Iron · · Score: 4, Informative
    They're probably using a 64-bit number to hold the timestamp. That gives you 1.8e19 discreet time intervals, so you're going to get ridiculous precision, dates ridiculously far into the future, or both. I assume that they went for precision because that arguably has more potential for use in the real world than worrying about files thousands of years into the future.

    IIRC, today's PCs have high-resolution timers available that surpass the old 14.318MHz clock chip. If you can't get accurate nanoseconds out of the timers yet, they'll just round the numbers off. No big deal.

    BTW, NTFS uses 100ns timestamp granularity, and it was designed when systems were almost 100X slower than today. So it had a similar amount of overkill, but that certainly doesn't seem to have had any negative impact on the acceptance of NTFS.

  7. Re:But does it undelete... by mlwmohawk · · Score: 3, Informative

    The whole "undelete" thing is a DOS FAT stupidity. The *only* reason why people think that you *can* undelete is that the DOS FAT file system was designed in such a way that file changes could be recovered *IF* you managed not to change the file system too much. DOS being a mainly single tasker, with the exception of the standard "indos" flag games.

    POSIX was not and should not be designed in such a way that "undelete" is reliably possible. That's like saying can I unlight that match. Can I unbreak that egg?

    An unreliable system that may, on the odd chance that the file structure has not changed too much, recover files from a disk that have not been over-written yet is no replacement for NOT being an idiot and being careful when you delete something.

  8. Why bother? by jabuzz · · Score: 3, Informative

    ext4 is the biggest waste of time and effort in Linux. There are already good extent based filesystems for Linux. Why anyone would consider using what is an experimental filesystem for a multi TB production filesystem is beyond me.

    What ever they do XFS and JFS will have way more testing and use than ext4 will ever have. I just don't get the point of ext4. It would be far more useful to fix the one remaining issue with XFS, the inability to shrink the filesystem none destructively, than to flog the dead horse which is ext2/3 even more with ext4, which is not one disk compatible anyway.

    1. Re:Why bother? by clampolo · · Score: 2, Informative

      As for why we want more choice - look what happened with reiserFS. The development environment now only runs in a chroot jail ...

      Is Reiser4 really a dead project? (no pun intended) Seemed like it was just breaking some kernel coding standards but was working.

      Would be a shame for the project to get scrapped. The performance numbers were great (faster and files were smaller.) ext4 is a LOT less interesting.

  9. What about comparison to other filesystems? by Khopesh · · Score: 4, Informative

    Those features may be new to ext3, but not to the real competitors. I see nothing that might grant an edge over JFS or XFS. The real justifications will come from performance tests.

    This reminds me of the recent NTFS article here, which actually suggested that since Hans Reiser is in jail and reiser4 is dead, we should consider NTFS. WTF? The ludicrousness of using NTFS as the primary filesystem is further justified in this article by its similar performance to ZFS, but both run in user-space (and are thus horrible in performance), so neither is really an option. What the heck is wrong with JFS and XFS?

    Here are some real comparisons: First, Wikipedia's Comparison of file systems gets you started with a nice mapping of features. Second, a benchmarking of filesystems from 2006 which is still quite applicable (though it doesn't yet cover ext4). What we need is a comparison of EXT4 to XFS and JFS (et al), with EXT2/3 in there for reference.

    Recall that the biggest reason for using ext3 is that it is supported best of all the filesystems. If all hell breaks loose, even Tomsrtbt (an ancient rescue floppy pre-dating knoppix) can fix it. Ext4 breaks this backwards-compatibility to ext2. Therefore, I see no reason to use it. One might as well use something more stable and proven, especially while we lack numbers suggesting it performs as well or better.

    --
    Use my userscript to add story images to Slashdot. There's no going back.
    1. Re:What about comparison to other filesystems? by Sentry21 · · Score: 3, Informative

      If your recovery procedures involve using pre-knoppix floppy recovery tools, you shouldn't be administering any systems with important data on them.

      Aside from the fact that no non-obsolete machine I've seen in the last few years has a disk drive, 'backwards compatibility with ext2' is a pretty lousy minimum requirement for a filesystem.

      Heck, I can do recovery on Ext2/3, ReiserFS, JFS, XFS, and more using only a few-dozen-meg Debian netinstall image. I don't even want to know what an Ubuntu or Knoppix LiveCD could recover from.

    2. Re:What about comparison to other filesystems? by oddfox · · Score: 2, Informative

      Here's an Ext4/XFS/ZFS benchmark

      I would like to see a more recent benchmark that did include JFS/Reiser/etc, though.

      --
      "We invented personal computing." - Bill Gates
  10. Re:But does it undelete... by EvanED · · Score: 2, Informative

    This suggestion is broken for a few reasons. ...

    Fifth, if you delete two files in different directories with the same name, both can't exist in the .Trash directory at the same time.

  11. Re:ext3 tops out at 16GB files? by Firefalcon · · Score: 2, Informative

    This may help (from <a href="http://en.wikipedia.org/wiki/Ext3">Wikipedia's ext3 entry</a>):

    "Block size     Max file size     Max filesystem size
    1KiB         16GiB         2TiB
    2KiB         256GiB         8TiB
    4KiB         2TiB         16TiB
    8KiB         2TiB         32TiB

    It should be noted that the 8 KiB block size is only available on architectures which allow 8 KiB pages (such as Alpha)."

  12. Ext4 still far from stable by Anonymous Coward · · Score: 2, Informative

    The article doesn't say this explicitly enough: if you like to keep your data, DON'T USE EXT4 YET! It is still in highly experimental stage. Try it out, fine... but not as the only copy of your data.

  13. OMFG. NTFS? by rrohbeck · · Score: 1, Informative

    Anybody who advocates NTFS has never worked with directories with a large number (>100,000) of files under one directory tree. Just deleting one file can make the disk seek for several seconds, during which the filesystem is completely frozen. I guess it's reshuffling its entire B-tree.

  14. Re:But does it undelete... by Pig+Hogger · · Score: 2, Informative

    In order to delete all your potential trash files you have to do the following (GNOME):

    1. sudo rm -rf $HOME/.Trash/*
    2. sudo rm -rf $HOME/.local/share/Trash/*
    3. for each mounted filesystem, do the following:
    if [ -d "${filesystem}/.Trash-${USER}" ]; then sudo rm -rf "${filesystem}/.Trash-${USER}" ; fi

    Er, no.

    Sorry, but no way I'm gonna have a script that contains "sudo rm -rf" on my system...