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 directory names and extended
28 attribute names to allow the dumps to be sent without revealing confi‐
29 dential information. Extended attribute values are zeroed and no data
30 is copied. The only exceptions are directory or attribute names that
31 are 4 or less characters in length. Also directory names that span
32 extents (this can only occur with the mkfs.xfs(8) options where -n size
33 > -b size) are not obfuscated. Names between 5 and 8 characters in
34 length inclusively are partially obfuscated.
35
36 xfs_metadump should not be used for any purposes other than for debug‐
37 ging and reporting filesystem problems. The most common usage scenario
38 for this tool is when xfs_repair(8) fails to repair a filesystem and a
39 metadump image can be sent for analysis.
40
41 The file generated by xfs_metadump can be restored to filesystem image
42 (minus the data) using the xfs_mdrestore(8) tool.
43
45 -e Stops the dump on a read error. Normally, it will ignore read
46 errors and copy all the metadata that is accessible.
47
48 -f Specifies that the filesystem image to be processed is stored in
49 a regular file (see the mkfs.xfs -d file option). This can also
50 happen if an image copy of a filesystem has been made into an
51 ordinary file with xfs_copy(8).
52
53 -g Shows dump progress. This is sent to stdout if the target is a
54 file or to stderr if the target is stdout.
55
56 -l logdev
57 For filesystems which use an external log, this specifies the
58 device where the external log resides. The external log is not
59 copied, only internal logs are copied.
60
61 -o Disables obfuscation of file names and extended attributes.
62
63 -w Prints warnings of inconsistant metadata encountered to stderr.
64 Bad metadata is still copied.
65
67 xfs_metadump returns an exit code of 0 if all readable metadata is suc‐
68 cesfully copied or 1 if a write error occurs or a read error occurs and
69 the -e option used.
70
72 As xfs_metadump copies metadata only, it does not matter if the source
73 filesystem has a realtime section or not. If the filesystem has an
74 external log, it is not copied. Internal logs are copied and any out‐
75 standing log transactions are not obfuscated if they contain names.
76
77 xfs_metadump is a shell wrapper around the xfs_db(8) metadump command.
78
80 xfs_repair(8), xfs_mdrestore(8), xfs_freeze(8), xfs_db(8), xfs_copy(8),
81 xfs(5)
82
84 Email bug reports to xfs@oss.sgi.com.
85
86
87
88 xfs_metadump(8)