1xfs_metadump(8) System Manager's Manual xfs_metadump(8)
2
3
4
6 xfs_metadump - copy XFS filesystem metadata to a file
7
9 xfs_metadump [ -efgow ] [ -l logdev ] source target
10
12 xfs_metadump is a debugging tool that copies the metadata from an XFS
13 filesystem to a file. The source argument must be the pathname of the
14 device or file containing the XFS filesystem and the target argument
15 specifies the destination file name. If target is -, then the output
16 is sent to stdout. This allows the output to be redirected to another
17 program such as a compression application.
18
19 xfs_metadump should only be used to copy unmounted filesystems, read-
20 only mounted filesystems, or frozen filesystems (see xfs_freeze(8)).
21 Otherwise, the generated dump could be inconsistent or corrupt.
22
23 xfs_metadump does not alter the source filesystem in any way. The tar‐
24 get image is a contiguous (non-sparse) file containing all the filesys‐
25 tem's metadata and indexes to where the blocks were copied from.
26
27 By default, xfs_metadump obfuscates most file (regular file, directory
28 and symbolic link) names and extended attribute names to allow the
29 dumps to be sent without revealing confidential information. Extended
30 attribute values are zeroed and no data is copied. The only exceptions
31 are file or attribute names that are 4 or less characters in length.
32 Also file names that span extents (this can only occur with the
33 mkfs.xfs(8) options where -n size > -b size) are not obfuscated. Names
34 between 5 and 8 characters in length inclusively are partially obfus‐
35 cated.
36
37 xfs_metadump should not be used for any purposes other than for debug‐
38 ging and reporting filesystem problems. The most common usage scenario
39 for this tool is when xfs_repair(8) fails to repair a filesystem and a
40 metadump image can be sent for analysis.
41
42 The file generated by xfs_metadump can be restored to filesystem image
43 (minus the data) using the xfs_mdrestore(8) tool.
44
46 -e Stops the dump on a read error. Normally, it will ignore read
47 errors and copy all the metadata that is accessible.
48
49 -f Specifies that the filesystem image to be processed is stored in
50 a regular file (see the mkfs.xfs -d file option). This can also
51 happen if an image copy of a filesystem has been made into an
52 ordinary file with xfs_copy(8).
53
54 -g Shows dump progress. This is sent to stdout if the target is a
55 file or to stderr if the target is stdout.
56
57 -l logdev
58 For filesystems which use an external log, this specifies the
59 device where the external log resides. The external log is not
60 copied, only internal logs are copied.
61
62 -o Disables obfuscation of file names and extended attributes.
63
64 -w Prints warnings of inconsistant metadata encountered to stderr.
65 Bad metadata is still copied.
66
68 xfs_metadump returns an exit code of 0 if all readable metadata is suc‐
69 cesfully copied or 1 if a write error occurs or a read error occurs and
70 the -e option used.
71
73 As xfs_metadump copies metadata only, it does not matter if the source
74 filesystem has a realtime section or not. If the filesystem has an
75 external log, it is not copied. Internal logs are copied and any out‐
76 standing log transactions are not obfuscated if they contain names.
77
78 xfs_metadump is a shell wrapper around the xfs_db(8) metadump command.
79
81 xfs_repair(8), xfs_mdrestore(8), xfs_freeze(8), xfs_db(8), xfs_copy(8),
82 xfs(5)
83
85 Email bug reports to xfs@oss.sgi.com.
86
87
88
89 xfs_metadump(8)