* How to map extents to files
@ 2016-06-02 3:06 Nikolaus Rath
2016-06-02 4:01 ` Qu Wenruo
2016-06-10 3:03 ` Nikolaus Rath
0 siblings, 2 replies; 7+ messages in thread
From: Nikolaus Rath @ 2016-06-02 3:06 UTC (permalink / raw)
To: linux-btrfs
Hello,
For one of my btrfs volumes, btrfsck reports a lot of the following
warnings:
[...]
checking extents
bad extent [138477568, 138510336), type mismatch with chunk
bad extent [140091392, 140148736), type mismatch with chunk
bad extent [140148736, 140201984), type mismatch with chunk
bad extent [140836864, 140865536), type mismatch with chunk
[...]
Is there a way to discover which files are affected by this (in
particular so that I can take a look at them before and after a btrfsck
--repair)?
Best,
-Nikolaus
--
GPG encrypted emails preferred. Key id: 0xD113FCAC3C4E599F
Fingerprint: ED31 791B 2C5C 1613 AF38 8B8A D113 FCAC 3C4E 599F
»Time flies like an arrow, fruit flies like a Banana.«
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: How to map extents to files 2016-06-02 3:06 How to map extents to files Nikolaus Rath @ 2016-06-02 4:01 ` Qu Wenruo 2016-06-02 14:56 ` Nikolaus Rath 2016-06-10 3:03 ` Nikolaus Rath 1 sibling, 1 reply; 7+ messages in thread From: Qu Wenruo @ 2016-06-02 4:01 UTC (permalink / raw) To: Nikolaus Rath, linux-btrfs At 06/02/2016 11:06 AM, Nikolaus Rath wrote: > Hello, > > For one of my btrfs volumes, btrfsck reports a lot of the following > warnings: > > [...] > checking extents > bad extent [138477568, 138510336), type mismatch with chunk > bad extent [140091392, 140148736), type mismatch with chunk > bad extent [140148736, 140201984), type mismatch with chunk > bad extent [140836864, 140865536), type mismatch with chunk > [...] > > Is there a way to discover which files are affected by this (in > particular so that I can take a look at them before and after a btrfsck > --repair)? > > > Best, > -Nikolaus > Which version is the progs? If the fs is not converted from ext2/3/4, it may be a false alert. Thanks, Qu ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: How to map extents to files 2016-06-02 4:01 ` Qu Wenruo @ 2016-06-02 14:56 ` Nikolaus Rath 2016-06-10 8:17 ` Qu Wenruo 0 siblings, 1 reply; 7+ messages in thread From: Nikolaus Rath @ 2016-06-02 14:56 UTC (permalink / raw) To: Qu Wenruo; +Cc: linux-btrfs On Jun 02 2016, Qu Wenruo <quwenruo@cn.fujitsu.com> wrote: > At 06/02/2016 11:06 AM, Nikolaus Rath wrote: >> Hello, >> >> For one of my btrfs volumes, btrfsck reports a lot of the following >> warnings: >> >> [...] >> checking extents >> bad extent [138477568, 138510336), type mismatch with chunk >> bad extent [140091392, 140148736), type mismatch with chunk >> bad extent [140148736, 140201984), type mismatch with chunk >> bad extent [140836864, 140865536), type mismatch with chunk >> [...] >> >> Is there a way to discover which files are affected by this (in >> particular so that I can take a look at them before and after a btrfsck >> --repair)? > > Which version is the progs? If the fs is not converted from ext2/3/4, > it may be a false alert. Version is 4.4.1. The fs may very well have been converted from ext4, but I can't tell for sure. Best, -Nikolaus -- GPG encrypted emails preferred. Key id: 0xD113FCAC3C4E599F Fingerprint: ED31 791B 2C5C 1613 AF38 8B8A D113 FCAC 3C4E 599F »Time flies like an arrow, fruit flies like a Banana.« ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: How to map extents to files 2016-06-02 14:56 ` Nikolaus Rath @ 2016-06-10 8:17 ` Qu Wenruo 2016-06-10 15:38 ` Henk Slager 2016-06-14 15:04 ` Nikolaus Rath 0 siblings, 2 replies; 7+ messages in thread From: Qu Wenruo @ 2016-06-10 8:17 UTC (permalink / raw) To: Nikolaus Rath; +Cc: linux-btrfs At 06/02/2016 10:56 PM, Nikolaus Rath wrote: > On Jun 02 2016, Qu Wenruo <quwenruo@cn.fujitsu.com> wrote: >> At 06/02/2016 11:06 AM, Nikolaus Rath wrote: >>> Hello, >>> >>> For one of my btrfs volumes, btrfsck reports a lot of the following >>> warnings: >>> >>> [...] >>> checking extents >>> bad extent [138477568, 138510336), type mismatch with chunk >>> bad extent [140091392, 140148736), type mismatch with chunk >>> bad extent [140148736, 140201984), type mismatch with chunk >>> bad extent [140836864, 140865536), type mismatch with chunk >>> [...] >>> >>> Is there a way to discover which files are affected by this (in >>> particular so that I can take a look at them before and after a btrfsck >>> --repair)? >> >> Which version is the progs? If the fs is not converted from ext2/3/4, >> it may be a false alert. > > Version is 4.4.1. The fs may very well have been converted from ext4, > but I can't tell for sure. > > > Best, > -Nikolaus > Sorry for the late reply. For such case, btrfsck --repair is unable to fix it, as btrfs-progs is not able to balance extents. Normally, a full balance would fix it. I would try to update btrfs-progs to 4.5 and recheck, to see if it's a false alert. If not, then remove unused snapshots and then do the full balance. It's recommended to delete unused snapshots, as if there are too many snapshots, balance may be quite slow. Thanks, Qu ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: How to map extents to files 2016-06-10 8:17 ` Qu Wenruo @ 2016-06-10 15:38 ` Henk Slager 2016-06-14 15:04 ` Nikolaus Rath 1 sibling, 0 replies; 7+ messages in thread From: Henk Slager @ 2016-06-10 15:38 UTC (permalink / raw) To: Nikolaus Rath; +Cc: linux-btrfs, Qu Wenruo On Fri, Jun 10, 2016 at 10:17 AM, Qu Wenruo <quwenruo@cn.fujitsu.com> wrote: > > > At 06/02/2016 10:56 PM, Nikolaus Rath wrote: >> >> On Jun 02 2016, Qu Wenruo <quwenruo@cn.fujitsu.com> wrote: >>> >>> At 06/02/2016 11:06 AM, Nikolaus Rath wrote: >>>> >>>> Hello, >>>> >>>> For one of my btrfs volumes, btrfsck reports a lot of the following >>>> warnings: >>>> >>>> [...] >>>> checking extents >>>> bad extent [138477568, 138510336), type mismatch with chunk >>>> bad extent [140091392, 140148736), type mismatch with chunk >>>> bad extent [140148736, 140201984), type mismatch with chunk >>>> bad extent [140836864, 140865536), type mismatch with chunk >>>> [...] >>>> >>>> Is there a way to discover which files are affected by this (in >>>> particular so that I can take a look at them before and after a btrfsck >>>> --repair)? >>> >>> >>> Which version is the progs? If the fs is not converted from ext2/3/4, >>> it may be a false alert. >> >> >> Version is 4.4.1. The fs may very well have been converted from ext4, >> but I can't tell for sure. >> >> >> Best, >> -Nikolaus >> > > Sorry for the late reply. > > For such case, btrfsck --repair is unable to fix it, as btrfs-progs is not > able to balance extents. > > Normally, a full balance would fix it. > > > I would try to update btrfs-progs to 4.5 and recheck, to see if it's a false > alert. > If not, then remove unused snapshots and then do the full balance. > > It's recommended to delete unused snapshots, as if there are too many > snapshots, balance may be quite slow. You might want to try to balance only the ranges that are problematic if a recent kernel+tools still report this bad extents. AFAIK, in the 'bad extent [X, Y), type mismatch with chunk' text, the X and Y are logical byte numbers (virtual addresses). You can list all chunks with this: https://github.com/knorrie/btrfs-heatmap/blob/master/show_usage.py To force balance of this [X, Y) range, run btrfs balance start -v -dvrange=X..Y <mountpoint> or -mvrange or -svrange if [X, Y) is in a metadata resp. system chunk. The btrfs-debugfs python script in the git://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git sources might also help, but it does not list system and metadata chunks. After such a filtered balance, you should see at least one new chunk added (just see the highest virtual addr) In case the [X, Y) are physical, have a look at the man btrfs-balance drange filter. I currently don't know an answer to your post subject, but maybe less important as [X, Y) might also be not file contents related. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: How to map extents to files 2016-06-10 8:17 ` Qu Wenruo 2016-06-10 15:38 ` Henk Slager @ 2016-06-14 15:04 ` Nikolaus Rath 1 sibling, 0 replies; 7+ messages in thread From: Nikolaus Rath @ 2016-06-14 15:04 UTC (permalink / raw) To: Qu Wenruo; +Cc: linux-btrfs On Jun 10 2016, Qu Wenruo <quwenruo@cn.fujitsu.com> wrote: > At 06/02/2016 10:56 PM, Nikolaus Rath wrote: >> On Jun 02 2016, Qu Wenruo <quwenruo@cn.fujitsu.com> wrote: >>> At 06/02/2016 11:06 AM, Nikolaus Rath wrote: >>>> Hello, >>>> >>>> For one of my btrfs volumes, btrfsck reports a lot of the following >>>> warnings: >>>> >>>> [...] >>>> checking extents >>>> bad extent [138477568, 138510336), type mismatch with chunk >>>> bad extent [140091392, 140148736), type mismatch with chunk >>>> bad extent [140148736, 140201984), type mismatch with chunk >>>> bad extent [140836864, 140865536), type mismatch with chunk >>>> [...] >>>> >>>> Is there a way to discover which files are affected by this (in >>>> particular so that I can take a look at them before and after a btrfsck >>>> --repair)? >>> >>> Which version is the progs? If the fs is not converted from ext2/3/4, >>> it may be a false alert. >> >> Version is 4.4.1. The fs may very well have been converted from ext4, >> but I can't tell for sure. > > For such case, btrfsck --repair is unable to fix it, as btrfs-progs is > not able to balance extents. > > Normally, a full balance would fix it. > > > I would try to update btrfs-progs to 4.5 and recheck, to see if it's a > false alert. > If not, then remove unused snapshots and then do the full balance. Newest btrfs-progs reported the same error, and a full balance fixed it. Thank you! Best, Nikolaus -- GPG encrypted emails preferred. Key id: 0xD113FCAC3C4E599F Fingerprint: ED31 791B 2C5C 1613 AF38 8B8A D113 FCAC 3C4E 599F »Time flies like an arrow, fruit flies like a Banana.« ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: How to map extents to files 2016-06-02 3:06 How to map extents to files Nikolaus Rath 2016-06-02 4:01 ` Qu Wenruo @ 2016-06-10 3:03 ` Nikolaus Rath 1 sibling, 0 replies; 7+ messages in thread From: Nikolaus Rath @ 2016-06-10 3:03 UTC (permalink / raw) To: linux-btrfs On Jun 01 2016, Nikolaus Rath <Nikolaus@rath.org> wrote: > Hello, > > For one of my btrfs volumes, btrfsck reports a lot of the following > warnings: > > [...] > checking extents > bad extent [138477568, 138510336), type mismatch with chunk > bad extent [140091392, 140148736), type mismatch with chunk > bad extent [140148736, 140201984), type mismatch with chunk > bad extent [140836864, 140865536), type mismatch with chunk > [...] > > Is there a way to discover which files are affected by this (in > particular so that I can take a look at them before and after a btrfsck > --repair)? Hmm. Anyone? Is there really no way to figure out what might be affected if I attempt a repair? Best, -Nikolaus -- GPG encrypted emails preferred. Key id: 0xD113FCAC3C4E599F Fingerprint: ED31 791B 2C5C 1613 AF38 8B8A D113 FCAC 3C4E 599F »Time flies like an arrow, fruit flies like a Banana.« ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2016-06-14 15:04 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2016-06-02 3:06 How to map extents to files Nikolaus Rath 2016-06-02 4:01 ` Qu Wenruo 2016-06-02 14:56 ` Nikolaus Rath 2016-06-10 8:17 ` Qu Wenruo 2016-06-10 15:38 ` Henk Slager 2016-06-14 15:04 ` Nikolaus Rath 2016-06-10 3:03 ` Nikolaus Rath
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).