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/hdXX for an IDE disk partition, or /dev/sdXX for 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 if mount is 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 --check reports "corruption that can be fixed with --fix-fixable". what counts as fixable, you ask? this includes:
    • zeroing invalid data-block pointers,
    • correcting st_size and st_blocks for 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 if reiserfsck --check reports "Running with --rebuild-tree is required". You are strongly encouraged to make a backup copy of the whole partition before attempting the --rebuild-tree option. And listen: once reiserfsck --rebuild-tree is 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 β€” causes reiserfsck to 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 given file. The filesystem badblock list is cleared before the new list is added. It can be used with --fix-fixable to fix the list of badblocks (see debugreiserfs -B). If the device has bad blocks, every time it must be given with the --rebuild-tree option. every. single. time. no exceptions πŸ™ˆ
  • --logfile file, -l file β€” causes reiserfsck to report any corruption it finds to the specified log file rather than to stderr. receipts, but make them a file πŸ“
  • --nolog, -n β€” prevents reiserfsck from reporting any kinds of corruption. silence is golden, apparently πŸ’€
  • --quiet, -q β€” prevents reiserfsck from reporting its rate of progress. it's still working, it's just not narrating.
  • --yes, -y β€” inhibits reiserfsck from 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-tree option. yeah bestie, the big scary one still wants you to actually say yes 😌
  • -a, -p β€” these options are usually passed by fsck -A during the automatic checking of those partitions listed in /etc/fstab. They cause reiserfsck to 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, then reiserfsck switches to the fix-fixable mode. If the flag indicating a fatal corruption is found set in the superblock, then reiserfsck finishes 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 the reiserfsprogs version 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 β€” allows reiserfsck to 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 use reiserfstune to specify a new journal device. mandatory follow-up, no skipping 🫢
  • --scan-whole-partition, -S β€” causes --rebuild-tree to scan the whole partition, but not only the used space on the partition. thorough queen 🌈

🌟 AN EXAMPLE OF USING reiserfsck 🌟

  1. 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 ✨)
  2. Run reiserfsck --check --logfile check.log /dev/hda1. If reiserfsck --check exits with status 0 it means no errors were discovered. slay.
  3. If reiserfsck --check exits with status 1 (and reports about fixable corruptions) it means that you should run reiserfsck --fix-fixable --logfile fixable.log /dev/hda1.
  4. If reiserfsck --check exits with status 2 (and reports about fatal corruptions) it means that you need to run reiserfsck --rebuild-tree. If reiserfsck --check fails in some way you should also run reiserfsck --rebuild-tree, but we also encourage you to submit this as a bug report.
  5. Before running reiserfsck --rebuild-tree, please make a backup of the whole partition before proceeding. Then run reiserfsck --rebuild-tree --logfile rebuild.log /dev/hda1. backup first, always, no cap 😭
  6. If the reiserfsck --rebuild-tree step 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-tree needs to be launched.
  • 6 β€” File system fixable errors left uncorrected, reiserfsck --fix-fixable needs 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