On Thu, Mar 26, 2020 at 07:56:10AM +0800, Anand Jain wrote: > > Are users really supposed to know this? > > Why does btrfs device scan not invalidate the cache of devices and keep > > remembering a device that's gone (not visible in new scan)? > > btrfs device scan --forget is only useful to cleanup the unmounted > devices, per the logs below the device was mounted when it disappeared. > More below. I'm confused: why is --forget even needed? Why would it remember devices that were unmounted and not part of a new scan? And yes, the device was not unmounted. The sata layer failed, device disappeared while mounted and then re-appeared I was able to force umount the mountpoints, so maybe --forget would have helped, but I'm confused as to why it even exists. > This indicates the device was mounted when it disappeared. So it > re-appears with the new path, but as its fsid+uuid+devid matches > with the old still mounted device we rightly consider it as an > alien device and fail the mount. It was unmounted after disappearing, see the 'grep sde /proc/mounts' showing that it wasn't mounted anymore, so it seems that even that part didn't work as intended? Marc -- "A mouse is a device used to point at the xterm you want to type in" - A.S.R. Home page: http://marc.merlins.org/
