On 2018年06月28日 22:17, Christoph Anton Mitterer wrote: > On Thu, 2018-06-28 at 22:09 +0800, Qu Wenruo wrote: >>> [ 72.168662] WARNING: CPU: 0 PID: 242 at /build/linux- >>> uwVqDp/linux-4.16.16/fs/btrfs/ctree.h:1565 >>> btrfs_update_device+0x1b2/0x1c0It >> looks like it's the old WARN_ON() for unaligned device size. >> Would you please verify if it is the case? > > # blockdev --getsize64 /dev/sdb2 /dev/sda2 > 999131127296 > 999131127296 > > > Since getsize64 returns bytes and not sectors, I suppose it would need > to be aligned to 1024 by the least? > > 999131127296 / 1024 = 975713991,5 > > So it's not.
So it's the case. > > >> If so, "btrfs rescue fix-device-size" should handle it pretty well. > > I guess this needs to be done with the fs unmounted? Yep. > Anything to consider since I have RAID1 (except from running it on both > devices)? Nothing special. Btrfs-progs will handle it pretty well. > > > Also, it's a bit strange that this error occurred never before (though > the btrfs-restore manpage says the kernel would check for this since > 4.11). Because the WARN_ON() is newly added. > > It would further be nice if btrfs-check would warn about this. Yep, latest will warn about it, and --repair can also fix it too. Thanks, Qu > > > Thanks, > Chris. >
signature.asc
Description: OpenPGP digital signature