Wednesday, December 18, 2013

RedHat v7 ■ New XFS File System

The default file system in RHEL 7 will become XFS (extended file system), 
It will replace EXT4 used in RHEL 6.
EXT4 was limited to managing 16 TBs of address space;

“XFS can manage 500TBs

EXT 4 will still be included in RHEL 7, and its limit will be pushed up to 50 TBs, for customers who want to continue using it, said Pacheco.
XFS was created by Silicon Graphics for its Irix operating system.
SGI later made it open-source code, and it was then incorporated into the Linux kernel. 

I. Creating an XFS File System

To create an XFS file system, use the mkfs.xfs /dev/device command. In general, the default options are optimal for common use.
When using mkfs.xfs on a block device containing an existing file system, use the -f option to force an overwrite of that file system.

Example: “mkfs.xfs” command output

Below is a sample output of the mkfs.xfs command
 


Note:

After an XFS file system is created, its size cannot be reduced. However, it can still be enlarged using the xfs_growfs command (refer to Section 7.4, “Increasing the Size of an XFS File System”).    
For striped block devices (for example, RAID5 arrays), the stripe geometry can be specified at the time of file system creation. Using proper stripe geometry greatly enhances the performance of an XFS filesystem.
When creating filesystems on LVM or MD volumes, mkfs.xfs chooses an optimal geometry. This may also be true on some hardware RAIDs that export geometry information to the operating system.
If the device exports stripe geometry information, mkfs (for ext3, ext4, and xfs) will automatically use this geometry. If stripe geometry is not detected by mkfs and even though the storage does, in fact, have stripe geometry, it is possible to manually specify it at mkfs time using the following options:

su=value

Specifies a stripe unit or RAID chunk size. The value must be specified in bytes, with an optional km, or g suffix.

sw=value

Specifies the number of data disks in a RAID device, or the number of stripe units in the stripe.
The following example specifies a chunk size of 64k on a RAID device containing 4 stripe units:

# mkfs.xfs -d su=64k,sw=4 /dev/device

For more information about creating XFS file systems, refer to man mkfs.xfs and the Red Hat Enterprise Linux Performance Tuning Guide, chapter Basic Tuning for XFS.

II. Mounting an XFS File System

An XFS file system can be mounted with no extra options, for example: 
 
# mount /dev/device /mount/point
 
The default for Red Hat Enterprise Linux 7 is inode64. 
 
Note
Unlike mke2fs, mkfs.xfs does not utilize a configuration file; they are all specified on the command line
 

Write Barriers

 

By default, XFS uses write barriers to ensure file system integrity even when power is lost to a device with write caches enabled. For devices without write caches, or with battery-backed write caches, disable the barriers by using the nobarrier option: 
 
# mount -o nobarrier 

No comments:

Post a Comment