Special Red Hat Enterprise Linux File Locations
Red Hat Enterprise Linux extends the FHS structure slightly to accommodate special files.
Most files pertaining to RPM are kept in the
/var/lib/rpm/directory. For more information on RPM, refer to
/var/cache/yum/directory contains files used by the Package Updater, including RPM header information for the system. This location may also be used to temporarily store RPMs downloaded while updating the system. For more information about the Red Hat Network, refer to the documentation online at Linux Wikipedia.
Another location specific to Red Hat Enterprise Linux is the
/etc/sysconfig/directory. This directory stores a variety of configuration information. Many scripts that run at boot time use the files in this directory.
The /proc Virtual File System
Unlike most file systems,
/proccontains neither text nor binary files. Instead, it houses virtual files; as such,
/procis normally referred to as a virtual file system. These virtual files are typically zero bytes in size, even if they contain a large amount of information.
/procfile system is not used for storage. Its main purpose is to provide a file-based interface to hardware, memory, running processes, and other system components. Real-time information can be retrieved on many system components by viewing the corresponding
/procfile. Some of the files within
/proccan also be manipulated (by both users and applications) to configure the kernel.
/procfiles are relevant in managing and monitoring system storage:
Displays various character and block devices that are currently configured.
Lists all file system types currently supported by the kernel.
Contains current information on multiple-disk or RAID configurations on the system, if they exist.
Lists all mounts currently used by the system.
Contains partition block allocation information.
Discard unused blocks
Batch discard and online discard operations are features of mounted file systems that discard blocks not in use by the file system. They are useful for both solid-state drives and thinly-provisioned storage.
Batch discard operations are run explicitly by the user with the
fstrimcommand. This command discards all unused blocks in a file system that match the user’s criteria. Both operation types are supported for use with ext4 file systems as of Red Hat Enterprise Linux 6.2 and later so long as the block device underlying the file system supports physical discard operations. This is also the case with XFS file systems as of Red Hat Enterprise Linux 6.4 and later. Physical discard operations are supported if the value of
/sys/block/device/queue/discard_max_bytesis not zero.
Online discard operations are specified at mount time with the
-o discardoption (either in
/etc/fstabor as part of the
mountcommand), and run in realtime without user intervention. Online discard operations only discard blocks that are transitioning from used to free. Online discard operations are supported on ext4 file systems as of Red Hat Enterprise Linux 6.2 and later, and on XFS file systems as of Red Hat Enterprise Linux 6.4 and later.
Red Hat recommends batch discard operations unless the system’s workload is such that batch discard is not feasible, or online discard operations are necessary to maintain performance.