Linux 7 Storage Concepts: Difference between revisions
(→XFS) |
(→XFS) |
||
Line 17: | Line 17: | ||
==XFS== | ==XFS== | ||
An | An XFS filesystem is created with [[mkfs.xfs]]. | ||
'''Journal Recovery''' is done in kernel space at mount time. An fsck.xfs command exists, but it does not perform any useful action. If the journal needs repairing, unmount and mount the filesystem | '''Journal Recovery''' is done in kernel space at mount time. An fsck.xfs command exists, but it does not perform any useful action. If the journal needs repairing, unmount and mount the filesystem | ||
Line 26: | Line 26: | ||
'''Speculative allocation'''. XFS uses speculative preallocation to allocate blocks past EOF as files are written. This avoids file fragmentation due to concurrent streaming writes on NFS servers. This temporarily increases the size of the file, but if the preallocated space is not used for five minutes, the preallocation will be discarded. Because of this, fragmentation is rarely a significant issue on XFS filesystems. | '''Speculative allocation'''. XFS uses speculative preallocation to allocate blocks past EOF as files are written. This avoids file fragmentation due to concurrent streaming writes on NFS servers. This temporarily increases the size of the file, but if the preallocated space is not used for five minutes, the preallocation will be discarded. Because of this, fragmentation is rarely a significant issue on XFS filesystems. | ||
Mounting an XFS fileystem in [[/etc/fstab]]: | |||
/dev/vdb1 /support-nfs-storage xfs defaults 0 0 | |||
=Subjects= | =Subjects= | ||
* [[Linux Logical Volume Management Concepts]] | * [[Linux Logical Volume Management Concepts]] |
Revision as of 00:01, 3 July 2017
Internal
File System
ext4
An ext4 filesystem is created with mkfs.ext4.
Journal Recovery is done with e2fsck in userspace at boot time.
Metadata Error Behavior. When metadata errors are encountered, the behavior is configurable. The default is to continue.
Resize
XFS
An XFS filesystem is created with mkfs.xfs.
Journal Recovery is done in kernel space at mount time. An fsck.xfs command exists, but it does not perform any useful action. If the journal needs repairing, unmount and mount the filesystem
Metadata Error Behavior. When an unrecoverable metadata error is encountered, the filesystem will be shut down.
Resize. The filesystem can be extended while online with xfs_growfs. It cannot be shrunk.
Speculative allocation. XFS uses speculative preallocation to allocate blocks past EOF as files are written. This avoids file fragmentation due to concurrent streaming writes on NFS servers. This temporarily increases the size of the file, but if the preallocated space is not used for five minutes, the preallocation will be discarded. Because of this, fragmentation is rarely a significant issue on XFS filesystems.
Mounting an XFS fileystem in /etc/fstab:
/dev/vdb1 /support-nfs-storage xfs defaults 0 0