Difference between revisions of "XFS Filesystem"
(→Possible Issues) |
(→Possible Issues) |
||
Line 1: | Line 1: | ||
{{Wikipedia|XFS}} | {{Wikipedia|XFS}} | ||
− | == | + | == Description == |
− | It | + | |
− | + | [http://en.wikipedia.org/wiki/XFS XFS] is just another file system. If you're familiar with Windows, you could chose from FAT (aka FAT16) from the Win95 days, FAT32, and NTFS. XFS is just another option for you to use for your /myth partition. The default file system under [http://knoppmyth.net Knoppmyth]is [http://en.wikipedia.org/wiki/Ext3 ext3]. | |
+ | |||
+ | ;Major advantages of XFS: | ||
+ | #Handles large files much better and more efficiently than ext3. | ||
+ | #Minimize both storage access time (HD read/write) and processing power (very low CPU usage). | ||
+ | #Allows users to defrag files to further minimize read/write times. | ||
+ | |||
+ | XFS really excels at handling large files like those you'll generate with mythtv (your captures and video files). The filesizes of both SD and HDTV content for example can be quite large, on the order of multi-gigs per hour. Deleting files that are stored on an XFS partition happens VERY rapidly and without your frontend waiting as the disk drives grinds away deleting the file under the default ext3 file system. XFS also allows you to defrag your partition which can also speed up access time to large files. | ||
+ | |||
+ | For more on XFS and performance, see [http://www.ibm.com/developerworks/linux/library/l-fs9.html this page]. [http://oss.sgi.com/projects/xfs/ This link] provides a high-level overview beyond what was discussed above. | ||
+ | |||
+ | ;Major disadvantages of XFS: | ||
+ | # It isn't supported by fsck/you have to manually do it. | ||
+ | # If you have a sudden power failure you *may* lose some data that is being written. | ||
+ | # XFS partitions cannot be shrunk once they are made. | ||
+ | |||
+ | There are potential downsides to an XFS partition. For one, fsck won't run on it (the format isn't supported by the program) and as such, your /myth will not get auto checked every 30 boots (Knoppmyth default). This really isn't an issue since there is a supplied program that will check and repair XFS file systems. The potential rub is that you have to manually run it (explained below). Another negative of switching is the nature of the filesystem can allow for data loss if the box isn't shutdown cleanly (i.e. if your power suddenly goes out and the box was writing data to the drive). There is the potential for data corruption to occur, but that doesn't mean that it is certain to occur. I mention it because the possibility is there and that XFS might be more susceptible to this than ext3 (the jury is still out on this one). You should know that data corruption can occur to ANY filesystem that isn't cleanly shutdown. This statement is true to any file system (ext3, XFS, NTFS, FAT32, etc.) on any O/S (LINUX, UNIX, Windows, etc.) | ||
+ | |||
+ | That said, I have experienced several "dirty shutdowns" (due to thunderstorms and power outages) since switching to XFS. Upon restarting the box, I ran the disk check program (explained below) and didn't experience any detectable corruption. By contrast, I did lose data a few years ago on a power failure when I was using ext3. | ||
== Maintenance == | == Maintenance == |
Revision as of 18:59, 1 August 2008
Description
XFS is just another file system. If you're familiar with Windows, you could chose from FAT (aka FAT16) from the Win95 days, FAT32, and NTFS. XFS is just another option for you to use for your /myth partition. The default file system under Knoppmythis ext3.
- Major advantages of XFS
- Handles large files much better and more efficiently than ext3.
- Minimize both storage access time (HD read/write) and processing power (very low CPU usage).
- Allows users to defrag files to further minimize read/write times.
XFS really excels at handling large files like those you'll generate with mythtv (your captures and video files). The filesizes of both SD and HDTV content for example can be quite large, on the order of multi-gigs per hour. Deleting files that are stored on an XFS partition happens VERY rapidly and without your frontend waiting as the disk drives grinds away deleting the file under the default ext3 file system. XFS also allows you to defrag your partition which can also speed up access time to large files.
For more on XFS and performance, see this page. This link provides a high-level overview beyond what was discussed above.
- Major disadvantages of XFS
- It isn't supported by fsck/you have to manually do it.
- If you have a sudden power failure you *may* lose some data that is being written.
- XFS partitions cannot be shrunk once they are made.
There are potential downsides to an XFS partition. For one, fsck won't run on it (the format isn't supported by the program) and as such, your /myth will not get auto checked every 30 boots (Knoppmyth default). This really isn't an issue since there is a supplied program that will check and repair XFS file systems. The potential rub is that you have to manually run it (explained below). Another negative of switching is the nature of the filesystem can allow for data loss if the box isn't shutdown cleanly (i.e. if your power suddenly goes out and the box was writing data to the drive). There is the potential for data corruption to occur, but that doesn't mean that it is certain to occur. I mention it because the possibility is there and that XFS might be more susceptible to this than ext3 (the jury is still out on this one). You should know that data corruption can occur to ANY filesystem that isn't cleanly shutdown. This statement is true to any file system (ext3, XFS, NTFS, FAT32, etc.) on any O/S (LINUX, UNIX, Windows, etc.)
That said, I have experienced several "dirty shutdowns" (due to thunderstorms and power outages) since switching to XFS. Upon restarting the box, I ran the disk check program (explained below) and didn't experience any detectable corruption. By contrast, I did lose data a few years ago on a power failure when I was using ext3.
Maintenance
# xfs_db -c frag -r /dev/device
can be used to get an idea as to the fragmentation percentage.
# xfs_fsr
command can be used to defragment a partition. You can safely run xfs_fsr nightly (or early in the morning) to "defrag" the partition. Doing so nightly will use less resources than doing so "whenever".