1BTRFS-SEARCH-METADATA(1)     Btrfs Search Metadata    BTRFS-SEARCH-METADATA(1)
2
3
4

NAME

6       btrfs-search-metadata - lookup btrfs metadata
7
8

SYNOPSIS

10       btrfs-search-metadata <subcommand> <args>
11
12

DESCRIPTION

14       The btrfs-search-metadata program can be used to execute search queries
15       in order to look up metadata items of an online, mounted btrfs
16       filesystem.  Unlike the btrfs inspect-internal dump-tree command, which
17       directly reads from disk, btrfs-search-metadata only uses the kernel
18       SEARCH ioctl function.
19
20       Besides being able to get any metadata slice from any tree, there are a
21       number of convenience presets that execute predefined search queries.
22
23

GLOBAL OPTIONS

25       -h, --help
26              Show the built-in help message and exit.
27
28       --format keys|short|long
29              Print metadata items as keys only, as a short single line per
30              item (default), or long output with full contents of all fields.
31
32

SUBCOMMANDS

34       chunks <path>
35           Display all chunk items from the chunk tree, as well as the stripe
36           items that they contain.
37
38       block_groups <path>
39           Display all block group items from the extent tree.
40
41       dev_extents <path>
42           Display all device extent items from the device tree.
43
44       file <path>
45           Display all information btrfs knows about a file or directory.
46
47       inode -t|--tree <tree> --inum <inum> <path>
48           Display all information about an inode number in a subvolume tree.
49
50       devices <path>
51           Display all device items from the device tree.
52
53       orphans <path>
54           Display all orphan items from the root tree.
55
56       dump -t|--tree <tree> [--min-key <MIN_KEY>] [--max-key <MAX_KEY>]
57       <path>
58           Dump an arbitrary slice of metadata items from any tree. A key
59           should be specified in the regular form as '(<objectid> <type>
60           <offset>)', e.g. '(EXTENT_TREE ROOT_ITEM 0)'. The number -1 can be
61           used instead of the maximum value for a field. This can be very
62           useful when dumping all metadata items for a specific objectid. For
63           example, what the inode subcommand does is searching with min-key
64           '(<inum> 0 0)' and max-key '(<inum> -1 -1)'
65
66       block_group_contents --vaddr <vaddr> <path>
67           Dump the contents of a block group (from the extent tree) from the
68           specified virtual address of the start of the block group to its
69           end. Use the block_groups subcommand to list block group addresses.
70
71       block_group_free_space --vaddr <vaddr> <path>
72           Dump the free space extents for a block group (from the free space
73           tree) for the block group at the specified virtual address. Use the
74           block_groups subcommand to list block group addresses.
75
76

SEE ALSO

78       This program is an example of what can be done using the python-btrfs
79       library.
80
81       Source and documentation on github: https://github.com/knorrie/python-
82       btrfs
83
84
85
86                                     2020             BTRFS-SEARCH-METADATA(1)
Impressum