xfs_db.8 | xfs_db.8 | |||
---|---|---|---|---|
skipping to change at line 34 | skipping to change at line 34 | |||
-f Specifies that the filesystem image to be processed is stored in | -f Specifies that the filesystem image to be processed is stored in | |||
a regular file at device (see the mkfs.xfs(8) -d file optio n). | a regular file at device (see the mkfs.xfs(8) -d file optio n). | |||
This might happen if an image copy of a filesystem has been m ade | This might happen if an image copy of a filesystem has been m ade | |||
into an ordinary file with xfs_copy(8). | into an ordinary file with xfs_copy(8). | |||
-F Specifies that we want to continue even if the superblock ma gic | -F Specifies that we want to continue even if the superblock ma gic | |||
is not correct. For use in xfs_check and xfs_metadump. | is not correct. For use in xfs_check and xfs_metadump. | |||
-i Allows execution on a mounted filesystem, provided it is moun ted | -i Allows execution on a mounted filesystem, provided it is moun ted | |||
read-only. Useful for shell scripts such as xfs_check(8), wh ich | read-only. Useful for shell scripts such as xfs_check(8), wh ich | |||
must only operate on filesystems in a guarenteed consist ent | must only operate on filesystems in a guaranteed consist ent | |||
state (either unmounted or mounted read-only). These semant ics | state (either unmounted or mounted read-only). These semant ics | |||
are slightly different to that of the -r option. | are slightly different to that of the -r option. | |||
-l logdev | -l logdev | |||
Specifies the device where the filesystems external log resid es. | Specifies the device where the filesystems external log resid es. | |||
Only for those filesystems which use an external log. See the | Only for those filesystems which use an external log. See the | |||
mkfs.xfs(8) -l option, and refer to xfs(5) for a detai led | mkfs.xfs(8) -l option, and refer to xfs(5) for a detai led | |||
description of the XFS log. | description of the XFS log. | |||
-p progname | -p progname | |||
skipping to change at line 56 | skipping to change at line 56 | |||
sages, the default value is xfs_db. | sages, the default value is xfs_db. | |||
-r Open device or filename read-only. This option is required if | -r Open device or filename read-only. This option is required if | |||
the filesystem is mounted. It is only necessary to omit t his | the filesystem is mounted. It is only necessary to omit t his | |||
flag if a command that changes data (write, blocktrash) is to be | flag if a command that changes data (write, blocktrash) is to be | |||
used. | used. | |||
-x Specifies expert mode. This enables the write and blocktr ash | -x Specifies expert mode. This enables the write and blocktr ash | |||
commands. | commands. | |||
-V Prints out the current version number and exits. | -V Prints the version number and exits. | |||
CONCEPTS | CONCEPTS | |||
xfs_db commands can be broken up into two classes. Most commands are | xfs_db commands can be broken up into two classes. Most commands are | |||
for the navigation and display of data structures in the filesyst em. | for the navigation and display of data structures in the filesyst em. | |||
Other commands are for scanning the filesystem in some way. | Other commands are for scanning the filesystem in some way. | |||
Commands which are used to navigate the filesystem structure take ar gu‐ | Commands which are used to navigate the filesystem structure take ar gu‐ | |||
ments which reflect the names of filesystem structure fields. Th ere | ments which reflect the names of filesystem structure fields. Th ere | |||
can be multiple field names separated by dots when the underly ing | can be multiple field names separated by dots when the underly ing | |||
structures are nested, as in C. The field names can be indexed (as an | structures are nested, as in C. The field names can be indexed (as an | |||
skipping to change at line 561 | skipping to change at line 561 | |||
level level of this block above the leaf level. | level level of this block above the leaf level. | |||
numrecs number of records or keys in the block. | numrecs number of records or keys in the block. | |||
leftsib left (logically lower) sibling block, 0 if | leftsib left (logically lower) sibling block, 0 if | |||
none. | none. | |||
rightsib right (logically higher) sibling block, 0 if | rightsib right (logically higher) sibling block, 0 if | |||
none. | none. | |||
recs [leaf blocks only] array of extent recor ds. | recs [leaf blocks only] array of extent recor ds. | |||
Each record contains startoff, startblo ck, | Each record contains startoff, startblo ck, | |||
blockcount, and extentflag (1 if the ext ent | blockcount, and extentflag (1 if the ext ent | |||
is unwritten). | is unwritten). | |||
keys [nonleaf blocks only] array of key recor ds. | keys [non-leaf blocks only] array of key recor ds. | |||
These are the first key value of each bl ock | These are the first key value of each bl ock | |||
in the level below this one. Each record c on‐ | in the level below this one. Each record c on‐ | |||
tains startoff. | tains startoff. | |||
ptrs [nonleaf blocks only] array of child bl ock | ptrs [non-leaf blocks only] array of child bl ock | |||
pointers. Each pointer is a filesystem bl ock | pointers. Each pointer is a filesystem bl ock | |||
number to the next level in the Btree. | number to the next level in the Btree. | |||
bnobt There is one set of filesystem blocks forming the by-blo ck- | bnobt There is one set of filesystem blocks forming the by-blo ck- | |||
number allocation Btree for each allocation group. The r oot | number allocation Btree for each allocation group. The r oot | |||
block of this Btree is designated by the bnoroot field in the | block of this Btree is designated by the bnoroot field in the | |||
coresponding AGF block. The blocks are linked to sibl ing | corresponding AGF block. The blocks are linked to sibl ing | |||
left and right blocks at each level, as well as by point ers | left and right blocks at each level, as well as by point ers | |||
from parent to child blocks. Each block has the follow ing | from parent to child blocks. Each block has the follow ing | |||
fields: | fields: | |||
magic BNOBT block magic number, 0x41425 442 | magic BNOBT block magic number, 0x41425 442 | |||
('ABTB'). | ('ABTB'). | |||
level level number of this block, 0 is a leaf. | level level number of this block, 0 is a leaf. | |||
numrecs number of data entries in the block. | numrecs number of data entries in the block. | |||
leftsib left (logically lower) sibling block, 0 if | leftsib left (logically lower) sibling block, 0 if | |||
none. | none. | |||
rightsib right (logically higher) sibling block, 0 if | rightsib right (logically higher) sibling block, 0 if | |||
none. | none. | |||
recs [leaf blocks only] array of freesp ace | recs [leaf blocks only] array of freesp ace | |||
records. Each record contains startblock and | records. Each record contains startblock and | |||
blockcount. | blockcount. | |||
keys [nonleaf blocks only] array of key recor ds. | keys [non-leaf blocks only] array of key recor ds. | |||
These are the first value of each block in | These are the first value of each block in | |||
the level below this one. Each record c on‐ | the level below this one. Each record c on‐ | |||
tains startblock and blockcount. | tains startblock and blockcount. | |||
ptrs [nonleaf blocks only] array of child bl ock | ptrs [non-leaf blocks only] array of child bl ock | |||
pointers. Each pointer is a block num ber | pointers. Each pointer is a block num ber | |||
within the allocation group to the next le vel | within the allocation group to the next le vel | |||
in the Btree. | in the Btree. | |||
cntbt There is one set of filesystem blocks forming the by-blo ck- | cntbt There is one set of filesystem blocks forming the by-blo ck- | |||
count allocation Btree for each allocation group. The r oot | count allocation Btree for each allocation group. The r oot | |||
block of this Btree is designated by the cntroot field in the | block of this Btree is designated by the cntroot field in the | |||
coresponding AGF block. The blocks are linked to sibling l | corresponding AGF block. The blocks are linked to sibl | |||
eft | ing | |||
and right blocks at each level, as well as by pointers f | left and right blocks at each level, as well as by point | |||
rom | ers | |||
parent to child blocks. Each block has the following field | from parent to child blocks. Each block has the follow | |||
s: | ing | |||
magic CNTBT block magic number, 0x41425 | fields: | |||
443 | magic CNTBT block magic number, 0x41425 | |||
443 | ||||
('ABTC'). | ('ABTC'). | |||
level level number of this block, 0 is a leaf. | level level number of this block, 0 is a leaf. | |||
numrecs number of data entries in the block. | numrecs number of data entries in the block. | |||
leftsib left (logically lower) sibling block, 0 if | leftsib left (logically lower) sibling block, 0 if | |||
none. | none. | |||
rightsib right (logically higher) sibling block, 0 if | rightsib right (logically higher) sibling block, 0 if | |||
none. | none. | |||
recs [leaf blocks only] array of freesp | recs [leaf blocks only] array of freesp | |||
ace | ace | |||
records. Each record contains startblock | records. Each record contains startblock | |||
and | and | |||
blockcount. | blockcount. | |||
keys [nonleaf blocks only] array of key recor | keys [non-leaf blocks only] array of key recor | |||
ds. | ds. | |||
These are the first value of each block | These are the first value of each block | |||
in | in | |||
the level below this one. Each record c | the level below this one. Each record c | |||
on‐ | on‐ | |||
tains blockcount and startblock. | tains blockcount and startblock. | |||
ptrs [nonleaf blocks only] array of child bl | ptrs [non-leaf blocks only] array of child bl | |||
ock | ock | |||
pointers. Each pointer is a block num | pointers. Each pointer is a block num | |||
ber | ber | |||
within the allocation group to the next le vel | within the allocation group to the next le vel | |||
in the Btree. | in the Btree. | |||
data User file blocks, and other blocks whose type is unkno | data User file blocks, and other blocks whose type is unkno | |||
wn, | wn, | |||
have this type for display purposes in xfs_db. The bl | have this type for display purposes in xfs_db. The bl | |||
ock | ock | |||
data is displayed in hexadecimal format. | data is displayed in hexadecimal format. | |||
dir A version 1 directory is organized as a Btree with the dir ec‐ | dir A version 1 directory is organized as a Btree with the dir ec‐ | |||
tory data embedded in the leaf blocks. The root of the Bt | tory data embedded in the leaf blocks. The root of the Bt | |||
ree | ree | |||
is found in block 0 of the file. The index (sort order) | is found in block 0 of the file. The index (sort order) | |||
of | of | |||
the Btree is the hash value of the entry name. All the blo cks | the Btree is the hash value of the entry name. All the blo cks | |||
contain a blkinfo structure at the beginning with the foll ow‐ | contain a blkinfo structure at the beginning with the foll ow‐ | |||
ing fields: | ing fields: | |||
forw next sibling block. | forw next sibling block. | |||
back previous sibling block. | back previous sibling block. | |||
magic magic number for this block type. | magic magic number for this block type. | |||
The non-leaf (node) blocks have the following fields: | The non-leaf (node) blocks have the following fields: | |||
hdr header containing a blkinfo structure i | hdr header containing a blkinfo structure i | |||
nfo | nfo | |||
(magic number 0xfebe), the count of act | (magic number 0xfebe), the count of act | |||
ive | ive | |||
entries, and the level of this block ab | entries, and the level of this block ab | |||
ove | ove | |||
the leaves. | the leaves. | |||
btree array of entries containing hashval | btree array of entries containing hashval | |||
and | and | |||
before fields. The before value is a bl | before fields. The before value is a bl | |||
ock | ock | |||
number within the directory file to the ch ild | number within the directory file to the ch ild | |||
block, the hashval is the last hash value in | block, the hashval is the last hash value in | |||
that block. | that block. | |||
The leaf blocks have the following fields: | The leaf blocks have the following fields: | |||
hdr header containing a blkinfo structure i | hdr header containing a blkinfo structure i | |||
nfo | nfo | |||
(magic number 0xfeeb), the count of act | (magic number 0xfeeb), the count of act | |||
ive | ive | |||
entries, namebytes (total name string byte s), | entries, namebytes (total name string byte s), | |||
holes flag (block needs compaction), and | holes flag (block needs compaction), and | |||
freemap (array of base, size entries for f ree | freemap (array of base, size entries for f ree | |||
regions). | regions). | |||
entries array of structures containing hashv | entries array of structures containing hashv | |||
al, | al, | |||
nameidx (byte index into the block of | nameidx (byte index into the block of | |||
the | the | |||
name string), and namelen. | name string), and namelen. | |||
namelist array of structures containing inumber and | namelist array of structures containing inumber and | |||
name. | name. | |||
dir2 A version 2 directory has four kinds of blocks. Data blo | dir2 A version 2 directory has four kinds of blocks. Data blo | |||
cks | cks | |||
start at offset 0 in the file. There are two kinds of d | start at offset 0 in the file. There are two kinds of d | |||
ata | ata | |||
blocks: single-block directories have the leaf informat | blocks: single-block directories have the leaf informat | |||
ion | ion | |||
embedded at the end of the block, data blocks in multi-bl | embedded at the end of the block, data blocks in multi-bl | |||
ock | ock | |||
directories do not. Node and leaf blocks start at off | directories do not. Node and leaf blocks start at off | |||
set | set | |||
32GiB (with either a single leaf block or the root n | 32GiB (with either a single leaf block or the root n | |||
ode | ode | |||
block). Freespace blocks start at offset 64GiB. The n | block). Freespace blocks start at offset 64GiB. The n | |||
ode | ode | |||
and leaf blocks form a Btree, with references to the data | and leaf blocks form a Btree, with references to the data | |||
in | in | |||
the data blocks. The freespace blocks form an index of lo ng‐ | the data blocks. The freespace blocks form an index of lo ng‐ | |||
est free spaces within the data blocks. | est free spaces within the data blocks. | |||
A single-block directory block contains the following fiel ds: | A single-block directory block contains the following fiel ds: | |||
bhdr header containing magic number 0x58443 242 | bhdr header containing magic number 0x58443 242 | |||
('XD2B') and an array bestfree of the long est | ('XD2B') and an array bestfree of the long est | |||
3 free spaces in the block (offset, length ). | 3 free spaces in the block (offset, length ). | |||
bu array of union structures. Each element is | bu array of union structures. Each element is | |||
either an entry or a freespace. For entri es, | either an entry or a freespace. For entri es, | |||
there are the following fields: inumb er, | there are the following fields: inumb er, | |||
namelen, name, and tag. For freespace, th ere | namelen, name, and tag. For freespace, th ere | |||
are the following fields: freetag (0xfff | are the following fields: freetag (0xfff | |||
f), | f), | |||
length, and tag. The tag value is the b | length, and tag. The tag value is the b | |||
yte | yte | |||
offset in the block of the start of the en try | offset in the block of the start of the en try | |||
it is contained in. | it is contained in. | |||
bleaf array of leaf entries containing hashval and | bleaf array of leaf entries containing hashval and | |||
address. The address is a 64-bit word off set | address. The address is a 64-bit word off set | |||
into the file. | into the file. | |||
btail tail structure containing the total count | btail tail structure containing the total count | |||
of | of | |||
leaf entries and stale count of unused l | leaf entries and stale count of unused l | |||
eaf | eaf | |||
entries. | entries. | |||
A data block contains the following fields: | A data block contains the following fields: | |||
dhdr header containing magic number 0x58443 244 | dhdr header containing magic number 0x58443 244 | |||
('XD2D') and an array bestfree of the long est | ('XD2D') and an array bestfree of the long est | |||
3 free spaces in the block (offset, length ). | 3 free spaces in the block (offset, length ). | |||
du array of union structures as for bu. | du array of union structures as for bu. | |||
Leaf blocks have two possible forms. If the Btree consists of | Leaf blocks have two possible forms. If the Btree consists of | |||
a single leaf then the freespace information is in the l eaf | a single leaf then the freespace information is in the l eaf | |||
block, otherwise it is in separate blocks and the root of the | block, otherwise it is in separate blocks and the root of the | |||
Btree is a node block. A leaf block contains the follow ing | Btree is a node block. A leaf block contains the follow ing | |||
fields: | fields: | |||
lhdr header containing a blkinfo structure i | lhdr header containing a blkinfo structure i | |||
nfo | nfo | |||
(magic number 0xd2f1 for the single l | (magic number 0xd2f1 for the single l | |||
eaf | eaf | |||
case, 0xd2ff for the true Btree case), | case, 0xd2ff for the true Btree case), | |||
the | the | |||
total count of leaf entries, and stale co | total count of leaf entries, and stale co | |||
unt | unt | |||
of unused leaf entries. | of unused leaf entries. | |||
lents leaf entries, as for bleaf. | lents leaf entries, as for bleaf. | |||
lbests [single leaf only] array of values which r ep‐ | lbests [single leaf only] array of values which r ep‐ | |||
resent the longest freespace in each d ata | resent the longest freespace in each d ata | |||
block in the directory. | block in the directory. | |||
ltail [single leaf only] tail structure contain ing | ltail [single leaf only] tail structure contain ing | |||
bestcount count of lbests. | bestcount count of lbests. | |||
A node block is identical to that for types attr and dir. | A node block is identical to that for types attr and dir. | |||
A freespace block contains the following fields: | A freespace block contains the following fields: | |||
fhdr header containing magic number 0x58443 246 | fhdr header containing magic number 0x58443 246 | |||
('XD2F'), firstdb first data block num | ('XD2F'), firstdb first data block num | |||
ber | ber | |||
covered by this freespace block, nvalid n | covered by this freespace block, nvalid n | |||
um‐ | um‐ | |||
ber of valid entries, and nused number | ber of valid entries, and nused number | |||
of | of | |||
entries representing real data blocks. | entries representing real data blocks. | |||
fbests array of values as for lbests. | fbests array of values as for lbests. | |||
dqblk The quota information is stored in files referred to by | dqblk The quota information is stored in files referred to by | |||
the | the | |||
superblock uquotino and pquotino fields. Each filesys | superblock uquotino and pquotino fields. Each filesys | |||
tem | tem | |||
block in a quota file contains a constant number of qu | block in a quota file contains a constant number of qu | |||
ota | ota | |||
entries. The quota entry size is currently 136 bytes, so w ith | entries. The quota entry size is currently 136 bytes, so w ith | |||
a 4KiB filesystem block size there are 30 quota entries | a 4KiB filesystem block size there are 30 quota entries | |||
per | per | |||
block. The dquot command is used to locate these entries | block. The dquot command is used to locate these entries | |||
in | in | |||
the filesystem. The file entries are indexed by the user | the filesystem. The file entries are indexed by the user | |||
or | or | |||
project identifier to determine the block and offset. E | project identifier to determine the block and offset. E | |||
ach | ach | |||
quota entry has the following fields: | quota entry has the following fields: | |||
magic magic number, 0x4451 ('DQ'). | magic magic number, 0x4451 ('DQ'). | |||
version version number, currently 1. | version version number, currently 1. | |||
flags flags, values include 0x01 for user quo ta, | flags flags, values include 0x01 for user quo ta, | |||
0x02 for project quota. | 0x02 for project quota. | |||
id user or project identifier. | id user or project identifier. | |||
blk_hardlimit absolute limit on blocks in use. | blk_hardlimit absolute limit on blocks in use. | |||
blk_softlimit preferred limit on blocks in use. | blk_softlimit preferred limit on blocks in use. | |||
ino_hardlimit absolute limit on inodes in use. | ino_hardlimit absolute limit on inodes in use. | |||
ino_softlimit preferred limit on inodes in use. | ino_softlimit preferred limit on inodes in use. | |||
bcount blocks actually in use. | bcount blocks actually in use. | |||
icount inodes actually in use. | icount inodes actually in use. | |||
itimer time when service will be refused if s oft | itimer time when service will be refused if s oft | |||
limit is violated for inodes. | limit is violated for inodes. | |||
btimer time when service will be refused if s oft | btimer time when service will be refused if s oft | |||
limit is violated for blocks. | limit is violated for blocks. | |||
iwarns number of warnings issued about in ode | iwarns number of warnings issued about in ode | |||
limit violations. | limit violations. | |||
bwarns number of warnings issued about bl ock | bwarns number of warnings issued about bl ock | |||
limit violations. | limit violations. | |||
rtb_hardlimit absolute limit on realtime blocks in us e. | rtb_hardlimit absolute limit on realtime blocks in us e. | |||
rtb_softlimit preferred limit on realtime blocks in u se. | rtb_softlimit preferred limit on realtime blocks in u se. | |||
rtbcount realtime blocks actually in use. | rtbcount realtime blocks actually in use. | |||
rtbtimer time when service will be refused if s oft | rtbtimer time when service will be refused if s oft | |||
limit is violated for realtime blocks. | limit is violated for realtime blocks. | |||
rtbwarns number of warnings issued about realt ime | rtbwarns number of warnings issued about realt ime | |||
block limit violations. | block limit violations. | |||
inobt There is one set of filesystem blocks forming the inode al lo‐ | inobt There is one set of filesystem blocks forming the inode al lo‐ | |||
cation Btree for each allocation group. The root block | cation Btree for each allocation group. The root block | |||
of | of | |||
this Btree is designated by the root field in the corespo | this Btree is designated by the root field in the correspo | |||
nd‐ | nd‐ | |||
ing AGI block. The blocks are linked to sibling left | ing AGI block. The blocks are linked to sibling left | |||
and | and | |||
right blocks at each level, as well as by pointers from p | right blocks at each level, as well as by pointers from p | |||
ar‐ | ar‐ | |||
ent to child blocks. Each block has the following fields: | ent to child blocks. Each block has the following fields: | |||
magic INOBT block magic number, 0x49414 254 | magic INOBT block magic number, 0x49414 254 | |||
('IABT'). | ('IABT'). | |||
level level number of this block, 0 is a leaf. | level level number of this block, 0 is a leaf. | |||
numrecs number of data entries in the block. | numrecs number of data entries in the block. | |||
leftsib left (logically lower) sibling block, 0 if | leftsib left (logically lower) sibling block, 0 if | |||
none. | none. | |||
rightsib right (logically higher) sibling block, 0 if | rightsib right (logically higher) sibling block, 0 if | |||
none. | none. | |||
recs [leaf blocks only] array of inode recor ds. | recs [leaf blocks only] array of inode recor ds. | |||
Each record contains startino allocati on- | Each record contains startino allocati on- | |||
group relative inode number, freecount co | group relative inode number, freecount co | |||
unt | unt | |||
of free inodes in this chunk, and free b | of free inodes in this chunk, and free b | |||
it‐ | it‐ | |||
map, LSB corresponds to inode 0. | map, LSB corresponds to inode 0. | |||
keys [nonleaf blocks only] array of key recor | keys [non-leaf blocks only] array of key recor | |||
ds. | ds. | |||
These are the first value of each block | These are the first value of each block | |||
in | in | |||
the level below this one. Each record c | the level below this one. Each record c | |||
on‐ | on‐ | |||
tains startino. | tains startino. | |||
ptrs [nonleaf blocks only] array of child bl | ptrs [non-leaf blocks only] array of child bl | |||
ock | ock | |||
pointers. Each pointer is a block num | pointers. Each pointer is a block num | |||
ber | ber | |||
within the allocation group to the next le vel | within the allocation group to the next le vel | |||
in the Btree. | in the Btree. | |||
inode Inodes are allocated in "chunks" of 64 inodes each. Usuall y a | inode Inodes are allocated in "chunks" of 64 inodes each. Usuall y a | |||
chunk is multiple filesystem blocks, although there are ca ses | chunk is multiple filesystem blocks, although there are ca ses | |||
with large filesystem blocks where a chunk is less than | with large filesystem blocks where a chunk is less than | |||
one | one | |||
block. The inode Btree (see inobt above) refers to the in | block. The inode Btree (see inobt above) refers to the in | |||
ode | ode | |||
numbers per allocation group. The inode numbers direc | numbers per allocation group. The inode numbers direc | |||
tly | tly | |||
reflect the location of the inode block on disk. Use | reflect the location of the inode block on disk. Use | |||
the | the | |||
inode command to point xfs_db to a specific inode. Each in ode | inode command to point xfs_db to a specific inode. Each in ode | |||
contains four regions: core, next_unlinked, u, and a. c | contains four regions: core, next_unlinked, u, and a. c | |||
ore | ore | |||
contains the fixed information. next_unlinked is separa | contains the fixed information. next_unlinked is separa | |||
ted | ted | |||
from the core due to journaling considerations, see type | from the core due to journaling considerations, see type | |||
agi | agi | |||
field unlinked. u is a union structure that is different | field unlinked. u is a union structure that is different | |||
in | in | |||
size and format depending on the type and representation | size and format depending on the type and representation | |||
of | of | |||
the file data ("data fork"). a is an optional union str | the file data ("data fork"). a is an optional union str | |||
uc‐ | uc‐ | |||
ture to describe attribute data, that is different in si | ture to describe attribute data, that is different in si | |||
ze, | ze, | |||
format, and location depending on the presence and repres | format, and location depending on the presence and repres | |||
en‐ | en‐ | |||
tation of attribute data, and the size of the u d | tation of attribute data, and the size of the u d | |||
ata | ata | |||
("attribute fork"). xfs_db automatically selects the pro | ("attribute fork"). xfs_db automatically selects the pro | |||
per | per | |||
union members based on information in the inode. | union members based on information in the inode. | |||
The following are fields in the inode core: | The following are fields in the inode core: | |||
magic inode magic number, 0x494e ('IN'). | magic inode magic number, 0x494e ('IN'). | |||
mode mode and type of file, as described in | mode mode and type of file, as described in | |||
chmod(2), mknod(2), and stat(2). | chmod(2), mknod(2), and stat(2). | |||
version inode version, 1 or 2. | version inode version, 1 or 2. | |||
format format of u union data (0: xfs_dev_t, | format format of u union data (0: xfs_dev_t, | |||
1: | 1: | |||
local file - in-inode directory or symli | local file - in-inode directory or symli | |||
nk, | nk, | |||
2: extent list, 3: Btree root, 4: unique | 2: extent list, 3: Btree root, 4: unique | |||
id | id | |||
[unused]). | [unused]). | |||
nlinkv1 number of links to the file in a version 1 | nlinkv1 number of links to the file in a versio n 1 | |||
inode. | inode. | |||
nlinkv2 number of links to the file in a versio n 2 | nlinkv2 number of links to the file in a version 2 | |||
inode. | inode. | |||
projid_lo owner's project id (low word; version 2 in ode | projid_lo owner's project id (low word; version 2 in ode | |||
only). projid_hi owner's project id (h igh | only). projid_hi owner's project id (h igh | |||
word; version 2 inode only). | word; version 2 inode only). | |||
uid owner's user id. | uid owner's user id. | |||
gid owner's group id. | gid owner's group id. | |||
atime time last accessed (seconds and nanosecond s). | atime time last accessed (seconds and nanosecond s). | |||
mtime time last modified. | mtime time last modified. | |||
ctime time created or inode last modified. | ctime time created or inode last modified. | |||
size number of bytes in the file. | size number of bytes in the file. | |||
nblocks total number of blocks in the file includ ing | nblocks total number of blocks in the file includ ing | |||
indirect and attribute. | indirect and attribute. | |||
extsize basic/minimum extent size for the file. | extsize basic/minimum extent size for the file. | |||
nextents number of extents in the data fork. | nextents number of extents in the data fork. | |||
naextents number of extents in the attribute fork. | naextents number of extents in the attribute fork. | |||
forkoff attribute fork offset in the inode, in 64- bit | forkoff attribute fork offset in the inode, in 64- bit | |||
words from the start of u. | words from the start of u. | |||
aformat format of a data (1: local attribute data, 2: | aformat format of a data (1: local attribute data, 2: | |||
extent list, 3: Btree root). | extent list, 3: Btree root). | |||
dmevmask DMAPI event mask. | dmevmask DMAPI event mask. | |||
dmstate DMAPI state information. | dmstate DMAPI state information. | |||
newrtbm file is the realtime bitmap and is "new" f or‐ | newrtbm file is the realtime bitmap and is "new" f or‐ | |||
mat. | mat. | |||
prealloc file has preallocated data space after EOF . | prealloc file has preallocated data space after EOF . | |||
realtime file data is in the realtime subvolume. | realtime file data is in the realtime subvolume. | |||
gen inode generation number. | gen inode generation number. | |||
The following fields are in the u data fork union: | The following fields are in the u data fork union: | |||
bmbt bmap Btree root. This looks like a bmap btd | bmbt bmap Btree root. This looks like a bmap btd | |||
block with redundant information removed. | block with redundant information removed. | |||
bmx array of extent descriptors. | bmx array of extent descriptors. | |||
dev dev_t for the block or character device. | dev dev_t for the block or character device. | |||
sfdir shortform (in-inode) version 1 directo ry. | sfdir shortform (in-inode) version 1 directo ry. | |||
This consists of a hdr containing the par ent | This consists of a hdr containing the par ent | |||
inode number and a count of active entries in | inode number and a count of active entries in | |||
the directory, followed by an array list | the directory, followed by an array list | |||
of | of | |||
hdr.count entries. Each such entry conta | hdr.count entries. Each such entry conta | |||
ins | ins | |||
inumber, namelen, and name string. | inumber, namelen, and name string. | |||
sfdir2 shortform (in-inode) version 2 directo ry. | sfdir2 shortform (in-inode) version 2 directo ry. | |||
This consists of a hdr containing a count | This consists of a hdr containing a count | |||
of | of | |||
active entries in the directory, an i8co | active entries in the directory, an i8co | |||
unt | unt | |||
of entries with inumbers that don't fit i | of entries with inumbers that don't fit in | |||
n a | a | |||
32-bit value, and the parent inode numb | 32-bit value, and the parent inode numb | |||
er, | er, | |||
followed by an array list of hdr.co | followed by an array list of hdr.co | |||
unt | unt | |||
entries. Each such entry contains namelen, | entries. Each such entry contains namelen | |||
a | , a | |||
saved offset used when the directory is c | saved offset used when the directory is c | |||
on‐ | on‐ | |||
verted to a larger form, a name string, | verted to a larger form, a name string, | |||
and | and | |||
the inumber. | the inumber. | |||
symlink symbolic link string value. | symlink symbolic link string value. | |||
The following fields are in the a attribute fork union if it | The following fields are in the a attribute fork union if it | |||
exists: | exists: | |||
bmbt bmap Btree root, as above. | bmbt bmap Btree root, as above. | |||
bmx array of extent descriptors. | bmx array of extent descriptors. | |||
sfattr shortform (in-inode) attribute values. T his | sfattr shortform (in-inode) attribute values. T his | |||
consists of a hdr containing a totsize (to tal | consists of a hdr containing a totsize (to tal | |||
size in bytes) and a count of active entri es, | size in bytes) and a count of active entri es, | |||
followed by an array list of hdr.co | followed by an array list of hdr.co | |||
unt | unt | |||
entries. Each such entry contains namel | entries. Each such entry contains namel | |||
en, | en, | |||
valuelen, root flag, name, and value. | valuelen, root flag, name, and value. | |||
log Log blocks contain the journal entries for XFS. It's | log Log blocks contain the journal entries for XFS. It's | |||
not | not | |||
useful to examine these with xfs_db, use xfs_logprint | useful to examine these with xfs_db, use xfs_logprint | |||
(8) | (8) | |||
instead. | instead. | |||
rtbitmap If the filesystem has a realtime subvolume, then the rbm | rtbitmap If the filesystem has a realtime subvolume, then the rbm | |||
ino | ino | |||
field in the superblock refers to a file that contains | field in the superblock refers to a file that contains | |||
the | the | |||
realtime bitmap. Each bit in the bitmap file controls | realtime bitmap. Each bit in the bitmap file controls | |||
the | the | |||
allocation of a single realtime extent (set == free). | allocation of a single realtime extent (set == free). | |||
The | The | |||
bitmap is processed in 32-bit words, the LSB of a word | bitmap is processed in 32-bit words, the LSB of a word | |||
is | is | |||
used for the first extent controlled by that bitmap word. The | used for the first extent controlled by that bitmap word. The | |||
atime field of the realtime bitmap inode contains a coun ter | atime field of the realtime bitmap inode contains a coun ter | |||
that is used to control where the next new realtime file w ill | that is used to control where the next new realtime file w ill | |||
start. | start. | |||
rtsummary If the filesystem has a realtime subvolume, then the rsum | rtsummary If the filesystem has a realtime subvolume, then the rsum | |||
ino | ino | |||
field in the superblock refers to a file that contains | field in the superblock refers to a file that contains | |||
the | the | |||
realtime summary data. The summary file contains a two-dim en‐ | realtime summary data. The summary file contains a two-dim en‐ | |||
sional array of 16-bit values. Each value counts the num | sional array of 16-bit values. Each value counts the num | |||
ber | ber | |||
of free extent runs (consecutive free realtime extents) o | of free extent runs (consecutive free realtime extents) of | |||
f a | a | |||
given range of sizes that starts in a given bitmap blo | given range of sizes that starts in a given bitmap blo | |||
ck. | ck. | |||
The size ranges are binary buckets (low size in the bucket is | The size ranges are binary buckets (low size in the bucket is | |||
a power of 2). There are as many size ranges as are nec | a power of 2). There are as many size ranges as are nec | |||
es‐ | es‐ | |||
sary given the size of the realtime subvolume. The fi | sary given the size of the realtime subvolume. The fi | |||
rst | rst | |||
dimension is the size range, the second dimension is | dimension is the size range, the second dimension is | |||
the | the | |||
starting bitmap block number (adjacent entries are for | starting bitmap block number (adjacent entries are for | |||
the | the | |||
same size, adjacent bitmap blocks). | same size, adjacent bitmap blocks). | |||
sb There is one sb (superblock) structure per allocation gro up. | sb There is one sb (superblock) structure per allocation gro up. | |||
It is the first disk block in the allocation group. Only the | It is the first disk block in the allocation group. Only the | |||
first one (block 0 of the filesystem) is actually used; | first one (block 0 of the filesystem) is actually used; | |||
the | the | |||
other blocks are redundant information for xfs_repair(8) | other blocks are redundant information for xfs_repair(8) | |||
to | to | |||
use if the first superblock is damaged. Fields defined: | use if the first superblock is damaged. Fields defined: | |||
magicnum superblock magic number, 0x58465342 ('XFSB '). | magicnum superblock magic number, 0x58465342 ('XFSB '). | |||
blocksize filesystem block size in bytes. | blocksize filesystem block size in bytes. | |||
dblocks number of filesystem blocks present in the | dblocks number of filesystem blocks present in the | |||
data subvolume. | data subvolume. | |||
rblocks number of filesystem blocks present in the | rblocks number of filesystem blocks present in the | |||
realtime subvolume. | realtime subvolume. | |||
rextents number of realtime extents that rblocks c on‐ | rextents number of realtime extents that rblocks c on‐ | |||
tain. | tain. | |||
uuid unique identifier of the filesystem. | uuid unique identifier of the filesystem. | |||
logstart starting filesystem block number of the | logstart starting filesystem block number of the | |||
log | log | |||
(journal). If this value is 0 the log | (journal). If this value is 0 the log | |||
is | is | |||
"external". | "external". | |||
rootino root inode number. | rootino root inode number. | |||
rbmino realtime bitmap inode number. | rbmino realtime bitmap inode number. | |||
rsumino realtime summary data inode number. | rsumino realtime summary data inode number. | |||
rextsize realtime extent size in filesystem blocks. | rextsize realtime extent size in filesystem blocks. | |||
agblocks size of an allocation group in filesys tem | agblocks size of an allocation group in filesys tem | |||
blocks. | blocks. | |||
agcount number of allocation groups. | agcount number of allocation groups. | |||
rbmblocks number of realtime bitmap blocks. | rbmblocks number of realtime bitmap blocks. | |||
logblocks number of log blocks (filesystem blocks). | logblocks number of log blocks (filesystem blocks). | |||
versionnum filesystem version information. This va lue | versionnum filesystem version information. This va lue | |||
is currently 1, 2, 3, or 4 in the low 4 bi ts. | is currently 1, 2, 3, or 4 in the low 4 bi ts. | |||
If the low bits are 4 then the other b | If the low bits are 4 then the other b | |||
its | its | |||
have additional meanings. 1 is the origi | have additional meanings. 1 is the origi | |||
nal | nal | |||
value. 2 means that attributes were used. 3 | value. 2 means that attributes were used. 3 | |||
means that version 2 inodes (large l ink | means that version 2 inodes (large l ink | |||
counts) were used. 4 is the bitmask vers | counts) were used. 4 is the bitmask vers | |||
ion | ion | |||
of the version number. In this case, | of the version number. In this case, | |||
the | the | |||
other bits are used as flags (0x00 | other bits are used as flags (0x00 | |||
10: | 10: | |||
attributes were used, 0x0020: version | attributes were used, 0x0020: version | |||
2 | 2 | |||
inodes were used, 0x0040: quotas were us | inodes were used, 0x0040: quotas were us | |||
ed, | ed, | |||
0x0080: inode cluster alignment is in for | 0x0080: inode cluster alignment is in for | |||
ce, | ce, | |||
0x0100: data stripe alignment is in for | 0x0100: data stripe alignment is in for | |||
ce, | ce, | |||
0x0200: the shared_vn field is used, 0x10 | 0x0200: the shared_vn field is used, 0x10 | |||
00: | 00: | |||
unwritten extent tracking is on, 0x2000: v er‐ | unwritten extent tracking is on, 0x2000: v er‐ | |||
sion 2 directories are in use). | sion 2 directories are in use). | |||
sectsize sector size in bytes, currently always 5 | sectsize sector size in bytes, currently always 5 | |||
12. | 12. | |||
This is the size of the superblock and | This is the size of the superblock and | |||
the | the | |||
other header blocks. | other header blocks. | |||
inodesize inode size in bytes. | inodesize inode size in bytes. | |||
inopblock number of inodes per filesystem block. | inopblock number of inodes per filesystem block. | |||
fname obsolete, filesystem name. | fname obsolete, filesystem name. | |||
fpack obsolete, filesystem pack name. | fpack obsolete, filesystem pack name. | |||
blocklog log2 of blocksize. | blocklog log2 of blocksize. | |||
sectlog log2 of sectsize. | sectlog log2 of sectsize. | |||
inodelog log2 of inodesize. | inodelog log2 of inodesize. | |||
inopblog log2 of inopblock. | inopblog log2 of inopblock. | |||
agblklog log2 of agblocks (rounded up). | agblklog log2 of agblocks (rounded up). | |||
rextslog log2 of rextents. | rextslog log2 of rextents. | |||
inprogress mkfs.xfs(8) or xfs_copy(8) aborted bef ore | inprogress mkfs.xfs(8) or xfs_copy(8) aborted bef ore | |||
completing this filesystem. | completing this filesystem. | |||
imax_pct maximum percentage of filesystem space u sed | imax_pct maximum percentage of filesystem space u sed | |||
for inode blocks. | for inode blocks. | |||
icount number of allocated inodes. | icount number of allocated inodes. | |||
ifree number of allocated inodes that are not in | ifree number of allocated inodes that are not in | |||
use. | use. | |||
fdblocks number of free data blocks. | fdblocks number of free data blocks. | |||
frextents number of free realtime extents. | frextents number of free realtime extents. | |||
uquotino user quota inode number. | uquotino user quota inode number. | |||
pquotino project quota inode number; this is curren tly | pquotino project quota inode number; this is curren tly | |||
unused. | unused. | |||
qflags quota status flags (0x01: user quota accou nt‐ | qflags quota status flags (0x01: user quota accou nt‐ | |||
ing is on, 0x02: user quota limits are | ing is on, 0x02: user quota limits are | |||
enforced, 0x04: quotacheck has been run | enforced, 0x04: quotacheck has been run | |||
on | on | |||
user quotas, 0x08: project quota account | user quotas, 0x08: project quota account | |||
ing | ing | |||
is on, 0x10: project quota limits | is on, 0x10: project quota limits | |||
are | are | |||
enforced, 0x20: quotacheck has been run | enforced, 0x20: quotacheck has been run | |||
on | on | |||
project quotas). | project quotas). | |||
flags random flags. 0x01: only read-only mounts are | flags random flags. 0x01: only read-only mounts are | |||
allowed. | allowed. | |||
shared_vn shared version number (shared reado nly | shared_vn shared version number (shared reado nly | |||
filesystems). | filesystems). | |||
inoalignmt inode chunk alignment in filesystem blocks . | inoalignmt inode chunk alignment in filesystem blocks . | |||
unit stripe or RAID unit. | unit stripe or RAID unit. | |||
width stripe or RAID width. | width stripe or RAID width. | |||
dirblklog log2 of directory block size (filesys tem | dirblklog log2 of directory block size (filesys tem | |||
blocks). | blocks). | |||
symlink Symbolic link blocks are used only when the symbolic l | symlink Symbolic link blocks are used only when the symbolic l | |||
ink | ink | |||
value does not fit inside the inode. The block content | value does not fit inside the inode. The block content | |||
is | is | |||
just the string value. Bytes past the logical end of | just the string value. Bytes past the logical end of | |||
the | the | |||
symbolic link value have arbitrary values. | symbolic link value have arbitrary values. | |||
text User file blocks, and other blocks whose type is unkno | text User file blocks, and other blocks whose type is unkno | |||
wn, | wn, | |||
have this type for display purposes in xfs_db. The bl | have this type for display purposes in xfs_db. The bl | |||
ock | ock | |||
data is displayed in two columns: Hexadecimal format | data is displayed in two columns: Hexadecimal format | |||
and | and | |||
printable ASCII chars. | printable ASCII chars. | |||
DIAGNOSTICS | DIAGNOSTICS | |||
Many messages can come from the check (blockget) command; these are | Many messages can come from the check (blockget) command; these are | |||
documented in xfs_check(8). | documented in xfs_check(8). | |||
SEE ALSO | SEE ALSO | |||
mkfs.xfs(8), xfs_admin(8), xfs_check(8), xfs_copy(8), xfs_logprint( | mkfs.xfs(8), xfs_admin(8), xfs_check(8), xfs_copy(8), xfs_logprint( | |||
8), | 8), | |||
xfs_metadump(8), xfs_ncheck(8), xfs_repair(8), mount(8), chmod( | xfs_metadump(8), xfs_ncheck(8), xfs_repair(8), mount(8), chmod( | |||
2), | 2), | |||
mknod(2), stat(2), xfs(5). | mknod(2), stat(2), xfs(5). | |||
xfs_db (8) | xfs_db (8) | |||
End of changes. 85 change blocks. | ||||
312 lines changed or deleted | 313 lines changed or added | |||
This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/ |