On Thu, Dec 19, 2019 at 2:35 PM Martin Steigerwald <martin@xxxxxxxxxxxx> wrote: > > Hi Ralf. > > Ralf Zerres - 19.12.19, 21:00:12 CET: > > at customer site i can't mount a given btrfs device in rw mode. > > this is production data and i do have a backup and managed to mount > > the filesystem in ro mode. I did copy out relevant stuff. Having said > > this, if btrfs --repair can't heal the situation, i could reformat > > the filesystem and start all over. But i would prefere to save the > > time and take the heeling as a proof of "production ready" status of > > btrfs-progs. > > > > Here are the details: > > > > kernel: 5.2.2 (Ubuntu 18.04.3) > > btrfs-progs: 5.2.1 > […] > > 4) As a forth step, i tried to repair it > > > > # btrfs check --mode lowmem --progress --repair /dev/<mydev> > > # enabling repair mode > > # WARNING: low-memory mode repair support is only partial > > # Opening filesystem to check... > > # Checking filesystem on /dev/<mydev> > > # UUID: <my UUID> > > # [1/7] checking root items (0:00:33 elapsed, > > 20853512 items checked) > > # Fixed 0 roots. > > # ERROR: extent[1988733435904, 134217728] referencer count mismatch > > (root: 261, owner: 286, offset: 5905580032) wanted: # 28, have: 34 > > # ERROR: fail to allocate new chunk No space left on device > > Maybe the filesystem check failed due to that error? > > Just guess work tough! > > You could try adding a device to the filesystem and then check again. It > could even be a good (!) USB stick. This way BTRFS would have some > additional space and maybe 'btrfs check' would complete. > > May or may not work, no idea. But I noticed that the check itself > mentioned an out of space condition so I thought I'd mention it. It's bogus. > # Free (estimated): 134.13GiB (min: 134.13GiB) I don't recommend adding another device until the problem is understood better. Hopefully a developer can respond. It might be helpful to upgrade to a 5.3 or 5.4 kernel, which has more consistency checks. If there's a call trace produced at mount or during runtime it might give a developer useful information. -- Chris Murphy
