Skip to main content

mfsmetadump

Dump MooseFS metadata info in human readable format.

This page reproduces the manual page mfsmetadump(8) as the product ships it: the text man mfsmetadump prints on a machine where the packages are installed. It is not edited here, and where it disagrees with the rest of this documentation, the documentation is the side kept against the sources. What the subject is: Command line tools.

Synopsis​

mfsmetadump [-d] [-s section_name] metadata_file

Description​

mfsmetadump dumps MooseFS metadata info in human readable format. Output consists of several sections with different types of information. Every section consist of header data - rows starting with hash (#) sign - and content data (may be empty).

Options​

-d - replace all non-printable characters (codes < 32 and > 126) with '.' (it was default behaviour in version < 3.0.110).

-s - dump only specified section of the file. Possible sections:

HEAD - header info
SESS - client sessions
LABS - labels (not used)
SCLA - storage classes
PATT - pattern overrides
NODE - tree nodes (i-nodes)
EDGE - tree edges (file names)
FREE - free nodes (deleted i-nodes)
QUOT - quota definitions
XATR - xattr data
PACL - posix acl data
OPEN - open files
FLCK - flock data
PLCK - posix locks (lockf,ioctl) data
LOCA - locations data
CSDB - active chunkservers
CHNK - chunks
  • metadata_file
    path to metadata.mfs file

Notes​

Each metadata section - with the exception of the HEAD section - consist of a constant set of HEADER fields and a variable set of this section specific fields. HEAD section contains only section specific fields. The HEADER fields and all the section fields are listed below:

SECTION HEADER​

  • section header
    section header (section type + version)

  • length
    length of section

  • section type
    name of section

  • version
    hexadecimal representation of section version

FILE HEADER SECTION (HEAD)​

  • header
    MooseFS version

  • version
    metadata file version

  • fileid
    metadata file id

SESSIONS SECTION (SESS)​

  • nextsessionid
    first free session id

  • statscount
    number of stats remembered in each session

  • SESSION
    line describing a single session

    s session id
    e exports checksum
    p IP address
    r root inode number
    f session flags
    u umask
    g min and max goal (redundancy level)
    t min and max trash retention
    m maproot uid,gid and mapall uid,gid
    x disabled operations
    d disconnection time (optional)
    c current hour stats data
    l last hour stats data
    i session name (usually local mount point)

STORAGE CLASS SECTION (SCLA), formerly LABELS SECTION (LABS)​

  • LABELDESC
    line with label description (existed only in LABS)

    l label letter
    n label description
  • SCLASS
    (formerly LABELSET) line with storage class used in system

    # storage class id
    x admin only
    m mode
    d arch delay
    c create labels
    k keep labels
    a archive labels
    n name
  • SCLASSMAIN
    (used in version 4.0+ instead of SCLASS) line with common parameters of storage class

    # storage class id
    x admin only
    m create mode
    a arch mode
    d arch delay
    t min trash retention
    n name
  • SCLASSEXPR
    (used in version 4.0+ instead of SCLASS) line with label expression

    # storage class id
    t type ([C]reate,[K]eep,[A]rchive or [T]rash)
    e expression

PATTERNS SECTION (PATT)​

  • PATTERN
    line with pattern definition

    v priority
    # storage class id
    t trash retention
    e flags (extra mfs attributes)
    u uid
    g gid
    p pattern

NODES SECTION (NODE)​

  • maxinode
    maximum inode number used by system

  • hashelements
    number of inodes in hash table

  • NODE
    line with node (inode) description

    k node type (-,D,S,F,B,C,L,T,R)
    - file
    D directory
    S socket
    F fifo
    B block device
    C character device
    L symbolic link
    T trash file
    R sustained file (removed open file)
    i inode number
    # storage class id
    e flags (extra mfs attributes)
    w windows attributes
    m mode
    u uid
    g gid
    a,m,c atime, mtime, ctime
    t trash retention
    d rdevhi,rdevlo (only block and character devices)
    p path (only symbolic links)
    l file length (only files)
    c chunk list (only files)
    r sessions that have this file open (only files)

EDGES SECTION (EDGE)​

  • nextedgeid
    next available edge id (descending)

  • EDGE
    line with edge description

    p parent inode number
    c child inode number
    i edge id
    n edge name

FREE NODES SECTION (FREE)​

  • free nodes
    number of free (reusable) nodes

  • FREEID
    line with free inode description

    i inode number
    f deletion timestamp

QUOTA SECTION (QUOT)​

  • quota nodes
    number of nodes with quota

  • QUOTA
    line with quota description

    i inode number
    g grace period
    e exceeded
    f flags
    s soft quota exceeded timestamp
    si soft inode quota
    hi hard inode quota
    sl soft length quota
    hl hard length quota
    ss soft size quota
    hs hard size quota
    sr soft real size quota
    hr hard real size quota

XATTR SECTION (XATR)​

  • XATTR
    line with xattr description

    i inode number
    n xattr name
    v xattr value

POSIX ACL SECTION (PACL)​

  • POSIXACL
    line with acl description

    i inode number
    t acl type
    u user (file owner) permissions
    g group permissions
    o other permissions
    m permission mask
    n named permissions - list of objects:
    u(U):P permissions P for user with uid U
    g(G):P permissions P for group with gid G

OPEN FILES SECTION (OPEN)​

  • OPENFILE
    line with open file description

    s session id
    i inode number

FLOCK LOCK SECTION (FLCK)​

  • FLOCK
    line with flock-lock description

    i inode number
    s session id
    o lock owner (FUSE lock owner)
    t lock type ('R' - shared lock, 'W' - exclusive lock)

POSIX LOCK SECTION (PLCK)​

  • POSIXLOCK
    line with posix-lock description

    i inode number
    s session id
    o lock owner (FUSE lock owner)
    p local process id (owner pid)
    r lock range in format <START,END)
    t lock type ('R' - shared lock, 'W' - exclusive lock)

LOCATIONS SECTION (LOCA)​

  • LOCATION_DEFAULT
    line with default location

    l location number
  • LOCATION_STATE
    line with location state

    l location number
    s location state (0 - OFF, 1 - ON, 2 - IO)
  • LOCATION_NAME
    line with location name

    l location number
    n location name
  • LOCATION_MAP
    line with location IP mapping

    f mapping range first IP
    t mapping range last IP
    l location number

CHUNKSERVERS SECTION (CSDB)​

  • chunk servers
    number of chunkservers

  • CHUNKSERVER
    line with chunk server description

    i server ip
    p server port
    # server id
    m maintenance mode
    t maintenance timeout timestamp

CHUNKS SECTION (CHNK)​

  • nextchunkid
    first available chunk number

  • CHUNK
    line with chunk description

    i chunk number
    v chunk version
    t timestamp, if in the future, means lock timestamp, if in the past, last modification timestamp
    a archive flag
    (s,#) list of entries, s is storage class id, # is number of files in this storage class containing this chunk
    c calculated storage class id (effectively used class id, if a chunk has more than one)

NOTICE! If a chunk's timestamp equals 0, it means the chunk was created by MooseFS version older than 4.45.0 and has not been locked or modified since.

See also​

mfsmaster(8)