From: Duncan <1i5t5.duncan@cox.net>
To: linux-btrfs@vger.kernel.org
Subject: Re: Can I drop/reset files with corrupted data if they are in a read only snapshot?
Date: Sun, 9 Jul 2017 11:38:51 +0000 (UTC) [thread overview]
Message-ID: <pan$de201$b4e6d9dd$ac883479$6ac66e5b@cox.net> (raw)
In-Reply-To: 20170709053228.donh2nh75idlzfck@merlins.org
Marc MERLIN posted on Sat, 08 Jul 2017 22:32:28 -0700 as excerpted:
> Second, ok, after a 24H scrub (yes, it's long and slow), I know which
> filenames have issues. Problem is that they are inside a read only btrfs
> snapshot. I cannot delete this snapshot because if I do so, I will
> destroy a btrfs send/receive relationship that will take 2 + 1 day to
> recreate (2 filesystems both have 2 files to delete each).
> How can I force delete the file anyway, or reset the checksum and accept
> that the file is corrupted, but not care?
> (I've deleted it and the next btrfs send/receive will free the blocks
> anyway)
At your own risk you can try using btrfs property to set the ro snapshot
to rw. Then you can delete the corrupted files and reset the snapshot
back to ro.
Of course you'll need to do the same thing on both the send and receive
side in ordered to keep the two reference snapshots in sync.
However, because my use-case doesn't involve send/receive, I've not been
able to personally verify that the above procedure doesn't screw up an
incremental send/receive job using that modified snapshot as a
reference. There has been one report on the list of someone who did the
property toggle thing at my cautious suggestion and he said it didn't
screw up the send/receive reference for him, but one case of working is
not enough for me to be comfortable saying it's known to work just fine,
thus the at your own risk caveat.
(Trying a send both to you and to list this time...)
--
Duncan - List replies preferred. No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master." Richard Stallman
next prev parent reply other threads:[~2017-07-09 11:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-09 5:32 Can I drop/reset files with corrupted data if they are in a read only snapshot? Marc MERLIN
2017-07-09 11:38 ` Duncan [this message]
2017-07-10 6:59 ` Marc MERLIN
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='pan$de201$b4e6d9dd$ac883479$6ac66e5b@cox.net' \
--to=1i5t5.duncan@cox.net \
--cc=linux-btrfs@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).