1REISERFSCK(8) System Manager's Manual REISERFSCK(8)
2
3
4
6 reiserfsck - The checking tool for the ReiserFS filesystem.
7
9 reiserfsck [ -afprVy ] [ --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 ] [ -S | --scan-whole-
13 partition ] [ --no-journal-available ] device
14
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
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 -V This option prints the reiserfsprogs version and then exit.
121
122 -r, -f These options are not yet operational and therefore are ignored.
123
125 DO NOT USE THESE OPTIONS UNLESS YOU KNOW WHAT YOU ARE DOING. WE ARE
126 NOT RESPONSIBLE IF YOU LOSE DATA AS A RESULT OF THESE OPTIONS.
127
128 --no-journal-available
129 This option allows reiserfsck to proceed when the journal device
130 is not available. This option has no effect when the journal is
131 located on the main data device. NOTE: after this operation you
132 must use reiserfstune to specify a new journal device.
133
134 --scan-whole-partition, -S
135 This option causes --rebuild-tree to scan the whole partition
136 but not only the used space on the partition.
137
139 1. You think something may be wrong with a reiserfs partition on
140 /dev/hda1 or you would just like to perform a periodic disk check.
141
142 2. Run reiserfsck --check --logfile check.log /dev/hda1. If reiserfsck
143 --check exits with status 0 it means no errors were discovered.
144
145 3. If reiserfsck --check exits with status 1 (and reports about fixable
146 corruptions) it means that you should run reiserfsck --fix-fixable
147 --logfile fixable.log /dev/hda1.
148
149 4. If reiserfsck --check exits with status 2 (and reports about fatal
150 corruptions) it means that you need to run reiserfsck --rebuild-tree.
151 If reiserfsck --check fails in some way you should also run reiserfsck
152 --rebuild-tree, but we also encourage you to submit this as a bug
153 report.
154
155 5. Before running reiserfsck --rebuild-tree, please make a backup of
156 the whole partition before proceeding. Then run reiserfsck --rebuild-
157 tree --logfile rebuild.log /dev/hda1.
158
159 6. If the reiserfsck --rebuild-tree step fails or does not recover what
160 you expected, please submit this as a bug report. Try to provide as
161 much information as possible including your platform and Linux kernel
162 version. We will try to help solve the problem.
163
165 reiserfsck uses the following exit codes:
166 0 - No errors.
167 1 - File system errors corrected.
168 2 - Reboot is needed.
169 4 - File system fatal errors left uncorrected,
170 reiserfsck --rebuild-tree needs to be launched.
171 6 - File system fixable errors left uncorrected,
172 reiserfsck --fix-fixable needs to be launched.
173 8 - Operational error.
174 16 - Usage or syntax error.
175
177 This version of reiserfsck has been written by Vitaly Fertman
178 <vitaly@namesys.com>.
179
181 Please report bugs to the ReiserFS developers <reiserfs-
182 dev@namesys.com>, providing as much information as possible--your hard‐
183 ware, kernel, patches, settings, all printed messages, the logfile;
184 check the syslog file for any related information.
185
187 Faster recovering, signal handling.
188
190 mkreiserfs(8), reiserfstune(8) resize_reiserfs(8), debugreiserfs(8),
191
192
193
194Reiserfsprogs-3.6.19 February 2004 REISERFSCK(8)