Re: scrub backing device
From: ching <hidden>
Date: 2016-05-12 10:25:35
it may be a mess that if there is 2 btrfs partition (1 via bcache, 1 via dm) with same UUID appear at the same time. https://btrfs.wiki.kernel.org/index.php/Gotchas Currently, i think removing cache device would be simpler. On May 12, 2016 7:57:48 AM GMT+08:00, Marc MERLIN [off-list ref] wrote:
On Thu, May 12, 2016 at 07:34:26AM +0800, ching wrote:quoted
for examplehttps://btrfs.wiki.kernel.org/index.php/Manpage/btrfs-scrub btrfs scrub is designed to make sure all the blocks and checksums are consistent. Ching makes a good point that it would be helpful to have a way to access the underlying backing device directly to ensure it is consistent. I think currently you can use dmsetup with an offset to get the real filesystem past the bcache header, mount that read only somewhere and scrub that. Not ideal because scrub will not be able to fix issues that are fixable, but at least it should report errors. Would that work? Marcquoted
On May 12, 2016 3:13:22 AM GMT+08:00, Eric Wheeler[off-list ref] wrote:quoted
quoted
On Wed, 11 May 2016, ching lu wrote:quoted
The read cache prevent the program to scrub the backing devicedirectly.quoted
if a few bits flipped in the backing device, the cache may still return healthy data for a while. Must i remove cache device before scrubbing?What do you mean by scrub? -- Eric Wheelerquoted
On Wed, May 11, 2016 at 9:15 AM, Eric Wheeler[off-list ref] wrote:quoted
quoted
On Fri, 29 Apr 2016, ching lu wrote:quoted
Hello, i want to develop a script to perform data scrubbingperiodically.quoted
quoted
quoted
quoted
I think you want to set dirty_percent to 0 andcache_mode=writethrough.quoted
quoted
Then wait a long time for dirty_percent to actually reach 0. -- Eric Wheelerquoted
For my use case, i think it is meaningless to scrub cacheddata.quoted
quoted
quoted
quoted
quoted
If i change the cache mode to "none", will it turn off the readcache too?quoted
quoted
quoted
Furthermore, will this invalidate cached data? (i do not wanttoquoted
quoted
"warmquoted
quoted
quoted
up" the cache again after the scrubbing) Thanks in advance, c -- To unsubscribe from this list: send the line "unsubscribelinux-bcache" inquoted
quoted
quoted
the body of a message to majordomo@vger.kernel.org More majordomo info athttp://vger.kernel.org/majordomo-info.htmlquoted
quoted
quoted
quoted
quoted
-- To unsubscribe from this list: send the line "unsubscribelinux-bcache" inquoted
the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html-- To unsubscribe from this list: send the line "unsubscribelinux-bcache" inquoted
the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html