Announcement

Collapse
No announcement yet.

Is XFS appropriate for root partition ?

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Is XFS appropriate for root partition ?

    Hi

    I recenty bought a new, big harddrive, and I formatted the main partitions (/ and /home) as xfs, because, for one thing, formatting is so much faster than ext3. But I have had lots of stability issues.

    So, here is the question: is it safe to use xfs for the root partition ? I've read many comments saying that it's not a good idea, but I haven't found any good argument as of why.

    Anyway, thanks in advance for your help!

    #2
    Re: Is XFS appropriate for root partition ?

    I think it's also worth asking the same question about ReiserFS 3 and 4. I've heard they are fast, but low latency (therefore desktop would be sluggish). I personally have used ext3 always, but I am wondering if there are any advantages to ReiserFS or XFS (for root partition).

    Comment


      #3
      Re: Is XFS appropriate for root partition ?

      Correct. Same goes for jfs. I read many reviews/benchmarks before making the decision. It seemed to me that, for general purpose desktop usage, xfs had an edge (good performance in most aspects, and fairly low cpu usage). My concern has to do with data integrity, robustness of the fs, etc. Maybe there is nothing to worry about. :-D

      Comment


        #4
        Re: Is XFS appropriate for root partition ?

        So, I had to do my own research

        I loved this video, very informative and very useful:
        http://mirror.linux.org.au/pub/linux.../talks/348.ogg

        Can xfs be used for a root partition ? Yes. See here:
        http://oss.sgi.com/projects/xfs/faq.html

        Should xfs be used for a root partition ? My thinking is: for most people, the answer is no. Xfs is mature and high performance, but part of the performance gain comes from an aggresive use of memory cache. See here:
        http://en.wikipedia.org/wiki/XFS#Disadvantages

        In particular, I was having thermal issues in my PC. I overclocked the CPU, but having added one harddrive, and with warmer weather, I started to have system crashes. And, voila, it looks like I was losing data on these forced reboots. Just like explained in wikipedia.

        OTOH, I love being able to defragment a mounted xfs partition with one single command (xfs_fsr). Also, when creating big partitions, formatting to xfs is so, so, so much faster than ext3.

        Something worrying, mentioned in the xfs faq (linked above), is that disk cache should be turned off in journaled fs's. It makes all the sense. Once you the fs writes to the disk, it doesn't know if it is in the cache or in the actual disk. A power failure will make this data be lost ... right ? Right Most distros turn it on by default! Am I missing something here ?

        To summarize, here is how I will format my disk _next_ time:



        /
        15 GB
        ext3


        /home
        15 GB
        ext3


        /data
        200+ GB
        xfs



        I will put all media files (music, home DVD's, pictures) in /data. This way you have the best of both worlds. A very fast fs for the large data chuncks that are mostly read, in /data, and a slower but more robust fs for / and /home. Keep in mind that /home has lots of important files being written all the time by KDE to keep track of the status of the programs, configuration, session information, etc.

        Ok, here go my 2cts.

        Cheers !

        Comment


          #5
          Re: Is XFS appropriate for root partition ?

          That seems reasonable. Though to my knowledge all Linux filesystems shouldn't need defragging; the file allocation is done to minimise fragmentation in the first place, though it is liable to occur once disk usage rises above 80%.

          What originally attracted me to XFS is the online growth capability, which combined with LVM makes it easy to initially set some disk space aside, for use later. OTOH don't expect to be able to SHRINK an XFS partition.

          My current system is:

          # <file system> <mount point> <type> <options> <dump> <pass> [size]
          /dev/hda1 / ext2 defaults,errors=remount-ro 0 1 [897M]
          /dev/mapper/system-home2 /home xfs defaults 0 2 [31G]
          /dev/mapper/system-usr /usr xfs defaults 0 2 [4.0G]
          /dev/mapper/system-var /var xfs defaults 0 2 [1014M]

          also /opt is a symlink to /usr/opt
          I am running Ubuntu 8.10 (yes Gnome) with upgrades applied daily about 0900 UK time. Hardware is Dell Precision 420, 2x 800 MHz PIII, 512 MB RDRAM, nVidia GeForce 6800 128 MB AGP graphics, 18GB SCSI and 500GB IDE HDDs, DVD burner, Hauppage TV card.

          Comment


            #6
            Re: Is XFS appropriate for root partition ?

            Originally posted by Cyrus Jones
            I've heard they are fast, but low latency (therefore desktop would be sluggish).
            Do you mean high latency perhaps?

            Comment


              #7
              Re: Is XFS appropriate for root partition ?

              I played with setting up XFS filesystems on my last go-around installing Linux. With elive, it absolutely refuses to install without a separate partition designated for /boot. With Kubuntu (Feisty Herd 4 installer), it would install /boot under /, if you wish, but with a warning, and if you choose "go ahead with it", then it would set up LILO, not Grub. After researching the XFS boot issues, I backed off and went with reiserfs (3.6, I believe it is), and have no issues related to filesystems. It's a little slower booting than ext3, but I don't notice anything different once it's running. I had a (new) keyboard die last weekend - a lot of the keys on the right half were disabled by the circuit failure, and of course it only showed itself during a boot, so I was not able to enter my password, meaning I could never do a graceful shutdown. I accepted my fate and used the reset switch, and then went and found my spare keyboard a rebooted with that one. Upon reboot, I got the "Filesystem is NOT OK" messages, and it checked/fixed all 3 hard drives. But the reiserfs seems to have worked as advertised and recovered itself flawlessly.

              So there's one empirical datapoint for the deliberations.

              Comment


                #8
                Re: Is XFS appropriate for root partition ?

                i've used xfs for / (well, for everything, really) in the past with no issues whatsoever.
                now i use ext3 for /, /boot and /home and xfs for the music, movies and pictures.
                just like your proposed partitioning.

                if anyone were up for some serious testing, here's a filesystem benchmark:
                http://www.iozone.org

                some plus and minus that crop up:
                ext3 has undelete, xfs has not
                ext3 default settings will "waste" more space than xfs (on big filesystemd i might add up to...a lot)
                ext3 default settings will force a fsck every some many reboots (you can tune or work around this)
                ext3 grows and shrinks, xfs only grows

                ttbomk, defrag is something confined to the other world.
                your proposed partitioning seems more than reasonable.

                hope this helps
                cheers
                gnu/linux is not windoze

                Comment


                  #9
                  Re: Is XFS appropriate for root partition ?

                  Originally posted by cantab
                  That seems reasonable. Though to my knowledge all Linux filesystems shouldn't need defragging; the file allocation is done to minimise fragmentation in the first place, though it is liable to occur once disk usage rises above 80%.
                  Yes, I have heard this over and over. But I never saw actual compelling data on that. In fact, Wikipedia seems to contradict this common knowledge:

                  http://en.wikipedia.org/wiki/Defragmentation

                  And, at least in xfs, I am running the defragger frequently. The first time it took a long time, now it's running in a snap. From the man page:

                  xfs_fsr improves the organization of mounted filesystems. The reorga-
                  nization algorithm operates on one file at a time, compacting or other-
                  wise improving the layout of the file extents (contiguous blocks of
                  file data).
                  Anyway, this discussion is very productive, thanks to all involved! Cheers !

                  Comment


                    #10
                    Re: Is XFS appropriate for root partition ?


                    Well, since everyone is chiming in, let me throw in my two bits.

                    We run Linux in a production environment, and about two years ago I was where you are now, with regards to deciding on XFS vs EXT3. I did a lot of research, but I don't think I have anything to add to what has already been said, but let me tell you what we ended up going with.

                    We set up our boxen (mostly IBM eServer Xseries 346 2U servers) with ext3 on system disks. We just feel that ext3 is a little more proven in this area, and the points you made about disk write cache are a valid concern.

                    Now, many of our servers have attached disk storage units (DSU)s. We have something like 50Tb of storage on these things, and they are all using XFS for the filesystems. I haven't had any trouble whatsoever with any of these DSUs. While it is true that our systems are on UPS operation, there have been a few times that machines have gone down ungracefully, and (so far, crossing fingers as hard as possible) we haven't had any filesystem problems with XFS.

                    Well, at the end of the day this is just more anecdotal evidence, but at least it's a reasonably large anecdote!

                    Comment


                      #11
                      Re: Is XFS appropriate for root partition ?

                      Very interesting, thanks a lot DaMoGan!

                      Originally posted by DaMoGan
                      We set up our boxen (mostly IBM eServer Xseries 346 2U servers) with ext3 on system disks. We just feel that ext3 is a little more proven in this area, and the points you made about disk write cache are a valid concern.
                      I think it's the best decision. This bug report says it all:
                      https://launchpad.net/ubuntu/+bug/37435

                      There are two main camps in the discussions in this bug report: those saying that xfs's behavior (in a very specific situation described in the report) is buggy, and those who way that it is correct (standards compliant). But in any case, it seems evident that a lot of linux software is written assuming that the FS behaves like ext3 in the default configuration. Which means, is the power goes off or the system hangs in the middle of some important operation, ext3 seems the most likely fs to recover gracefully.

                      Cheers!

                      Comment

                      Working...
                      X