SlideShare a Scribd company logo
FILE SYSTEMSFILE SYSTEMS
Submitted by:
AJAY SOOD
File SystemsFile Systems
 File organizationFile organization
 Access methodsAccess methods
 Directory Organization: single, two-level,Directory Organization: single, two-level,
hierarchyhierarchy
 File system and directory implementationFile system and directory implementation
 Allocation schemes : contiguous, linked,Allocation schemes : contiguous, linked,
indexedindexed
File systemFile system
In a computer, a file system (sometimes writtenIn a computer, a file system (sometimes written
filesystem) is the way in which files are named andfilesystem) is the way in which files are named and
where they are placed logically for storage and retrieval.where they are placed logically for storage and retrieval.
The logical unit within a file system is the fileThe logical unit within a file system is the file
 logical files are mapped into physical entities by the OSlogical files are mapped into physical entities by the OS
 in user's view, file is the smallest unit that can be savedin user's view, file is the smallest unit that can be saved
to diskto disk
FILE SYSTEMFILE SYSTEM
 A file system defines the structure and the rules used toA file system defines the structure and the rules used to
read, write, and maintain information stored on a disk.read, write, and maintain information stored on a disk.
 Which system used is determined by;Which system used is determined by;
 HardwareHardware
 SoftwareSoftware
 Security needsSecurity needs
 Need for a dual-booting systemNeed for a dual-booting system
XFS: the big storage file systemXFS: the big storage file system
for Linuxfor Linux
XFSXFS
 XFS is a fifile system that wasXFS is a fifile system that was
dedesigned from day one for computersigned from day one for computer
systems with large numbers of CPUs andsystems with large numbers of CPUs and
large disk arrays. It focuses on supportinglarge disk arrays. It focuses on supporting
large files and good streaming I/Olarge files and good streaming I/O
performance. It also has some interestingperformance. It also has some interesting
administrative features not supported byadministrative features not supported by
other Linux file systems.other Linux file systems.
HISTORYHISTORY
 XFS has been less well known to many averageXFS has been less well known to many average
Linux users but has always been the state of theLinux users but has always been the state of the
art at the very high end. XFS itself did notart at the very high end. XFS itself did not
originate on Linux but was first released on IRIX, aoriginate on Linux but was first released on IRIX, a
UNIX variantUNIX variant
 for SGI workstations and servers, in Decemberfor SGI workstations and servers, in December
1994, almost 15 years ago. Starting in 1999, XFS1994, almost 15 years ago. Starting in 1999, XFS
was ported to Linux as part of SGI’s push to usewas ported to Linux as part of SGI’s push to use
Linux and Intel’s Itanium processors as the wayLinux and Intel’s Itanium processors as the way
forward for its high-end supercomputing systems.forward for its high-end supercomputing systems.
HISTORY continuedHISTORY continued
 Today even low-end workstations with a small number ofToday even low-end workstations with a small number of
CPU cores and disks come close to the limits of ext3CPU cores and disks come close to the limits of ext3
(see Table 1). While there is another adaption of the FFS(see Table 1). While there is another adaption of the FFS
concept called ext4 under development to mitigate theseconcept called ext4 under development to mitigate these
limits to a certainlimits to a certain
 extent, it seems as though basic FFS design is close toextent, it seems as though basic FFS design is close to
maxed out.maxed out.
 To address these limits, ext3 is evolving into ext4 byTo address these limits, ext3 is evolving into ext4 by
incorporating features pioneered by XFS such asincorporating features pioneered by XFS such as
delayed allocations and extents.delayed allocations and extents.
COMPARISONCOMPARISON
limit ext3 ext4 xfs
Max file system
size
16tib 16tib 16eib
Max file size 2tib 8tib 8eib
Max extent size 4kib 128mib 8gib
Max extended
attribute size
4kib 4kib 64kib
Space Allocation and ManageSpace Allocation and Manage
mentment
 Each XFS file system is partitioned into regions calledEach XFS file system is partitioned into regions called
allocation groups (AGs). Allocation groups are somewhatallocation groups (AGs). Allocation groups are somewhat
similar to the block groups in ext3For most files, a simplesimilar to the block groups in ext3For most files, a simple
linear array of extent descriptors is embedded into thelinear array of extent descriptors is embedded into the
inode, avoiding additional metadata blocks andinode, avoiding additional metadata blocks and
management overhead. For very large files or filesmanagement overhead. For very large files or files
containing many holes, the number of extents can be toocontaining many holes, the number of extents can be too
large to fit directly into the inode.large to fit directly into the inode.
 In this case, extents are tracked by another B+ tree withIn this case, extents are tracked by another B+ tree with
its root in the inode. This tree is indexed by the offsetits root in the inode. This tree is indexed by the offset
into the file, which allows an extent descriptor for a giveninto the file, which allows an extent descriptor for a given
file offset to be found quicklyfile offset to be found quickly
INODE and attributesINODE and attributes
 The XFS inode consists of three parts: the inode core, the data fork, and the optionalThe XFS inode consists of three parts: the inode core, the data fork, and the optional
attribute fork. The inode core contains traditional UNIX inode metadata such asattribute fork. The inode core contains traditional UNIX inode metadata such as
owner and group, number of blocks, timestamps, and a few XFS-specific additionsowner and group, number of blocks, timestamps, and a few XFS-specific additions
such as project ID. The data fork contains the previously mentioned extentsuch as project ID. The data fork contains the previously mentioned extent
descriptors or the root of the extent map. The optional attribute fork contains the so-descriptors or the root of the extent map. The optional attribute fork contains the so-
called extended attributes. The conceptcalled extended attributes. The concept
 of extended attributes is not part of the Posix file system interface but is supported byof extended attributes is not part of the Posix file system interface but is supported by
all modern operating systems and file systems with slightly differing semantics. Inall modern operating systems and file systems with slightly differing semantics. In
Linux, extended attributes are simple name/value pairs assigned to a file that can beLinux, extended attributes are simple name/value pairs assigned to a file that can be
listed and reaInodes in XFS are dynamically allocated, which means that, unlikelisted and reaInodes in XFS are dynamically allocated, which means that, unlike
many other Linux file systems, their location and number are not determined at mkfsmany other Linux file systems, their location and number are not determined at mkfs
time. This means that there is no need to predict the expected number of inodestime. This means that there is no need to predict the expected number of inodes
when creating the file system, with the possibility of under- or overprovision.d orwhen creating the file system, with the possibility of under- or overprovision.d or
written one attribute at a time.written one attribute at a time.
Xfs file system for linux
DISK QUOTASDISK QUOTAS
 XFS provides an enhanced implementation of the BSD disk quotas. ItXFS provides an enhanced implementation of the BSD disk quotas. It
supportssupports
 the normal soft and hard limits for disk space usage and number of inodesthe normal soft and hard limits for disk space usage and number of inodes
as an integral part of the file system. Both the per-user and per-groupas an integral part of the file system. Both the per-user and per-group
quotas supported in BSD and other Linux file systems are supported. Inquotas supported in BSD and other Linux file systems are supported. In
additionaddition
 to group quotas, XFS alternatively can support project quotas, where ato group quotas, XFS alternatively can support project quotas, where a
project is an arbitrary integer identifier assigned by the systemproject is an arbitrary integer identifier assigned by the system
administrator.administrator.
 The project quota mechanism in XFS is used to implement directory treeThe project quota mechanism in XFS is used to implement directory tree
quota, where a specified directory and all of the files and subdirectoriesquota, where a specified directory and all of the files and subdirectories
below it are restricted to using a subset of the available space in the filebelow it are restricted to using a subset of the available space in the file
system.system.
DIRECT I/ODIRECT I/O
Crash RecoveryCrash Recovery
 For today’s large file systems, a full file system check on an uncleanFor today’s large file systems, a full file system check on an unclean
shutdownshutdown
 is not acceptable because it would take too long. To avoid the requirementis not acceptable because it would take too long. To avoid the requirement
 for regular file system checks, XFS uses a write-ahead logging scheme thatfor regular file system checks, XFS uses a write-ahead logging scheme that
enables atomic updates of the file system. XFS only logs structural updatesenables atomic updates of the file system. XFS only logs structural updates
 to the file system metadata, but not the actual user data, for which the Posixto the file system metadata, but not the actual user data, for which the Posix
file system interface does not provide useful atomicity guarantees.file system interface does not provide useful atomicity guarantees.
 XFS logs every update to the file system data structures and does not batchXFS logs every update to the file system data structures and does not batch
changes from multiple transactions into a single log write, as is done bychanges from multiple transactions into a single log write, as is done by
ext3. This means that XFS must write significantly more data to the log inext3. This means that XFS must write significantly more data to the log in
case a single metadata structure gets modified again and again in shortcase a single metadata structure gets modified again and again in short
sequencesequence
 (e.g., removing a large number of small files).(e.g., removing a large number of small files).
DirectoriesDirectories
 XFS supports two major forms of directories. If a directory contains only aXFS supports two major forms of directories. If a directory contains only a
few entries and is small enough to fit into the inode, a simple unsorted linearfew entries and is small enough to fit into the inode, a simple unsorted linear
 format can store all data inside the inode’s data fork. The advantage of thisformat can store all data inside the inode’s data fork. The advantage of this
format is that no external block is used and access to the directory isformat is that no external block is used and access to the directory is
extremely fast, since it will already be completely cached in memory once itextremely fast, since it will already be completely cached in memory once it
is accessed. Linear algorithms, however, do not scale to large directoriesis accessed. Linear algorithms, however, do not scale to large directories
with millions of entries. XFS thus again uses B+ trees to manage largewith millions of entries. XFS thus again uses B+ trees to manage large
directories.directories.
 Compared to simple hashing schemes such as the htree option in ext3 andCompared to simple hashing schemes such as the htree option in ext3 and
ext4, a full B+ tree provides better ordering of readdir results and allows forext4, a full B+ tree provides better ordering of readdir results and allows for
returning unused blocks to the space allocator when a directory shrinks. Thereturning unused blocks to the space allocator when a directory shrinks. The
much improved ordering of readdir results can be seen in Figuremuch improved ordering of readdir results can be seen in Figure
 2, which compares the read rates of files in readdir order in a directory with2, which compares the read rates of files in readdir order in a directory with
100,000 entries100,000 entries..
Day to day useDay to day use
 A file system in use should be boring andA file system in use should be boring and
mostly invisible to the systemmostly invisible to the system
administratoradministrator
 and user. But to get to that state the fileand user. But to get to that state the file
system must first be created.system must first be created.
 An XFS file system is created with theAn XFS file system is created with the
mkfs.xfsmkfs.xfs command, which is trivial to use:command, which is trivial to use:
ConclusionConclusion
 This presentation gave a quick overviewThis presentation gave a quick overview
of the features of XFS, the Linux fileof the features of XFS, the Linux file
systemsystem
 for large storage systems. I hope it clearlyfor large storage systems. I hope it clearly
explains why Linux needs a file systemexplains why Linux needs a file system
that differs from the default and alsothat differs from the default and also
shows the benefits of a file systemshows the benefits of a file system
designed for large storage from day one.designed for large storage from day one.
DISADVANTAGESDISADVANTAGES
• An XFS file system cannot be shrunk, which would be useful, forAn XFS file system cannot be shrunk, which would be useful, for
example, in some virtualized environments.example, in some virtualized environments.
• Metadata operations in XFS have historically been slower than withMetadata operations in XFS have historically been slower than with
other file systems, resulting in, for example, poor performance withother file systems, resulting in, for example, poor performance with
operations such as deletions of large numbers of files. However, aoperations such as deletions of large numbers of files. However, a
new XFS feature implemented by Dave Chinner and callednew XFS feature implemented by Dave Chinner and called delayeddelayed
logginglogging, available since version 2.6.39 of the Linux kernel mainline,, available since version 2.6.39 of the Linux kernel mainline,
is claimed to resolve this;is claimed to resolve this;[22][22]
performance benchmarks done by theperformance benchmarks done by the
developer in 2010 revealed performance levels to be similar to ext4developer in 2010 revealed performance levels to be similar to ext4
at low thread counts, and superior at high thread counts.at low thread counts, and superior at high thread counts.[23][23]
• No support for transparent data compressionNo support for transparent data compression
THANKSTHANKS

More Related Content

PDF
Analysis of Open-Source Drivers for IEEE 802.11 WLANs
PDF
Course 102: Lecture 20: Networking In Linux (Basic Concepts)
PDF
Nfv short-course-sbrc14-full
PDF
Tutorial WiFi driver code - Opening Nuts and Bolts of Linux WiFi Subsystem
PDF
DNS Security
PPTX
Data Structures used in Linux kernel
PPTX
Storage Basics
PDF
Course 102: Lecture 28: Virtual FileSystems
Analysis of Open-Source Drivers for IEEE 802.11 WLANs
Course 102: Lecture 20: Networking In Linux (Basic Concepts)
Nfv short-course-sbrc14-full
Tutorial WiFi driver code - Opening Nuts and Bolts of Linux WiFi Subsystem
DNS Security
Data Structures used in Linux kernel
Storage Basics
Course 102: Lecture 28: Virtual FileSystems

What's hot (20)

PDF
DDS: The IoT Data Sharing Standard
PDF
PostgreSQL + ZFS best practices
PPSX
FD.io Vector Packet Processing (VPP)
PDF
TRex Traffic Generator - Hanoch Haim
PDF
NVMe over Fabric
PDF
File systems for Embedded Linux
PDF
Course 102: Lecture 26: FileSystems in Linux (Part 1)
PPTX
PPTX
Cloudera Hadoop Distribution
PPTX
PPTX
High Bandwidth Memory(HBM)
PDF
TC Flower Offload
PDF
Practical CephFS with nfs today using OpenStack Manila - Ceph Day Berlin - 12...
PPTX
Fat 32 file system
PDF
Course 102: Lecture 27: FileSystems in Linux (Part 2)
PPTX
Krnet2018 kakao container cloud dkos
PDF
Using ZFS file system with MySQL
PDF
netfilter and iptables
PPTX
PDF
100 M pps on PC.
DDS: The IoT Data Sharing Standard
PostgreSQL + ZFS best practices
FD.io Vector Packet Processing (VPP)
TRex Traffic Generator - Hanoch Haim
NVMe over Fabric
File systems for Embedded Linux
Course 102: Lecture 26: FileSystems in Linux (Part 1)
Cloudera Hadoop Distribution
High Bandwidth Memory(HBM)
TC Flower Offload
Practical CephFS with nfs today using OpenStack Manila - Ceph Day Berlin - 12...
Fat 32 file system
Course 102: Lecture 27: FileSystems in Linux (Part 2)
Krnet2018 kakao container cloud dkos
Using ZFS file system with MySQL
netfilter and iptables
100 M pps on PC.
Ad

Viewers also liked (9)

PPT
Dbms
PPT
Ch 1-final-file organization from korth
PPT
File organization 1
PDF
File Systems
DOCX
Database management system
PPTX
Dbms slides
PPT
Database Management Systems (DBMS)
PPT
Management Information System (MIS)
Dbms
Ch 1-final-file organization from korth
File organization 1
File Systems
Database management system
Dbms slides
Database Management Systems (DBMS)
Management Information System (MIS)
Ad

Similar to Xfs file system for linux (20)

PDF
5231 140-hellwig
PPT
XFS.ppt
PPTX
FILE Implementation Introduction imp .pptx
DOCX
Linux File System.docx
PPTX
Ankit Bargali Ouiiihhhoojpk;oihigigiS BCA-IV.pptx
PDF
Operating Systems - Implementing File Systems
PPTX
Files and directories in Linux 6
PPTX
File system Os
PPTX
Operating System
PPSX
File system security
PDF
PARALLEL FILE SYSTEM FOR LINUX CLUSTERS
PDF
009709863.pdf
PPT
file management_part2_os_notes.ppt
PPTX
Disk and File System Management in Linux
PPT
Presentation on nfs,afs,vfs
PPTX
UNIT III.pptx
PPT
PPT
Ch12 OS
 
5231 140-hellwig
XFS.ppt
FILE Implementation Introduction imp .pptx
Linux File System.docx
Ankit Bargali Ouiiihhhoojpk;oihigigiS BCA-IV.pptx
Operating Systems - Implementing File Systems
Files and directories in Linux 6
File system Os
Operating System
File system security
PARALLEL FILE SYSTEM FOR LINUX CLUSTERS
009709863.pdf
file management_part2_os_notes.ppt
Disk and File System Management in Linux
Presentation on nfs,afs,vfs
UNIT III.pptx
Ch12 OS
 

Recently uploaded (20)

PDF
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
PDF
Digital Logic Computer Design lecture notes
PDF
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
PDF
Arduino robotics embedded978-1-4302-3184-4.pdf
PPTX
Geodesy 1.pptx...............................................
PPTX
Internet of Things (IOT) - A guide to understanding
PPTX
Strings in CPP - Strings in C++ are sequences of characters used to store and...
PDF
Well-logging-methods_new................
PPTX
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
PPTX
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
PPTX
UNIT-1 - COAL BASED THERMAL POWER PLANTS
PDF
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
PPTX
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
PPTX
web development for engineering and engineering
PPTX
Construction Project Organization Group 2.pptx
PPTX
CYBER-CRIMES AND SECURITY A guide to understanding
PPTX
OOP with Java - Java Introduction (Basics)
PPT
Mechanical Engineering MATERIALS Selection
PDF
Structs to JSON How Go Powers REST APIs.pdf
PDF
Embodied AI: Ushering in the Next Era of Intelligent Systems
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
Digital Logic Computer Design lecture notes
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
Arduino robotics embedded978-1-4302-3184-4.pdf
Geodesy 1.pptx...............................................
Internet of Things (IOT) - A guide to understanding
Strings in CPP - Strings in C++ are sequences of characters used to store and...
Well-logging-methods_new................
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
UNIT-1 - COAL BASED THERMAL POWER PLANTS
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
web development for engineering and engineering
Construction Project Organization Group 2.pptx
CYBER-CRIMES AND SECURITY A guide to understanding
OOP with Java - Java Introduction (Basics)
Mechanical Engineering MATERIALS Selection
Structs to JSON How Go Powers REST APIs.pdf
Embodied AI: Ushering in the Next Era of Intelligent Systems

Xfs file system for linux

  • 2. File SystemsFile Systems  File organizationFile organization  Access methodsAccess methods  Directory Organization: single, two-level,Directory Organization: single, two-level, hierarchyhierarchy  File system and directory implementationFile system and directory implementation  Allocation schemes : contiguous, linked,Allocation schemes : contiguous, linked, indexedindexed
  • 3. File systemFile system In a computer, a file system (sometimes writtenIn a computer, a file system (sometimes written filesystem) is the way in which files are named andfilesystem) is the way in which files are named and where they are placed logically for storage and retrieval.where they are placed logically for storage and retrieval. The logical unit within a file system is the fileThe logical unit within a file system is the file  logical files are mapped into physical entities by the OSlogical files are mapped into physical entities by the OS  in user's view, file is the smallest unit that can be savedin user's view, file is the smallest unit that can be saved to diskto disk
  • 4. FILE SYSTEMFILE SYSTEM  A file system defines the structure and the rules used toA file system defines the structure and the rules used to read, write, and maintain information stored on a disk.read, write, and maintain information stored on a disk.  Which system used is determined by;Which system used is determined by;  HardwareHardware  SoftwareSoftware  Security needsSecurity needs  Need for a dual-booting systemNeed for a dual-booting system
  • 5. XFS: the big storage file systemXFS: the big storage file system for Linuxfor Linux
  • 6. XFSXFS  XFS is a fifile system that wasXFS is a fifile system that was dedesigned from day one for computersigned from day one for computer systems with large numbers of CPUs andsystems with large numbers of CPUs and large disk arrays. It focuses on supportinglarge disk arrays. It focuses on supporting large files and good streaming I/Olarge files and good streaming I/O performance. It also has some interestingperformance. It also has some interesting administrative features not supported byadministrative features not supported by other Linux file systems.other Linux file systems.
  • 7. HISTORYHISTORY  XFS has been less well known to many averageXFS has been less well known to many average Linux users but has always been the state of theLinux users but has always been the state of the art at the very high end. XFS itself did notart at the very high end. XFS itself did not originate on Linux but was first released on IRIX, aoriginate on Linux but was first released on IRIX, a UNIX variantUNIX variant  for SGI workstations and servers, in Decemberfor SGI workstations and servers, in December 1994, almost 15 years ago. Starting in 1999, XFS1994, almost 15 years ago. Starting in 1999, XFS was ported to Linux as part of SGI’s push to usewas ported to Linux as part of SGI’s push to use Linux and Intel’s Itanium processors as the wayLinux and Intel’s Itanium processors as the way forward for its high-end supercomputing systems.forward for its high-end supercomputing systems.
  • 8. HISTORY continuedHISTORY continued  Today even low-end workstations with a small number ofToday even low-end workstations with a small number of CPU cores and disks come close to the limits of ext3CPU cores and disks come close to the limits of ext3 (see Table 1). While there is another adaption of the FFS(see Table 1). While there is another adaption of the FFS concept called ext4 under development to mitigate theseconcept called ext4 under development to mitigate these limits to a certainlimits to a certain  extent, it seems as though basic FFS design is close toextent, it seems as though basic FFS design is close to maxed out.maxed out.  To address these limits, ext3 is evolving into ext4 byTo address these limits, ext3 is evolving into ext4 by incorporating features pioneered by XFS such asincorporating features pioneered by XFS such as delayed allocations and extents.delayed allocations and extents.
  • 9. COMPARISONCOMPARISON limit ext3 ext4 xfs Max file system size 16tib 16tib 16eib Max file size 2tib 8tib 8eib Max extent size 4kib 128mib 8gib Max extended attribute size 4kib 4kib 64kib
  • 10. Space Allocation and ManageSpace Allocation and Manage mentment  Each XFS file system is partitioned into regions calledEach XFS file system is partitioned into regions called allocation groups (AGs). Allocation groups are somewhatallocation groups (AGs). Allocation groups are somewhat similar to the block groups in ext3For most files, a simplesimilar to the block groups in ext3For most files, a simple linear array of extent descriptors is embedded into thelinear array of extent descriptors is embedded into the inode, avoiding additional metadata blocks andinode, avoiding additional metadata blocks and management overhead. For very large files or filesmanagement overhead. For very large files or files containing many holes, the number of extents can be toocontaining many holes, the number of extents can be too large to fit directly into the inode.large to fit directly into the inode.  In this case, extents are tracked by another B+ tree withIn this case, extents are tracked by another B+ tree with its root in the inode. This tree is indexed by the offsetits root in the inode. This tree is indexed by the offset into the file, which allows an extent descriptor for a giveninto the file, which allows an extent descriptor for a given file offset to be found quicklyfile offset to be found quickly
  • 11. INODE and attributesINODE and attributes  The XFS inode consists of three parts: the inode core, the data fork, and the optionalThe XFS inode consists of three parts: the inode core, the data fork, and the optional attribute fork. The inode core contains traditional UNIX inode metadata such asattribute fork. The inode core contains traditional UNIX inode metadata such as owner and group, number of blocks, timestamps, and a few XFS-specific additionsowner and group, number of blocks, timestamps, and a few XFS-specific additions such as project ID. The data fork contains the previously mentioned extentsuch as project ID. The data fork contains the previously mentioned extent descriptors or the root of the extent map. The optional attribute fork contains the so-descriptors or the root of the extent map. The optional attribute fork contains the so- called extended attributes. The conceptcalled extended attributes. The concept  of extended attributes is not part of the Posix file system interface but is supported byof extended attributes is not part of the Posix file system interface but is supported by all modern operating systems and file systems with slightly differing semantics. Inall modern operating systems and file systems with slightly differing semantics. In Linux, extended attributes are simple name/value pairs assigned to a file that can beLinux, extended attributes are simple name/value pairs assigned to a file that can be listed and reaInodes in XFS are dynamically allocated, which means that, unlikelisted and reaInodes in XFS are dynamically allocated, which means that, unlike many other Linux file systems, their location and number are not determined at mkfsmany other Linux file systems, their location and number are not determined at mkfs time. This means that there is no need to predict the expected number of inodestime. This means that there is no need to predict the expected number of inodes when creating the file system, with the possibility of under- or overprovision.d orwhen creating the file system, with the possibility of under- or overprovision.d or written one attribute at a time.written one attribute at a time.
  • 13. DISK QUOTASDISK QUOTAS  XFS provides an enhanced implementation of the BSD disk quotas. ItXFS provides an enhanced implementation of the BSD disk quotas. It supportssupports  the normal soft and hard limits for disk space usage and number of inodesthe normal soft and hard limits for disk space usage and number of inodes as an integral part of the file system. Both the per-user and per-groupas an integral part of the file system. Both the per-user and per-group quotas supported in BSD and other Linux file systems are supported. Inquotas supported in BSD and other Linux file systems are supported. In additionaddition  to group quotas, XFS alternatively can support project quotas, where ato group quotas, XFS alternatively can support project quotas, where a project is an arbitrary integer identifier assigned by the systemproject is an arbitrary integer identifier assigned by the system administrator.administrator.  The project quota mechanism in XFS is used to implement directory treeThe project quota mechanism in XFS is used to implement directory tree quota, where a specified directory and all of the files and subdirectoriesquota, where a specified directory and all of the files and subdirectories below it are restricted to using a subset of the available space in the filebelow it are restricted to using a subset of the available space in the file system.system.
  • 15. Crash RecoveryCrash Recovery  For today’s large file systems, a full file system check on an uncleanFor today’s large file systems, a full file system check on an unclean shutdownshutdown  is not acceptable because it would take too long. To avoid the requirementis not acceptable because it would take too long. To avoid the requirement  for regular file system checks, XFS uses a write-ahead logging scheme thatfor regular file system checks, XFS uses a write-ahead logging scheme that enables atomic updates of the file system. XFS only logs structural updatesenables atomic updates of the file system. XFS only logs structural updates  to the file system metadata, but not the actual user data, for which the Posixto the file system metadata, but not the actual user data, for which the Posix file system interface does not provide useful atomicity guarantees.file system interface does not provide useful atomicity guarantees.  XFS logs every update to the file system data structures and does not batchXFS logs every update to the file system data structures and does not batch changes from multiple transactions into a single log write, as is done bychanges from multiple transactions into a single log write, as is done by ext3. This means that XFS must write significantly more data to the log inext3. This means that XFS must write significantly more data to the log in case a single metadata structure gets modified again and again in shortcase a single metadata structure gets modified again and again in short sequencesequence  (e.g., removing a large number of small files).(e.g., removing a large number of small files).
  • 16. DirectoriesDirectories  XFS supports two major forms of directories. If a directory contains only aXFS supports two major forms of directories. If a directory contains only a few entries and is small enough to fit into the inode, a simple unsorted linearfew entries and is small enough to fit into the inode, a simple unsorted linear  format can store all data inside the inode’s data fork. The advantage of thisformat can store all data inside the inode’s data fork. The advantage of this format is that no external block is used and access to the directory isformat is that no external block is used and access to the directory is extremely fast, since it will already be completely cached in memory once itextremely fast, since it will already be completely cached in memory once it is accessed. Linear algorithms, however, do not scale to large directoriesis accessed. Linear algorithms, however, do not scale to large directories with millions of entries. XFS thus again uses B+ trees to manage largewith millions of entries. XFS thus again uses B+ trees to manage large directories.directories.  Compared to simple hashing schemes such as the htree option in ext3 andCompared to simple hashing schemes such as the htree option in ext3 and ext4, a full B+ tree provides better ordering of readdir results and allows forext4, a full B+ tree provides better ordering of readdir results and allows for returning unused blocks to the space allocator when a directory shrinks. Thereturning unused blocks to the space allocator when a directory shrinks. The much improved ordering of readdir results can be seen in Figuremuch improved ordering of readdir results can be seen in Figure  2, which compares the read rates of files in readdir order in a directory with2, which compares the read rates of files in readdir order in a directory with 100,000 entries100,000 entries..
  • 17. Day to day useDay to day use  A file system in use should be boring andA file system in use should be boring and mostly invisible to the systemmostly invisible to the system administratoradministrator  and user. But to get to that state the fileand user. But to get to that state the file system must first be created.system must first be created.  An XFS file system is created with theAn XFS file system is created with the mkfs.xfsmkfs.xfs command, which is trivial to use:command, which is trivial to use:
  • 18. ConclusionConclusion  This presentation gave a quick overviewThis presentation gave a quick overview of the features of XFS, the Linux fileof the features of XFS, the Linux file systemsystem  for large storage systems. I hope it clearlyfor large storage systems. I hope it clearly explains why Linux needs a file systemexplains why Linux needs a file system that differs from the default and alsothat differs from the default and also shows the benefits of a file systemshows the benefits of a file system designed for large storage from day one.designed for large storage from day one.
  • 19. DISADVANTAGESDISADVANTAGES • An XFS file system cannot be shrunk, which would be useful, forAn XFS file system cannot be shrunk, which would be useful, for example, in some virtualized environments.example, in some virtualized environments. • Metadata operations in XFS have historically been slower than withMetadata operations in XFS have historically been slower than with other file systems, resulting in, for example, poor performance withother file systems, resulting in, for example, poor performance with operations such as deletions of large numbers of files. However, aoperations such as deletions of large numbers of files. However, a new XFS feature implemented by Dave Chinner and callednew XFS feature implemented by Dave Chinner and called delayeddelayed logginglogging, available since version 2.6.39 of the Linux kernel mainline,, available since version 2.6.39 of the Linux kernel mainline, is claimed to resolve this;is claimed to resolve this;[22][22] performance benchmarks done by theperformance benchmarks done by the developer in 2010 revealed performance levels to be similar to ext4developer in 2010 revealed performance levels to be similar to ext4 at low thread counts, and superior at high thread counts.at low thread counts, and superior at high thread counts.[23][23] • No support for transparent data compressionNo support for transparent data compression