public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
From: "Chris Murphy" <lists@colorremedies.com>
To: "Pranshu Tanwar" <pranshu.tanwar@proton.me>,
	"Btrfs BTRFS" <linux-btrfs@vger.kernel.org>
Subject: Re: [help needed] parent verity error on HDD
Date: Tue, 08 Jul 2025 15:50:00 -0400	[thread overview]
Message-ID: <da43965b-d22c-405e-bac6-206b36e968be@app.fastmail.com> (raw)
In-Reply-To: <aNH6WIV_zJGBEaJfeLnCw0RqDLyn8O8OMUPMm-S34So8BWqu8xJP4iW8rfm3vGu6dDr8ibw2vt9EOaOfHIUgn5NxNQsuleebWRsBiyGOpYE=@proton.me>



On Tue, Jul 8, 2025, at 12:05 PM, Pranshu Tanwar wrote:
>> Copy files out with -o ro,rescue=all and reformat. The problem is probably the result of a drive firmware bug. Keep backups!
> It did not mount, I got the files with btrfs restore to work in a 
> snapshot of a shared snapshot to then restore the files. I am now 
> working on rebuilding the drive with safer mount options for both 
> drives.
>
> These are the options I came up with:
>
> /etc/udisks2/mount_options.conf
> ---
> [defaults]
> btrfs_allow=compress,compress-force,datacow,nodatacow,datasum,nodatasum,autodefrag,noautodefrag,degraded,device,discard,nodiscard,subvol,subvolid,space_cache,commit,noatime,flushoncommit,noflushoncommit,barrier,nobarrier
> btrfs_defaults=commit=1,noatime,compress=zstd,flushoncommit,barrier

I don't know how udisks2/mount_options.conf affects anything. It should have no effect on the root file system. Anyway, you really want to use either upstream default mount options or your distribution's default mount options. You will run into trouble much faster otherwise.

>
> /etc/udev/rules.d/99-disable-write-cache.rules
> ---
> ACTION=="add", SUBSYSTEM=="block", KERNEL=="sd[a-z]", 
> ENV{ID_USB_DRIVER}=="usb-storage", RUN+="/sbin/hdparm -W0 /dev/%k"
>
> But turning write caching off in hdparm is painfully slow, so for now 
> I've commented it out, relying solely on flushoncommit and commit=1

I don't think you'll be happy with the performance of commit=1 , it's too frequent. If there's a firmware bug resulting in flush or FUA transiently being ignored, then decreasing the commit interval just makes it more likely you'll run into a problem.

In my opinion the solution is frequent backups. Btrfs snapshots and send-receive make this quite cheap to do often. But any backup solution that you understand and have tested restore is the one you should use.

Best to reply to the list so responses are archived and everyone can chime in if they want.


-- 
Chris Murphy

  parent reply	other threads:[~2025-07-08 19:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-04  5:59 [help needed] parent verity error on HDD PranshuTheGamer
2025-07-04 12:42 ` PranshuTheGamer
2025-07-04 15:58   ` PranshuTheGamer
2025-07-06  7:01 ` PranshuTheGamer
     [not found]   ` <1332fd28-ca5c-43d0-b815-c8da74c0a7b0@app.fastmail.com>
     [not found]     ` <aNH6WIV_zJGBEaJfeLnCw0RqDLyn8O8OMUPMm-S34So8BWqu8xJP4iW8rfm3vGu6dDr8ibw2vt9EOaOfHIUgn5NxNQsuleebWRsBiyGOpYE=@proton.me>
2025-07-08 19:50       ` Chris Murphy [this message]
2025-07-11  7:48         ` Pranshu Tanwar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=da43965b-d22c-405e-bac6-206b36e968be@app.fastmail.com \
    --to=lists@colorremedies.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=pranshu.tanwar@proton.me \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox