Please create an account to participate in the Slashdot moderation system


Forgot your password?
Data Storage Software IT Linux

How To Move Your Linux Systems To ext4 304

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."
This discussion has been archived. No new comments can be posted.

How To Move Your Linux Systems To ext4

Comments Filter:
  • Re:Wait, what? (Score:1, Interesting)

    by VeNoM0619 ( 1058216 ) on Tuesday May 06, 2008 @02:10PM (#23314688)
    Seeing how processing becomes faster and faster: in batch file processing (just an example) where tens of files get processed in a single second. It may be useful to know which files processed in what order, in which case the precision could be useful. Think of it more as a feature than a necessity though I suppose.
  • by miscz ( 888242 ) on Tuesday May 06, 2008 @02:14PM (#23314744)
    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.
  • by swilver ( 617741 ) on Tuesday May 06, 2008 @02:42PM (#23315166)
    That's all fine and dandy, but will it allow me to somehow undelete/recover when I accidently type rm -Rf /hugedir -- yes I know there are other ways to delete stuff, I just find it ridiculous that all linux file systems with the exception of ext2 make no effort at all to be able to recover from such a common mistake. Of course, rm not giving any indication at all about how many bytes and files it is about to remove doesn't help either.
  • by XorNand ( 517466 ) * on Tuesday May 06, 2008 @02:43PM (#23315174)

    Ext3 tops out at 32 tebibyte (TiB) file systems and 2 TiB files, but practical limits may be lower than this depending on your architecture and system settings--perhaps as low as 2 TiB file systems and 16 gibibyte (GiB) files.
    Is this really the case? I created a 100GB file on ext3 earlier this week. It contains a virtual machine image that I am currently running under Xen. I haven't yet had a problem. I would guess that >16GB files are pretty commonly used in the world of Xen.
  • by Anonymous Coward on Tuesday May 06, 2008 @03:12PM (#23315542)
    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 corrupt files just from rebooting the machine. I have never lost data on an XFS partition that wasn't due to hardware failure.
  • by stuporglue ( 1167677 ) on Tuesday May 06, 2008 @03:21PM (#23315684) Homepage
    I have the following disks in my computer:

    1 TB
    500 GB
    300 GB

    When they decide to fsck at the same time, it can take 1/2 hour or longer to get to the login screen.
  • by dpilot ( 134227 ) on Tuesday May 06, 2008 @03:27PM (#23315756) Homepage Journal
    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 large data size without having the right options set. But it works.
  • by EvilRyry ( 1025309 ) on Tuesday May 06, 2008 @03:49PM (#23316068) Journal
    This is why we have XFS. I fscked a 9TB partition is under 10 minutes. Hopefully they've done some improvements for ext4 in this area. A volume that takes days to fsck might as well just die completely.
  • by VirusEqualsVeryYes ( 981719 ) on Tuesday May 06, 2008 @03:56PM (#23316196)
    I am not a professional linguist, but I think I can explain.

    In any spoken language, different sounds are loosely associated with different ideas. As a simple example, voiceless sounds, like p, k, t, f, and s, are well suited for pointed use, as in pejoratives; and r, especially the alveolar trill variety, is associated with intimidation or primality. These associations are made either because it sounds like something else ("rrrr" sounds like an animal's growl or roar -- notice the Rs in "growl" and "roar"?) or because the sound serves a purpose (hard, clipped sounds serve well as punctuation -- notice all the hard sounds in "punctuate"?). In the latter case, combinations of sounds can invoke a wide array of ideas or feelings. Utilization of these things is key to a good punchline or to controlling semiconscious undertones of speech. I admire Dr. Seuss in particular for his mastery of sound combinations in making up suitable words to balance sing-song silliness with gravity and purpose.

    Now, returning to "tebibyte" and all the other -bibytes, soft, voiced consonants like B are associated with childishness (a baby might make these sounds), silliness, bounciness, or informality. Two Bs in a row are especially so: bib, baboon, babble, bob, boob. The reason tebibyte sounds "stupid" is that it describes a technical idea using unsuitable sounds.

    This being said, if you were used to using the word, you wouldn't think twice about it. You would probably complain about "flop" and "watt" in the same way if the words were new, but established use overrides the weak sound associations. The President could be instead called the Biggyloppalo and few would care, as long as the term were already established in the common vocabulary. I'd think people would move on even if a video game console were named something as ridiculous as "Wii" ... but that's just a wild guess.

    As for my opinion on the matter, I'm in favor of it. The SI prefixes are already assumed to be powers of 10 in all other fields except the computer and information sciences. Tebibyte will maybe sound silly for awhile, but the problem will go away given time. And I, for one, look forward to buying futuristic data storage without feeling a little cheated.
  • Re:undelete (Score:2, Interesting)

    by jsm300 ( 669719 ) on Tuesday May 06, 2008 @05:02PM (#23317152)
    Huh? There are undelete tools for ext2. Undelete is impossible for ext3 since the information needed to do it is gone immediately once a file is removed, whereas it will still be present in a ext2 file system until it gets overwritten as new files are created.
  • by ( 653730 ) on Tuesday May 06, 2008 @05: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 Jherek Carnelian ( 831679 ) on Tuesday May 06, 2008 @05: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 Sancho ( 17056 ) * on Tuesday May 06, 2008 @06:27PM (#23318194) Homepage
    Why not? When storage density gets so high and the drives get so cheap, why not rip all of your movies and store them on disk? I'm lazy, and don't want to get up to change the disk.
  • by steveha ( 103154 ) on Tuesday May 06, 2008 @06:52PM (#23318434) Homepage
    It seems like it would be bog simple (disclaimer: I am not much of a programmer... salt at the ready) to remap unlinking of a file to relinking it to a trash directory, something like $HOME/.Trash (there's per-volume trashes too, but I always forget where those live. Probably on the volume) :P Then, and this is the important part: 1, when free space is requested, files in the trash are not shown in the quota and 2, when a file operation requires disk space, instead of failing it, we unlink some files for real based on some sort of reasonable algorithm.

    Hear, hear. I second this.

    You know why I want this so much? Because I used to have this. When I ran Windows 98 with Norton Utilities I had a feature called the "Norton Protected Recycle Bin". It had the following properties:

    0) When a file was deleted by any means it would go into the NPRB. If you copied file "foo" onto file "bar", the old "bar" would go into the NPRB. If you went into a DOS shell and ran the "del" command, the files you deleted would go into NPRB.

    1) The original name, original location, timestamp of the file at the time of deletion, and time of deletion were all saved and were visible in the list of deleted files.

    2) You could specify a do-not-save list, both by filespec (example: do not save "*.tmp", "*.bak", etc.) and by location (example: do not save any files in C:\Windows\Temp, etc.) And sensible defaults were provided (all my examples here were set by default, plus more).

    3) Your deleted files would age out. It would automatically purge files that were deleted more than 14 days ago (by default; of course you could change it). I liked to keep mine set for 3 days auto-purge; I pretty much always un-deleted something seconds after deleting it, so the longer period didn't help much. And disks were small in those days...

    I don't think it would ever empty the NPRB automatically just because you were out of disk space. But it was trivial to right-click on the Recycle Bin icon on the desktop and choose "Empty Norton Protected Recycle Bin".

    To do the above properly in Linux, the file system should have a way to specify whether a given file should be saved or simply deleted. The Ext2 file system has an attribute you can set on a file requesting that it be saved instead of deleted; read the man page for chattr(1) and look for the 'u' attribute. (Then read the "Bugs" section at the end, where it says that the undelete feature has never actually been implemented.)

    The file system should handle the deletion or saving of files, and then user-space utilities should be able to get a list of saved files, undelete a saved file, empty the saved files, etc. Of course users should only be able to delete their own files, so ownership and permissions need to be checked too.

    With this feature, and today's huge hard disks, a Linux desktop would be great for ordinary users.

    P.S. If you have Vista, and you get Norton Utilities, is there still a Protected Recycle Bin feature? Or is that one of the things that Vista loses? For that matter, can you still do this in XP?


  • by Sancho ( 17056 ) * on Tuesday May 06, 2008 @07:24PM (#23318734) Homepage
    I have scripts to automate any digital conversions that I perform, so time isn't really a factor. It's easy enough to grab a stack of discs, set them by my workstation, and do the ripping while you're working on other tasks. If you have a media PC that you use to play back DVDs, you can perform the ripping there the first time that you want to watch the movie. Any time someone else wants to watch it, they can just watch the cached version.

    As for your other points, it's largely a packrat mentality. There have been times when I wished that I could rent a movie, only to find that it's no longer available on DVD. Sometimes Netflix has it, sometimes they don't, but when production stops, it stops, and as copies of the movie wear out, it becomes much harder to come by. That makes purchasing them and backing them up on magnetic media more attractive, even if I may not get around to watching the films again any time soon.

  • by LWATCDR ( 28044 ) on Tuesday May 06, 2008 @07:55PM (#23318964) Homepage Journal
    Yes I have thought about setting up a media PC but then I would have to set up an NAS and then I would want to move over to GigaE. Once I did that I would want to get an IPod Touch and write a WiFi based Universal remote program for it....
    It is just more productive to grab the DVD.
  • by Random Walk ( 252043 ) on Wednesday May 07, 2008 @06:21AM (#23321980)
    XFS has that nasty 'security' feature that it will zero files that were open when the power failed. Never use XFS on hardware that has no battery backup to shutdown properly if you trip over the power cable.

In seeking the unattainable, simplicity only gets in the way. -- Epigrams in Programming, ACM SIGPLAN Sept. 1982