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

Checking only

Checking only

Posted Oct 13, 2011 4:04 UTC (Thu) by Kissaki (guest, #61848)
In reply to: Checking only by epa
Parent article: Whither btrfsck?

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.


(Log in to post comments)

What kind of fsck?

Posted Oct 13, 2011 7:17 UTC (Thu) by cwillu (subscriber, #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 © 2018, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds