User: Password:
|
|
Subscribe / Log in / New account

Checking only

Checking only

Posted Oct 12, 2011 12:20 UTC (Wed) by epa (subscriber, #39769)
Parent article: Whither btrfsck?

The primary purpose of fsck ('filesystem check') was to check the filesystem for consistency. Repairing it is an additional feature, inherently dangerous but sometimes a lifesaver when you don't have recent backups.

Why not release an fsck tool that checks only, without the repair functionality?

Coming up with dodgy heuristics to guess what a broken filesystem should look like is the sort of task ideally suited to community or bazaar development. It is then the user's choice to only use repair rules officially blessed by the btrfs maintainer (conservatively limiting the possible errors that can be repaired) or to throw caution to the winds and try anything.


(Log in to post comments)

Checking only

Posted Oct 12, 2011 21:01 UTC (Wed) by drag (subscriber, #31333) [Link]

I think that btrfs already has a fsck to check for consistency.

Also judging from the developer's comments it's not unknown bugs that bother him, but that there are data destroying bugs he knows about but hasn't fixed yet.

Although I agree that he should just get it out there for other interested parties to help him out.

Checking only

Posted Oct 21, 2011 3:56 UTC (Fri) by jd (guest, #26381) [Link]

Then clone him a few hundred times. What's the problem?

Checking only

Posted Oct 13, 2011 4:04 UTC (Thu) by Kissaki (guest, #61848) [Link]

I agree wholeheartedly. I would even prefer it if all fsck tools defaulted to read-only (or "check" only) with no command-line options, and required an explicit command-line option before making changes to the data on disk.

The argument against releasing the fsck tool seems to be that the tool they have may take the file-system that has detectable errors and add more detectable errors. I thought that went without saying. To go further, I don't see how you can produce a fsck tool that writes to disk and can promise otherwise.

fsck is for regular use, after N many mounts, after M many days, just to make sure that most of the pieces are there and they have generally the right color. Repairing filesystems is its hobby, not its job.

What kind of fsck?

Posted Oct 13, 2011 7:17 UTC (Thu) by cwillu (guest, #67268) [Link]

Part of the problem is that there's a whole variety of tools commonly referred to as "fsck". btrfs does have several of them publicly available, and has for some time:

* A readonly btrfsck which serves as a diagnostic tool, and has been distributed along with mkfs.btrfs and company for at least 2 years now.
* Online scrub in the kernel module to check all data and metadata against the checksums, which is also able to correct the bad data from redundant copies if available, and attempt to do the same from repeated reads if not. This has been around for about a year (9 months?).
* A extraction tool to recover files from an unmountable or otherwise damaged filesystem to other media, although it has a somewhat limited scope in what it can recover. This has been available in various forms for 6 months or so.

What we're waiting for is the tool that dives into the guts of a broken filesystem to make it mountable, without requiring independent storage nor deep understanding from its user. This is the tool that easily destroy what almost certainly would have been recoverable data (i.e. the offline extraction tool), and yet is also the tool that distros stick in the boot process on failure which circumspectly warns of the dangers and requires the user to take manual action, at which point the distros will helpfully dump the user at a shell prompt with a convenient "To proceed, run: fsck.btrfs -A --NO_DONT_THIS_WILL_EAT_YOUR_DATA" banner.

Incidentally, this confusion is why zfs gets away with the "no fsck required!" marketing: they have the full set of tools, they just don't call any of them "zfsck".

What kind of fsck?

Posted Oct 27, 2011 19:15 UTC (Thu) by oak (guest, #2786) [Link]

To proceed, type:
"Yes, I have taken a backup of this btrfs file system"
>
To proceed, type:
"Yes, I have verified that the backup data was saved correctly"
>
To proceed, type:
"Yes, I want to destroy my data so that this partition can be mounted"
>


Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds