Stories
Slash Boxes
Comments

News for nerds, stuff that matters

Slashdot Log In

Log In

Create Account  |  Retrieve Password

How To Move Your Linux Systems To ext4

Posted by timothy on Tue May 06, 2008 12:32 PM
from the or-you-could-guess dept.
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."
+ -
story

Related Stories

This discussion has been archived. No new comments can be posted.
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More
Loading... please wait.
  • by halivar (535827) <bfelger@nOSpam.gmail.com> on Tuesday May 06 2008, @12:46PM (#23314370) Homepage
    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.
    • by Anonymous Coward on Tuesday May 06 2008, @12:50PM (#23314424)
      Do you realize how much porn some people have?
    • by Vellmont (569020) on Tuesday May 06 2008, @12:59PM (#23314544)

      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.
    • Re: (Score:3, Interesting)

      I can't wait for faster fsck. It takes something like an hour on my 500GB ext3 partition. Terabytes of storage are not that far away.
    • Re: (Score:3, Interesting)

      It might be a win for me even today on my meager 300G MythTV media partition. I'm currently using xfs for that, but every now and then I hear about bad things on xfs with a power failure, and other times I hear that it can be physically hard on the hard drive. (excess head motion?) Of course other times I hear that xfs is the best thing since sliced bread, and is usable for ANY purpose with just a little tuning.

      I transcode my Myth stuff on an ext3 partition, and occasionally get complaints about the larg
    • by diegocgteleline.es (653730) on Tuesday May 06 2008, @04:03PM (#23317180)
      Ext4 has a lot of performance improvements, like extents or delayed allocation. Desktop users will notice that ext4 is much faster

      That said, ext4 is unstable. It can easily eat your data. Just say NO to moving your filesystem to ext4 - for now.
      • by Xabraxas (654195) on Tuesday May 06 2008, @06:43PM (#23318874)

        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.

        • by oddfox (685475) on Tuesday May 06 2008, @10:43PM (#23320368) Homepage

          One of many reasons right here [brillig.org]

          I messed around with Ext4 for a little while on my machine (Like a couple days, just toying with it and seeing how its performance compares to Ext3 and Reiser4) a while back, like maybe a little bit before it was merged as experimental in the mainstream kernel. It is fast, backwards-compatible and extremely featureful. XFS is not a bad filesystem, but it has some problems, in my eyes. Metadata-only journaling, aggressive caching that makes it a potentially dangerous choice if you don't have a UPS, very slow metadata and deletion operations.

          That's great that XFS has a lot of features Ext4 is bringing to the playing field, and has had them for a long time. To pretend, however, that the developers of Ext4 simply have a NIH syndrome is just silly and disregards the fact that there is a lot that Ext4 already provides that XFS doesn't, and even more that it will soon. You might not see what the big deal is, but really, I can assure you that it won't be very long before the new ideas Ext4 employs are in widespread use.

          Here's an interesting article [byteandswitch.com] that really caught my eye with this: "Storage snapshot: The financial firm has more than 14 Petabytes of active storage and plans to add "several more Pbytes" within the next 12 months."

  • Wikipedia entry (Score:5, Informative)

    by drgould (24404) on Tuesday May 06 2008, @12:49PM (#23314414)
    Link to Ext4 [wikipedia.org] entry on Wikipedia for people who aren't familar with it (like me).
    • Re: (Score:3, Funny)

      Because nobody on Slashdot knows that primary filesystem used on Linux is called Ext3 and we're too stupid to figure out what Ext4 might be. Come on.
  • by A beautiful mind (821714) on Tuesday May 06 2008, @12:53PM (#23314470)
    Yes, Terabyte is not entirely correct according to SI, but Tebibyte just sounds lame and language is a tool, to facilitate written and oral communication.

    Of course, in this case you have to balance the confusion stemming from the Tera in IT context meaning 1024 in some cases. To be honest, people insisting on the new naming, they should have come up with a sensible sounding name and promoted that. You have to remember that language, even technical language is for the people. There are lots of ways to craft a beautiful, logical, symmetrical language that no sane person would use because it just doesn't sound convenient.

    Maybe a linguist can pitch in to explain why tebibyte sounds so awful?
    • by Dachannien (617929) on Tuesday May 06 2008, @01:16PM (#23314772)

      Maybe a linguist can pitch in to explain why tebibyte sounds so awful?
      Tebibyte-buh: It's bad-buh because-buh it makes-buh you sound-buh like Mushmouth-buh.

      Hey hey hey!

    • by JustinOpinion (1246824) on Tuesday May 06 2008, @01:36PM (#23315072)

      Of course, in this case you have to balance the confusion stemming from the Tera in IT context meaning 1024 in some cases.
      It's worse than that. According to SI prefixes, "Tera" should mean 10^12 (1,000,000,000,000), but in common usage applied to computers it sometimes means 2^40 (1,099,511,627,776). But it also sometimes means "1024 Giga", where the Giga could be using either convention (and, for all you know, the "Mega" implied within could have been computed using either convention). So you can get a gradient of "mixed numbers" that conform to neither standard. You might say that only a non-professional would make such a stupid mistake... but on the other hand, if you see a column of numbers listed in "Gigabytes" and you want to convert them to Terabytes, what conversion factor would you use? How would you know what conversion factor the previous author had used? How could you guarantee that you were doing it right? Would you be able to confidently convert it into an exact number of bytes?

      Personally, I think the whole thing is a mess, and computer professionals should be working harder to enforce a consistent scheme. Unfortunately, only a minority of computer professionals seem interested in changing the status quo confusion.

      Maybe a linguist can pitch in to explain why tebibyte sounds so awful?
      I'm no linguist, but I don't think "Tebibyte" sounding silly is the real problem. I admit that I laughed when I first heard the binary prefixes. They sound lame. But who cares? "Quark" was silly when it was first coined. So was "Yahoo" and "Google" and "Linux" and "WYSIWYG" and "SCSI" and "Drupal" and so on... Silly names become second-nature once they are used enough.

      I think the real problem is that people, inherently, are loathe to change. They are more apt to come up with rationalizations and justifications for doing things "the old way" rather than put in the work to learn (and code!) a new system. Sorry if this sounds harsh, but I find the people who say the binary prefixes "sound dumb" or say that "the current (inconsistent)* system works fine" are just coming up with excuses to avoid doing the work to use a properly consistent standard/notation.

      Maybe you're right, and that if the new prefixes had sounded "cooler", then adoption would have been faster... but I'm not so sure. Even if true, it doesn't absolve any of us for allowing the confusion to persist: cool or not, we (geeks especially!) should have the discipline to use proper standards.

      * The current system can be roughly described as: SI prefixes are powers of 10 everywhere except in computer science, when they become powers of 2. But only when referring to memory, and some data structure sizes, but not when referring to transmission rates or disk space (unless it's a flash drive, sometimes), and other kinds of data structures.
  • To all ext3 users... (Score:5, Informative)

    by c0l0 (826165) * on Tuesday May 06 2008, @12:56PM (#23314514) Homepage
    ...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/ [oracle.com] ). 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.
    • Re: (Score:3, Insightful)

      I agree btrfs looks nice, but its somewhat behind ext4 in terms of implmentation and stability (which is saying something) - theres the small matter of not yet handling E_NOSPACE, for instance
    • Re: (Score:3, Interesting)

      by Anonymous Coward
      I'm an XFS fan as well. I have been using it for years. I usually have my root/boot partition as ext3 (so grub works) and all data on XFS.

      XFS kills ext in terms of not losing data. I have recovered lots of data from failed drives that were XFS formatted. Not so with ext3 which tends to flake out and destroy itself when it gets bad data.

      And don't even mention ReiserFS, that has always sucked. I have lost more data to Reiser than any other filesystem (ext is a close second though). Sometimes it would co
    • by Jherek Carnelian (831679) on Tuesday May 06 2008, @04:29PM (#23317514)
      btrfs -- How fast are deletes?

      ext3 is both so slow and so bottlenecked that mythtv had to implement a special "slow delete" mode which gradually truncates files instead of just unlinking them. Without the "slow deletes" mode, you get hiccups in any shows that are being recorded while old shows are deleted.

      On my system, deleting a 20GB file can take a minute on ext3 (and the filesystem is completely locked - all other processes are blocked), but on ntfs it is almost instantaneous.
    • by glwtta (532858) on Tuesday May 06 2008, @05:36PM (#23318276) Homepage
      On a related sidenode: I'm very happy with SGI's xfs right now.

      I seem to be plugging XFS in every fs thread recently, so I'll second that - I'm really surprised it's not more popular.

      ext3 may have, more or less, caught up to XFS in IO speed recently, but file operations on large filesystems are still a disaster - just try deleting a 2TB tree with a couple million files in ext3, I dare you.
  • Step 1 (Score:3, Informative)

    by vga_init (589198) on Tuesday May 06 2008, @01:05PM (#23314628) Journal
    Step 1: Install Fedora 9

    OK, all done!
  • undelete (Score:5, Informative)

    by Nimey (114278) on Tuesday May 06 2008, @01:08PM (#23314656) Homepage Journal
    Oh, please. ext2 had "undelete" capability, just as it had filesystem compression capability. Neither were ever implemented.
  • Why bother? (Score:4, Informative)

    by jabuzz (182671) on Tuesday May 06 2008, @02:36PM (#23315898) Homepage
    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.
  • by Khopesh (112447) on Tuesday May 06 2008, @03:35PM (#23316780) Homepage Journal

    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 [wikipedia.org] gets you started with a nice mapping of features. Second, a benchmarking of filesystems from 2006 [linuxgazette.net] 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 [toms.net] (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.

    • by Sentry21 (8183) on Tuesday May 06 2008, @04:37PM (#23317648) Journal
      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.
        • Re:Wait, what? (Score:5, Informative)

          by Waffle Iron (339739) on Tuesday May 06 2008, @02:06PM (#23315472)
          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.

    • by mlwmohawk (801821) on Tuesday May 06 2008, @02:08PM (#23315492)
      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.

      • by Blakey Rat (99501) on Tuesday May 06 2008, @06:00PM (#23318506)
        Please.

        The greatest feature of modern software is "Undo." Everything I can screw up on the computer should have an Undo-- that's what the Recycle Bin (or Trash Can for Mac users) is there for, although it's a bit more awkward than pressing control-Z.

        Call it stupidity if you want, but my system files (you know, the ones that file permissions actually protect from malware) are worth approximately zero, and my personal files (the ones that malware can delete no question asked) are worth hundreds of man-hours, if not thousands, and ten times that in dollar value.

        Windows Shadow Copy has an exact template on how to implement it, now go implement it.

        (And yes, I keep backups, as should everybody. But there's no excuse not to use spare disk space as another layer of defense.)
    • Re: (Score:3, Funny)

      by Anonymous Coward
      Perhaps you should try prm (pansy rm) or psh (pansy shell).