| 1 |
.\" -*- nroff -*- |
| 2 |
.\" Copyright 1996-2004 Hans Reiser. |
| 3 |
.\" |
| 4 |
.TH REISERFSCK 8 "January 2009" "Reiserfsprogs-3.6.27" |
| 5 |
.SH NAME |
| 6 |
reiserfsck \- The checking tool for the ReiserFS filesystem. |
| 7 |
.SH SYNOPSIS |
| 8 |
.B reiserfsck |
| 9 |
[ \fB-aprVy\fR ] |
| 10 |
[ \fB--rebuild-sb\fR | \fB--check\fR | \fB--fix-fixable\fR |
| 11 |
| \fB--rebuild-tree\fR | \fB--clean-attributes\fR ] |
| 12 |
.\" [ \fB-i\fR | \fB--interactive\fR ] |
| 13 |
[ \fB-j\fR | \fB--journal\fR \fIdevice\fR ] |
| 14 |
[ \fB-z\fR | \fB--adjust-size\fR ] |
| 15 |
[ \fB-n\fR | \fB--nolog\fR ] |
| 16 |
[ \fB-B\fR | \fB--badblocks \fIfile\fR ] |
| 17 |
[ \fB-l\fR | \fB--logfile \fIfile\fR ] |
| 18 |
[ \fB-q\fR | \fB--quiet\fR ] |
| 19 |
[ \fB-y\fR | \fB--yes\fR ] |
| 20 |
[ \fB-f\fR | \fB--force\fR ] |
| 21 |
.\" [ \fB-b\fR | \fB--scan-marked-in-bitmap \fIbitmap-filename\fR ] |
| 22 |
.\" [ \fB-h\fR | \fB--hash \fIhash-name\fR ] |
| 23 |
.\" [ \fB-g\fR | \fB--background\fR ] |
| 24 |
[ \fB-S\fR | \fB--scan-whole-partition\fR ] |
| 25 |
[ \fB--no-journal-available\fR ] |
| 26 |
.I device |
| 27 |
.SH DESCRIPTION |
| 28 |
\fBReiserfsck\fR searches for a Reiserfs filesystem on a device, replays |
| 29 |
any necessary transactions, and either checks or repairs the file system. |
| 30 |
.TP |
| 31 |
.I device |
| 32 |
is the special file corresponding to a device or to a partition (e.g |
| 33 |
/dev/hdXX for an IDE disk partition or /dev/sdXX for a SCSI disk partition). |
| 34 |
.SH OPTIONS |
| 35 |
.TP |
| 36 |
.B --rebuild-sb |
| 37 |
This option recovers the superblock on a Reiserfs partition. Normally you |
| 38 |
only need this option if mount reports "read_super_block: can't find |
| 39 |
a reiserfs file system" and you are sure that a Reiserfs file system is |
| 40 |
there. But remember that if you have used some partition editor program and |
| 41 |
now you cannot find a filesystem, probably something has gone wrong while |
| 42 |
repartitioning and the start of the partition has been changed. If so, |
| 43 |
instead of rebuilding the super block on a wrong place you should find the |
| 44 |
correct start of the partition first. |
| 45 |
.TP |
| 46 |
.B --check |
| 47 |
This default action checks filesystem consistency and reports, but |
| 48 |
does not repair any corruption that it finds. This option may be |
| 49 |
used on a read-only file system mount. |
| 50 |
.TP |
| 51 |
.B --fix-fixable |
| 52 |
This option recovers certain kinds of corruption that do not require |
| 53 |
rebuilding the entire file system tree (\fB--rebuild-tree\fR). Normally |
| 54 |
you only need this option if the \fB--check\fR option reports |
| 55 |
"corruption that can be fixed with \fB--fix-fixable\fR". This includes: |
| 56 |
zeroing invalid data-block pointers, correcting st_size and st_blocks |
| 57 |
for directories, and deleting invalid directory entries. |
| 58 |
.TP |
| 59 |
.B --rebuild-tree |
| 60 |
This option rebuilds the entire filesystem tree using leaf nodes |
| 61 |
found on the device. Normally you only need this option if the |
| 62 |
\fBreiserfsck \-\-check\fR reports "Running with \fB\-\-rebuild-tree\fR |
| 63 |
is required". You are strongly encouraged to make a backup copy |
| 64 |
of the whole partition before attempting the \fB--rebuild-tree\fR |
| 65 |
option. Once \fBreiserfsck \-\-rebuild-tree\fR is started it must |
| 66 |
finish its work (and you should not interrupt it), otherwise the |
| 67 |
filesystem will be left in the unmountable state to avoid subsequent |
| 68 |
data corruptions. |
| 69 |
.TP |
| 70 |
.B --clean-attributes |
| 71 |
This option cleans reserved fields of Stat-Data items. There were days when |
| 72 |
there were no extended attributes in reiserfs. When they were implemented old |
| 73 |
partitions needed to be cleaned first -- reiserfs code in the kernel did not |
| 74 |
care about not used fields in its strutures. Thus if you have used one of the |
| 75 |
old (pre-attrbutes) kernels with a ReiserFS filesystem and you want to use |
| 76 |
extented attribues there, you should clean the filesystem first. |
| 77 |
.TP |
| 78 |
.B \fB--journal \fIdevice \fR, \fB-j \fIdevice \fR |
| 79 |
This option supplies the device name of the current file system journal. |
| 80 |
This option is required when the journal resides on a separate device |
| 81 |
from the main data device (although it can be avoided with the expert |
| 82 |
option \fB--no-journal-available\fR). |
| 83 |
.TP |
| 84 |
.\" .B --interactive, -i |
| 85 |
.\" This makes \fBreiserfsck\fR to stop after each pass completed. |
| 86 |
.\" .TP |
| 87 |
.B --adjust-size, -z |
| 88 |
This option causes \fBreiserfsck\fR to correct file sizes that |
| 89 |
are larger than the offset of the last discovered byte. This |
| 90 |
implies that holes at the end of a file will be removed. File |
| 91 |
sizes that are smaller than the offset of the last discovered |
| 92 |
byte are corrected by \fB--fix-fixable\fR. |
| 93 |
.TP |
| 94 |
\fB--badblocks \fIfile\fR, \fB-B \fI file\fR |
| 95 |
This option sets the badblock list to be the list of blocks specified in |
| 96 |
the given `file`. The filesystem badblock list is cleared before the new |
| 97 |
list is added. It can be used with \fB--fix-fixable\fR to fix the list of |
| 98 |
badblocks (see \fBdebugreiserfs \-B\fR). If the device has bad blocks, every |
| 99 |
time it must be given with the \fB--rebuild-tree\fR option. |
| 100 |
.TP |
| 101 |
\fB--logfile \fIfile\fR, \fB-l \fI file\fR |
| 102 |
This option causes \fBreiserfsck\fR to report any corruption it finds |
| 103 |
to the specified log file rather than to stderr. |
| 104 |
.TP |
| 105 |
.B --nolog, -n |
| 106 |
This option prevents \fBreiserfsck\fR from reporting any kinds of corruption. |
| 107 |
.TP |
| 108 |
.B --quiet, -q |
| 109 |
This option prevents \fBreiserfsck\fR from reporting its rate of progress. |
| 110 |
.TP |
| 111 |
.B --yes, -y |
| 112 |
This option inhibits \fBreiserfsck\fR from asking you for confirmation after |
| 113 |
telling you what it is going to do. It will assuem you confirm. For safety, |
| 114 |
it does not work with the \fB--rebuild-tree\fR option. |
| 115 |
.TP |
| 116 |
\fB-a\fR, \fB-p\fR |
| 117 |
These options are usually passed by fsck \-A during the automatic checking |
| 118 |
of those partitions listed in /etc/fstab. These options cause \fBreiserfsck\fR |
| 119 |
to print some information about the specified filesystem, to check if error |
| 120 |
flags in the superblock are set and to do some light-weight checks. If these |
| 121 |
checks reveal a corruption or the flag indicating a (possibly fixable) |
| 122 |
corruption is found set in the superblock, then \fBreiserfsck\fR switches |
| 123 |
to the fix-fixable mode. If the flag indicating a fatal corruption is found |
| 124 |
set in the superblock, then \fBreiserfsck\fR finishes with an error. |
| 125 |
.TP |
| 126 |
.B --force, -f |
| 127 |
Force checking even if the file system seems clean. |
| 128 |
.TP |
| 129 |
.B -V |
| 130 |
This option prints the reiserfsprogs version and then exit. |
| 131 |
.TP |
| 132 |
.B -r |
| 133 |
This option does nothing at all; it is provided only for |
| 134 |
backwards compatibility. |
| 135 |
.SH EXPERT OPTIONS |
| 136 |
DO NOT USE THESE OPTIONS UNLESS YOU KNOW WHAT YOU ARE DOING. |
| 137 |
WE ARE NOT RESPONSIBLE IF YOU LOSE DATA AS A RESULT OF THESE |
| 138 |
OPTIONS. |
| 139 |
.TP |
| 140 |
.B \fB\--no-journal-available\fR |
| 141 |
This option allows \fBreiserfsck\fR to proceed when the journal device is |
| 142 |
not available. This option has no effect when the journal is located on |
| 143 |
the main data device. NOTE: after this operation you must use \fBreiserfstune\fR |
| 144 |
to specify a new journal device. |
| 145 |
.TP |
| 146 |
.B --scan-whole-partition, -S |
| 147 |
This option causes \fB--rebuild-tree\fR to scan the whole partition but not only |
| 148 |
the used space on the partition. |
| 149 |
.SH AN EXAMPLE OF USING reiserfsck |
| 150 |
1. You think something may be wrong with a reiserfs partition on /dev/hda1 |
| 151 |
or you would just like to perform a periodic disk check. |
| 152 |
|
| 153 |
2. Run \fBreiserfsck \-\-check \-\-logfile check.log /dev/hda1\fR. If \fBreiserfsck |
| 154 |
\-\-check\fR exits with status 0 it means no errors were discovered. |
| 155 |
|
| 156 |
3. If \fBreiserfsck \-\-check\fR exits with status 1 (and reports about fixable |
| 157 |
corruptions) it means that you should run \fBreiserfsck \-\-fix-fixable \-\-logfile |
| 158 |
fixable.log /dev/hda1\fR. |
| 159 |
|
| 160 |
4. If \fBreiserfsck \-\-check\fR exits with status 2 (and reports about fatal |
| 161 |
corruptions) it means that you need to run \fBreiserfsck \-\-rebuild\-tree\fR. |
| 162 |
If \fBreiserfsck \-\-check\fR fails in some way you should also run \fBreiserfsck |
| 163 |
\-\-rebuild-tree\fR, but we also encourage you to submit this as a bug report. |
| 164 |
|
| 165 |
5. Before running \fBreiserfsck \-\-rebuild-tree\fR, please make a backup of |
| 166 |
the whole partition before proceeding. Then run \fBreiserfsck \-\-rebuild-tree |
| 167 |
\-\-logfile rebuild.log /dev/hda1\fR. |
| 168 |
|
| 169 |
6. If the \fBreiserfsck \-\-rebuild-tree\fR step fails or does not recover what |
| 170 |
you expected, please submit this as a bug report. Try to provide as much |
| 171 |
information as possible including your platform and Linux kernel version. We |
| 172 |
will try to help solve the problem. |
| 173 |
.SH EXIT CODES |
| 174 |
\fBreiserfsck\fR uses the following exit codes: |
| 175 |
.br |
| 176 |
\ \fI0\fR \-\ No errors. |
| 177 |
.br |
| 178 |
\ \fI1\fR \-\ File system errors corrected. |
| 179 |
.br |
| 180 |
\ \fI2\fR \-\ Reboot is needed. |
| 181 |
.br |
| 182 |
\ \fI4\fR \-\ File system fatal errors left uncorrected, |
| 183 |
.br |
| 184 |
\ \fBreiserfsck \-\-rebuild-tree\fR needs to be launched. |
| 185 |
.br |
| 186 |
\ \fI6\fR \-\ File system fixable errors left uncorrected, |
| 187 |
.br |
| 188 |
\ \fBreiserfsck \-\-fix-fixable\fR needs to be launched. |
| 189 |
.br |
| 190 |
\ \fI8\fR \-\ Operational error. |
| 191 |
.br |
| 192 |
\ \fI16\fR \-\ Usage or syntax error. |
| 193 |
.br |
| 194 |
.SH AUTHOR |
| 195 |
This version of \fBreiserfsck\fR has been written by Vitaly Fertman <[email protected]>. |
| 196 |
.SH BUGS |
| 197 |
Please report bugs to the ReiserFS developers <[email protected]>, providing |
| 198 |
as much information as possible--your hardware, kernel, patches, settings, all printed |
| 199 |
messages, the logfile; check the syslog file for any related information. |
| 200 |
.SH TODO |
| 201 |
Faster recovering, signal handling. |
| 202 |
.SH SEE ALSO |
| 203 |
.BR mkreiserfs (8), |
| 204 |
.BR reiserfstune (8) |
| 205 |
.BR resize_reiserfs (8), |
| 206 |
.BR debugreiserfs (8), |