Top

A Linux User Reference

Search tips
  • search ignores words that are less than 4 characters in length
  • searches are case insensitve
  • if a search does not return anything try it in Boolean mode then Query expansion mode by checking the appropriate radio button e.g. searching for 'cron' in just the Administration category returns nothing - presumably because the 50% threshold is reached. Boolean mode ignores this threshold so a search for 'cron' returns several hits
  • in Boolean mode preceding a word with a '+' means the result must include that word, a '-' means it must not
  • in Boolean mode '+crontab -anacron' means match articles about crontab that DO NOT mention anacron
  • to match a phrase e.g. 'manage system' check the Boolean mode radio button and enclose the phrase in quotes "some phrase ..."
  • in Query expansion mode the search context is expanded beyond the keywords you entered - relevancy of hits may well be degraded

FILESYSTEMS

XFS

  • A basic introduction

    I have not used XFS - the information here is simply a (brief) precis of the various man pages on the subject.

    • XFS combines advanced journalling technology with full 64-bit addressing and scalable structures and algorithms.

    • An XFS filesystem can reside on a regular disk partition or on a logical volume.

    • A file system can be made up of up to three parts/sections:

      • a data section
      • a log section
      • a realtime section
    • The default 'mkfs.xfs' behavior does NOT create the realtime section and the log area is contained within the data section. The log section, therefore, can be either separate from the data section or contained within it.

    • The filesystem sections are divided into a number of blocks the size of which can be specified using the '-b' option to 'mkfs.xfs'.

    • Each XFS filesystem is labeled with a Universal Unique Identifier (UUID). The UUID is stored in every allocation group header and is used to help distinguish one XFS filesystem from another, therefore you should avoid using 'dd' or other block-by-block copying programs to copy XFS filesystems. If two XFS filesystems on the same machine have the same UUID, 'xfsdump' may become confused when doing incremental and resumed dumps.

    'xfsdump' and 'xfsrestore' are recommended for making copies of XFS filesystems.

    The data section

    Contains all the filesystem metadata (inodes, directories, indirect blocks) as well as the user file data for ordinary (non-realtime) files and the log area if the log is internal to the data section.

    The log section

    (or area, if it is internal to the data section) is used to store changes to filesystem metadata while the filesystem is running until those changes are made to the data section. It is written sequentially during normal operation and read only during mount. When mounting a filesystem after a crash, the log is read to complete operations that were in progress at the time of the crash.

    The realtime section

    Is used to store the data of realtime files. These files have an attribute bit set through xfsctl after file creation, before any data was written to the file.

  • Command summary
    Command Function Description
    xfs_admin Adjust an XFS filesystem's parameters Uses the 'xfs_db' command to modify various parameters of a xfs filesystem. Mounted devices cannot be modified. A number of parameters of a mounted filesystem can be examined and modified using the 'xfs_growfs' command.
    xfs_growfs Expand an existing XFS filesystem. The mount-point argument is the pathname of the directory where the filesystem is mounted. The filesystem must be mounted to be grown. The existing contents of the filesystem are undisturbed and the added space becomes available for additional file storage.
    xfs_info Equivalent to invoking 'xfs_growfs -n' Specifies that no change to the filesystem is to be made. The filesystem geometry is printed, and argument checking is performed, but no growth occurs.
    xfs_metadump A debugging tool. It copies the metadata from an XFS filesystem to a file. The source argument must be the pathname of the device or file containing the XFS filesystem and the target argument specifies the destination file name. Should only be used to copy unmounted filesystems, read-only mounted filesystems or frozen filesystems (see xfs_freeze). Does not alter the source filesystem in any way.
    xfs_repair Repair corrupt or damaged XFS filesystems The filesystem to be repaired must be unmounted.
    xfs_check Check XFS filesystem consistency. Normally run only when there is reason to believe that the filesystem has a consistency problem. Normally the fs is 'unmounted' or mounted 'read-only' during the execution.
    xfs_copy Copy the contents of an XFS filesystem. Copies an XFS filesystem to one or more targets in parallel. Should only be used to copy unmounted filesystems, 'read-only' mounted filesystems or 'frozen' filesystems. It does NOT alter the source filesystem in any way. Uses synchronous writes to ensure that write errors are detected.
  • Construct an XFS filesystem
    /sbin/mkfs-xfs

    This stuff is dated

    Invoked automatically by mkfs when it is given the '-t xfs' option.

    mkfs.xfs [-b block_size] 
             [-d data_section_options] [-f]
             [-i inode_options] [-l log_section_options] 
             [-n naming_options] [-p protofile] 
             [-q] [-r realtime_section_options]
             [-s sector_size] [-L label] [-N] device
    

    'log_section_options' can be supplied as a comma-separated list of suboptions if multiple suboptions apply to the same option. Each main option can be given multiple times with different suboptions - in English .. '-l internal,size=10000b' and '-l internal -l size=10000b' are equivalent.

    In it's simplest and most commonly used form the size of the filesystem is determined from the disk driver.

    Make a filesystem with an internal log on /dev/sda1

    # mkfs.xfs /dev/sda1
    

    Create a filesystem on /dev/sda with a 10000 block log located on /dev/sdb1

    mkfs.xfs -l logdev=/dev/sdb1,size=10000b /dev/sda1

    ~~~~~ Places the metadata log on another device to reduce the number of disk seeks.

  • XFS documentation and FAQ