* How to ensure that a snapshot is not corrupted?
@ 2018-08-10 10:07 Cerem Cem ASLAN
2018-08-14 23:33 ` Hans van Kranenburg
2018-08-15 11:35 ` Austin S. Hemmelgarn
0 siblings, 2 replies; 3+ messages in thread
From: Cerem Cem ASLAN @ 2018-08-10 10:07 UTC (permalink / raw)
To: Btrfs BTRFS
Original question is here: https://superuser.com/questions/1347843
How can we sure that a readonly snapshot is not corrupted due to a disk failure?
Is the only way calculating the checksums one on another and store it
for further examination, or does BTRFS handle that on its own?
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: How to ensure that a snapshot is not corrupted?
2018-08-10 10:07 How to ensure that a snapshot is not corrupted? Cerem Cem ASLAN
@ 2018-08-14 23:33 ` Hans van Kranenburg
2018-08-15 11:35 ` Austin S. Hemmelgarn
1 sibling, 0 replies; 3+ messages in thread
From: Hans van Kranenburg @ 2018-08-14 23:33 UTC (permalink / raw)
To: Cerem Cem ASLAN, Btrfs BTRFS
On 08/10/2018 12:07 PM, Cerem Cem ASLAN wrote:
> Original question is here: https://superuser.com/questions/1347843
>
> How can we sure that a readonly snapshot is not corrupted due to a disk failure?
>
> Is the only way calculating the checksums one on another and store it
> for further examination, or does BTRFS handle that on its own?
It's no different than any other data stored in your filesystem.
So when just reading things from the snapshot, or when using the btrfs
scrub functionality, it will tell you if data that is read back matches
the checksums.
--
Hans van Kranenburg
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: How to ensure that a snapshot is not corrupted?
2018-08-10 10:07 How to ensure that a snapshot is not corrupted? Cerem Cem ASLAN
2018-08-14 23:33 ` Hans van Kranenburg
@ 2018-08-15 11:35 ` Austin S. Hemmelgarn
1 sibling, 0 replies; 3+ messages in thread
From: Austin S. Hemmelgarn @ 2018-08-15 11:35 UTC (permalink / raw)
To: Cerem Cem ASLAN, Btrfs BTRFS
On 2018-08-10 06:07, Cerem Cem ASLAN wrote:
> Original question is here: https://superuser.com/questions/1347843
>
> How can we sure that a readonly snapshot is not corrupted due to a disk failure?
>
> Is the only way calculating the checksums one on another and store it
> for further examination, or does BTRFS handle that on its own?
>
I've posted an answer for the linked question on SuperUser, under the
assumption that it will be more visible to people simply searching for
it there than it would be on the ML.
Here's the text of the answer though so people here can see it too:
There are two possible answers depending on what you mean by 'corrupted
by a disk failure'.
### If you mean simple at-rest data corruption
BTRFS handles this itself, transparently to the user. It checksums
everything, including data in snapshots, internally and then verifies
the checksums as it reads each block. There are a couple of exceptions
to this though:
* If the volume is mounted with the `nodatasum` or `nodatacow` options,
you will have no checksumming of data blocks. In most cases, you should
not be mounting with these options, so this should not e an issue.
* Any files for which the `NOCOW` attribute is set (`C` in the output of
the `lsattr` command) are also not checked. You're not likely to have
any truly important files with this attribute set (systemd journal files
have it set, but that's about it unless you set it manually).
### If you mean non-trivial destruction of data on the volume because of
loss of too many devices
You can't protect against this except by having another copy of the data
somewhere. Pretty much, if you've lost more devices than however many
the storage profiles for the volume can tolerate, your data is gone, and
nothing is going to get it back for you short of restoring from a backup.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-08-15 14:27 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-10 10:07 How to ensure that a snapshot is not corrupted? Cerem Cem ASLAN
2018-08-14 23:33 ` Hans van Kranenburg
2018-08-15 11:35 ` Austin S. Hemmelgarn
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).