1REISERFSCK(8)               System Manager's Manual              REISERFSCK(8)
2
3
4

NAME

6       reiserfsck - The checking tool for the ReiserFS filesystem.
7

SYNOPSIS

9       reiserfsck  [  -aprVy  ]  [  --rebuild-sb  |  --check | --fix-fixable |
10       --rebuild-tree | --clean-attributes ] [ -j | --journal device ] [ -z  |
11       --adjust-size  ]  [  -n  |  --nolog  ] [ -B | --badblocks file ] [ -l |
12       --logfile file ] [ -q | --quiet ] [ -y | --yes ] [ -f | --force ] [  -S
13       | --scan-whole-partition ] [ --no-journal-available ] device
14

DESCRIPTION

16       Reiserfsck  searches for a Reiserfs filesystem on a device, replays any
17       necessary transactions, and either checks or repairs the file system.
18
19       device is the special file corresponding to a device or to a  partition
20              (e.g /dev/hdXX for an IDE disk partition or /dev/sdXX for a SCSI
21              disk partition).
22

OPTIONS

24       --rebuild-sb
25              This option recovers the superblock  on  a  Reiserfs  partition.
26              Normally   you   only   need   this   option  if  mount  reports
27              "read_super_block: can't find a reiserfs file  system"  and  you
28              are sure that a Reiserfs file system is there. But remember that
29              if you have used some partition editor program and now you  can‐
30              not  find  a filesystem, probably something has gone wrong while
31              repartitioning and the start of the partition has been  changed.
32              If  so,  instead  of rebuilding the super block on a wrong place
33              you should find the correct start of the partition first.
34
35       --check
36              This default action checks filesystem consistency  and  reports,
37              but  does  not  repair any corruption that it finds. This option
38              may be used on a read-only file system mount.
39
40       --fix-fixable
41              This option recovers certain kinds of  corruption  that  do  not
42              require rebuilding the entire file system tree (--rebuild-tree).
43              Normally you only need this option if the --check option reports
44              "corruption   that   can  be  fixed  with  --fix-fixable".  This
45              includes:  zeroing  invalid  data-block   pointers,   correcting
46              st_size  and  st_blocks  for  directories,  and deleting invalid
47              directory entries.
48
49       --rebuild-tree
50              This option rebuilds the entire filesystem tree using leaf nodes
51              found  on the device.  Normally you only need this option if the
52              reiserfsck  --check  reports  "Running  with  --rebuild-tree  is
53              required".  You are strongly encouraged to make a backup copy of
54              the whole partition before attempting the --rebuild-tree option.
55              Once  reiserfsck  --rebuild-tree  is  started it must finish its
56              work (and you should not interrupt it), otherwise the filesystem
57              will  be  left in the unmountable state to avoid subsequent data
58              corruptions.
59
60       --clean-attributes
61              This option cleans reserved fields  of  Stat-Data  items.  There
62              were  days  when  there were no extended attributes in reiserfs.
63              When they were implemented old partitions needed to  be  cleaned
64              first -- reiserfs code in the kernel did not care about not used
65              fields in its strutures. Thus if you have used one  of  the  old
66              (pre-attrbutes)  kernels with a ReiserFS filesystem and you want
67              to use extented attribues there, you should clean the filesystem
68              first.
69
70       --journal device , -j device
71              This  option supplies the device name of the current file system
72              journal.  This option is required when the journal resides on  a
73              separate  device  from  the main data device (although it can be
74              avoided with the expert option --no-journal-available).
75
76       --adjust-size, -z
77              This option causes reiserfsck to correct  file  sizes  that  are
78              larger  than  the  offset  of  the  last  discovered byte.  This
79              implies that holes at the end of a file will be  removed.   File
80              sizes  that  are  smaller than the offset of the last discovered
81              byte are corrected by --fix-fixable.
82
83       --badblocks file, -B  file
84              This option sets the badblock list to  be  the  list  of  blocks
85              specified  in  the given `file`. The filesystem badblock list is
86              cleared before the new list is added. It can be used with --fix-
87              fixable  to fix the list of badblocks (see debugreiserfs -B). If
88              the device has bad blocks, every time it must be given with  the
89              --rebuild-tree option.
90
91       --logfile file, -l  file
92              This  option causes reiserfsck to report any corruption it finds
93              to the specified log file rather than to stderr.
94
95       --nolog, -n
96              This option prevents reiserfsck from reporting any kinds of cor‐
97              ruption.
98
99       --quiet, -q
100              This  option  prevents  reiserfsck  from  reporting  its rate of
101              progress.
102
103       --yes, -y
104              This option inhibits reiserfsck from asking you for confirmation
105              after  telling  you  what  it is going to do. It will assuem you
106              confirm. For safety, it does not work  with  the  --rebuild-tree
107              option.
108
109       -a, -p These options are usually passed by fsck -A during the automatic
110              checking of those partitions listed in /etc/fstab. These options
111              cause  reiserfsck  to print some information about the specified
112              filesystem, to check if error flags in the  superblock  are  set
113              and  to  do  some  light-weight checks. If these checks reveal a
114              corruption or the flag indicating a (possibly  fixable)  corrup‐
115              tion is found set in the superblock, then reiserfsck switches to
116              the fix-fixable mode. If the flag indicating a fatal  corruption
117              is found set in the superblock, then reiserfsck finishes with an
118              error.
119
120       --force, -f
121              Force checking even if the file system seems clean.
122
123       -V     This option prints the reiserfsprogs version and then exit.
124
125       -r     This option does nothing at all; it is provided only  for  back‐
126              wards compatibility.
127

EXPERT OPTIONS

129       DO  NOT  USE  THESE OPTIONS UNLESS YOU KNOW WHAT YOU ARE DOING.  WE ARE
130       NOT RESPONSIBLE IF YOU LOSE DATA AS A RESULT OF THESE OPTIONS.
131
132       --no-journal-available
133              This option allows reiserfsck to proceed when the journal device
134              is  not available. This option has no effect when the journal is
135              located on the main data device. NOTE: after this operation  you
136              must use reiserfstune to specify a new journal device.
137
138       --scan-whole-partition, -S
139              This  option  causes  --rebuild-tree to scan the whole partition
140              but not only the used space on the partition.
141

AN EXAMPLE OF USING reiserfsck

143       1. You think something may  be  wrong  with  a  reiserfs  partition  on
144       /dev/hda1 or you would just like to perform a periodic disk check.
145
146       2.  Run reiserfsck --check --logfile check.log /dev/hda1. If reiserfsck
147       --check exits with status 0 it means no errors were discovered.
148
149       3. If reiserfsck --check exits with status 1 (and reports about fixable
150       corruptions)  it  means  that  you  should run reiserfsck --fix-fixable
151       --logfile fixable.log /dev/hda1.
152
153       4. If reiserfsck --check exits with status 2 (and reports  about  fatal
154       corruptions)  it  means that you need to run reiserfsck --rebuild-tree.
155       If reiserfsck --check fails in some way you should also run  reiserfsck
156       --rebuild-tree,  but  we  also  encourage  you  to submit this as a bug
157       report.
158
159       5. Before running reiserfsck --rebuild-tree, please make  a  backup  of
160       the  whole  partition before proceeding. Then run reiserfsck --rebuild-
161       tree --logfile rebuild.log /dev/hda1.
162
163       6. If the reiserfsck --rebuild-tree step fails or does not recover what
164       you  expected,  please  submit  this as a bug report. Try to provide as
165       much information as possible including your platform and  Linux  kernel
166       version. We will try to help solve the problem.
167

EXIT CODES

169       reiserfsck uses the following exit codes:
170          0 - No errors.
171          1 - File system errors corrected.
172          2 - Reboot is needed.
173          4 - File system fatal errors left uncorrected,
174              reiserfsck --rebuild-tree needs to be launched.
175          6 - File system fixable errors left uncorrected,
176              reiserfsck --fix-fixable needs to be launched.
177          8 - Operational error.
178          16 - Usage or syntax error.
179

AUTHOR

181       This   version  of  reiserfsck  has  been  written  by  Vitaly  Fertman
182       <vitaly@namesys.com>.
183

BUGS

185       Please report bugs to the ReiserFS developers <reiserfs-devel@vger.ker‐
186       nel.org>,  providing  as  much  information as possible--your hardware,
187       kernel, patches, settings, all printed messages, the logfile; check the
188       syslog file for any related information.
189

TODO

191       Faster recovering, signal handling.
192

SEE ALSO

194       mkreiserfs(8), reiserfstune(8) resize_reiserfs(8), debugreiserfs(8),
195
196
197
198Reiserfsprogs-3.6.25             January 2009                    REISERFSCK(8)
Impressum