blob: 81adca293b65bfe84b5e2d824ec618e5f23a0a90 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
|
.\" Man page generated from reStructuredText.
.
.
.nr rst2man-indent-level 0
.
.de1 rstReportMargin
\\$1 \\n[an-margin]
level \\n[rst2man-indent-level]
level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
-
\\n[rst2man-indent0]
\\n[rst2man-indent1]
\\n[rst2man-indent2]
..
.de1 INDENT
.\" .rstReportMargin pre:
. RS \\$1
. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
. nr rst2man-indent-level +1
.\" .rstReportMargin post:
..
.de UNINDENT
. RE
.\" indent \\n[an-margin]
.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
.nr rst2man-indent-level -1
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
..
.TH "BTRFS-SELECT-SUPER" "8" "Feb 28, 2024" "6.6.3" "BTRFS"
.SH NAME
btrfs-select-super \- overwrite primary superblock with a backup copy
.SH SYNOPSIS
.sp
\fBbtrfs\-select\-super\fP \-s number <device>
.SH DESCRIPTION
.sp
Destructively overwrite all copies of the superblock with a specified copy.
This helps in certain cases, for example when write barriers were disabled
during a power failure and not all superblocks were written, or if the primary
superblock is damaged, e.g. accidentally overwritten.
.sp
The filesystem specified by \fIdevice\fP must not be mounted.
.sp
\fBNOTE:\fP
.INDENT 0.0
.INDENT 3.5
Prior to overwriting the primary superblock, please make sure that the
backup copies are valid!
.UNINDENT
.UNINDENT
.sp
To dump a superblock use the \fBbtrfs inspect\-internal dump\-super\fP command.
.sp
Then run the check (in the non\-repair mode) using the command \fBbtrfs check \-s\fP
where \fI\-s\fP specifies the superblock copy to use.
.sp
Superblock copies exist in the following offsets on the device:
.INDENT 0.0
.IP \(bu 2
primary: 64KiB (65536)
.IP \(bu 2
1st copy: 64MiB (67108864)
.IP \(bu 2
2nd copy: 256GiB (274877906944)
.UNINDENT
.sp
A superblock size is 4KiB (4096).
.SH OPTIONS
.INDENT 0.0
.TP
.B \-s|\-\-super <N>
use Nth superblock copy, valid values are 0 1 or 2 if the
respective superblock offset is within the device size
.UNINDENT
.SH SEE ALSO
.sp
\fI\%btrfs(8)\fP
.\" Generated by docutils manpage writer.
.
|