REISERFSCK(8)
π NAME π
okay so <rainbow>reiserfsck</rainbow> β that's this page, REISERFSCK(8), section 8, system manager territory π
β is the checking tool for the ReiserFS filesystem. like, the one you call when your reiserfs partition is acting sus and you need a diagnosis. no cap.
β¨ SYNOPSIS β¨
reiserfsck [ -aprVy ] [ --rebuild-sb | --check | --fix-fixable |
--rebuild-tree | --clean-attributes ] [ -j | --journal device ] [ -z |
--adjust-size ] [ -n | --nolog ] [ -B | --badblocks file ] [ -l |
--logfile file ] [ -q | --quiet ] [ -y | --yes ] [ -f | --force ] [ -S |
--scan-whole-partition ] [ --no-journal-available ] device
π DESCRIPTION π
So what does reiserfsck actually do, bestie? It searches for a Reiserfs filesystem on a device, replays any necessary transactions, and then either checks or repairs the file system. that's the whole vibe. diagnosis first, glow-up second π₯
deviceβ this is the special file that corresponds to a device or to a partition (for example/dev/hdXXfor an IDE disk partition, or/dev/sdXXfor a SCSI disk partition). yes queen, you gotta tell it where the filesystem lives.
πΈ OPTIONS πΈ
--rebuild-sbβ this one recovers the superblock on a Reiserfs partition. Normally you only need it ifmountis out here reporting"read_super_block: can't find a reiserfs file system"and you are sure a Reiserfs file system is actually there. But β οΈ remember: if you've used some partition editor program and now you can't find a filesystem, something probably went wrong while repartitioning and the start of the partition has been changed. If that's the case, instead of rebuilding the superblock on a wrong place, you should find the correct start of the partition first. like, get your facts straight before you rebuild, periodt.--checkβ this is the default action. It checks filesystem consistency and reports, but does not repair any corruption it finds. cute lil reporter, not a fixer. this option may be used on a read-only file system mount π«Ά--fix-fixableβ recovers certain kinds of corruption that don't require rebuilding the entire file system tree (--rebuild-tree). Normally you only need this if--checkreports"corruption that can be fixed with --fix-fixable". what counts as fixable, you ask? this includes:- zeroing invalid data-block pointers,
- correcting
st_sizeandst_blocksfor directories, - and deleting invalid directory entries.
it's giving "small oopsies only" π
--rebuild-treeβ this rebuilds the entire filesystem tree using leaf nodes found on the device. Normally you only need it ifreiserfsck --checkreports"Running with --rebuild-tree is required". You are strongly encouraged to make a backup copy of the whole partition before attempting the--rebuild-treeoption. And listen: oncereiserfsck --rebuild-treeis started it must finish its work (and you should not interrupt it), otherwise the filesystem will be left in the unmountable state to avoid subsequent data corruptions. no take-backs, no ctrl-c, no "oops". this is the main character option and it does not do side quests π--clean-attributesβ cleans reserved fields of Stat-Data items. lore time π§: there were days when there were no extended attributes in reiserfs. when they were implemented, old partitions needed to be cleaned first β the reiserfs code in the kernel did not care about not-used fields in its structures. so if you've used one of the old (pre-attributes) kernels with a ReiserFS filesystem and you want to use extended attributes there, you should clean the filesystem first. glow-up your old partition bestie π--journal device,-j deviceβ supplies the device name of the current file system journal. This option is required when the journal resides on a separate device from the main data device (although it can be avoided with the expert option--no-journal-available). iykyk π¦--adjust-size,-zβ causesreiserfsckto correct file sizes that are larger than the offset of the last discovered byte. This implies that holes at the end of a file will be removed. File sizes that are smaller than the offset of the last discovered byte are corrected by--fix-fixable. so this one trims, the other one pads. teamwork π--badblocks file,-B fileβ sets the badblock list to be the list of blocks specified in the givenfile. The filesystem badblock list is cleared before the new list is added. It can be used with--fix-fixableto fix the list of badblocks (seedebugreiserfs -B). If the device has bad blocks, every time it must be given with the--rebuild-treeoption. every. single. time. no exceptions π--logfile file,-l fileβ causesreiserfsckto report any corruption it finds to the specified log file rather than tostderr. receipts, but make them a file π--nolog,-nβ preventsreiserfsckfrom reporting any kinds of corruption. silence is golden, apparently π--quiet,-qβ preventsreiserfsckfrom reporting its rate of progress. it's still working, it's just not narrating.--yes,-yβ inhibitsreiserfsckfrom asking you for confirmation after telling you what it is going to do. It will assume you confirm. For safety, it does not work with the--rebuild-treeoption. yeah bestie, the big scary one still wants you to actually say yes π-a,-pβ these options are usually passed byfsck -Aduring the automatic checking of those partitions listed in/etc/fstab. They causereiserfsckto print some information about the specified filesystem, to check if error flags in the superblock are set, and to do some light-weight checks. If these checks reveal a corruption, or the flag indicating a (possibly fixable) corruption is found set in the superblock, thenreiserfsckswitches to thefix-fixablemode. If the flag indicating a fatal corruption is found set in the superblock, thenreiserfsckfinishes with an error. so it's basically the automatic-bootup bouncer πͺ--force,-fβ force checking even if the file system seems clean. sometimes you just know π-Vβ prints thereiserfsprogsversion and then exits. tiny little flex, then she's gone π-rβ this option does nothing at all; it is provided only for backwards compatibility. iconically useless, we respect her for it π
π₯ EXPERT OPTIONS π₯
DO NOT USE THESE OPTIONS UNLESS YOU KNOW WHAT YOU ARE DOING. WE ARE NOT RESPONSIBLE IF YOU LOSE DATA AS A RESULT OF THESE OPTIONS.
like. bestie. i am holding your hand when i say this. these are not for a casual tuesday π
--no-journal-availableβ allowsreiserfsckto proceed when the journal device is not available. This option has no effect when the journal is located on the main data device. NOTE: after this operation you must usereiserfstuneto specify a new journal device. mandatory follow-up, no skipping π«Ά--scan-whole-partition,-Sβ causes--rebuild-treeto scan the whole partition, but not only the used space on the partition. thorough queen π
π AN EXAMPLE OF USING reiserfsck π
- You think something may be wrong with a reiserfs partition on
/dev/hda1, or you would just like to perform a periodic disk check. (self-care checkup β¨) - Run
reiserfsck --check --logfile check.log /dev/hda1. Ifreiserfsck --checkexits with status0it means no errors were discovered. slay. - If
reiserfsck --checkexits with status1(and reports about fixable corruptions) it means that you should runreiserfsck --fix-fixable --logfile fixable.log /dev/hda1. - If
reiserfsck --checkexits with status2(and reports about fatal corruptions) it means that you need to runreiserfsck --rebuild-tree. Ifreiserfsck --checkfails in some way you should also runreiserfsck --rebuild-tree, but we also encourage you to submit this as a bug report. - Before running
reiserfsck --rebuild-tree, please make a backup of the whole partition before proceeding. Then runreiserfsck --rebuild-tree --logfile rebuild.log /dev/hda1. backup first, always, no cap π - If the
reiserfsck --rebuild-treestep fails or does not recover what you expected, please submit this as a bug report. Try to provide as much information as possible including your platform and Linux kernel version. We will try to help solve the problem. π«Ά
π EXIT CODES π
reiserfsck uses the following exit codes:
0β No errors.1β File system errors corrected.2β Reboot is needed.4β File system fatal errors left uncorrected,reiserfsck --rebuild-treeneeds to be launched.6β File system fixable errors left uncorrected,reiserfsck --fix-fixableneeds to be launched.8β Operational error.16β Usage or syntax error.
π AUTHOR π
This version of reiserfsck has been written by Vitaly Fertman <vitaly@namesys.com>. thank you for your service π«‘π
π BUGS π
Please report bugs to the ReiserFS developers <reiserfs-devel@vger.kernel.org>, providing as much information as possible β your hardware, kernel, patches, settings, all printed messages, the logfile; check the syslog file for any related information. give them the whole story bestie, not just the vibes πΈ
β TODO β
- Faster recovering
- signal handling
manifesting it for them β¨
π¦ SEE ALSO π¦
mkreiserfs(8), reiserfstune(8) resize_reiserfs(8), debugreiserfs(8),
okay that's the whole page!! this came from Reiserfsprogs-3.6.27, dated January 2009, and honestly she's still iconic π now go back up your partition before you touch --rebuild-tree, i am literally begging you ππ
π¦ where this page comes from
- debian bookworm: reiserfsprogs 1:3.6.27-4
- debian trixie: reiserfsprogs 1:3.6.27-9 Β· GPL-2.0-only
- ubuntu jammy: reiserfsprogs 1:3.6.27-4build4
- ubuntu noble: reiserfsprogs 1:3.6.27-7.1build1 Β· GPL-2.0-only
- ubuntu questing: reiserfsprogs 1:3.6.27-9
- Copyright 1996-2004 Hans Reiser
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms