linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marc MERLIN <marc@merlins.org>
To: Anand Jain <anand.jain@oracle.com>
Cc: Nikolay Borisov <nborisov@suse.com>,
	dsterba@suse.com, linux-btrfs@vger.kernel.org,
	kernel-team@fb.com
Subject: Re: 5.4.20: cannot mount device that blipped off the bus: duplicate device fsid:devid for
Date: Wed, 25 Mar 2020 21:26:24 -0700	[thread overview]
Message-ID: <20200326042624.GT15123@merlins.org> (raw)
In-Reply-To: <0d2ea8e2-cbe8-ca64-d0d4-fa70b8cad8b1@oracle.com>

On Thu, Mar 26, 2020 at 11:33:23AM +0800, Anand Jain wrote:
>  We would log the below only if the old device sde is still in mounted
>  state.  Unfortunately we don't have the unmount event log yet (patches
>  are in the ML) so we don't know if unmount was successful.
> 
> [2560416.434529] BTRFS warning (device sde1): duplicate device fsid:devid
> for 727c7ba3-f6f9-462a-8472-453dd7d46d8a:1 old:/dev/sde1 new:/dev/sdq1
> 
>  If the device is unmounted, the scan would have replaced the sde
>  to sdi, unless the sde (stale) generation is > generation in sdi
>  (lost commit). In which case the --forget is useful to remove the
>  state device entry (provided device is unmounted).
 
Well, the device did disappear, wouldn't that cause the in memory
version to be more recent than the disk version?

>  Its strange /proc/mounts doesn't list sde. Could you please send me
>  complete kernel logs. Lets try if there is any clue.
 
Sure https://pastebin.com/SWAfYxV8
 
>  I tried to reproduce.. but in my case the unmount was successful.
> 
> 
> $ mkfs.btrfs -fq /dev/sdc && mount /dev/sdc /btrfs
> $ devmgt show | grep sdc
> host2 sdc
> $ devmgt detach /dev/sdc
> ::
> detach /dev/sdc successful
> $ devmgt attach host2

That's probably too clean.
Can you 
1) write to device in a loop
2) pull power from SATA device (in this case it was an ssd)
3) plug device back in

> $ umount /dev/sdc
> 
> Unfortunately there is no log about the unmount :-(.

Maybe worth adding to help debug later?

I looked in my bash history, and it shows this:
37280  mount | grep sde
37281  umount /mnt/btrfs_space
37282  umount /var/local/space
37283  umount /var/cache/zoneminder
37284  fuser -vm /var/cache/zoneminder
37285  fuser -vkm /var/cache/zoneminder
37286  umount /var/cache/zoneminder
37287  umount /var/lib/mysql
37288  mount | grep sde1

First time, I got output to the mount command.
Second time I did not.

other commands I typed:
37289  mount /dev/sdq1 /mnt/btrfs_space
37296  btrfs device scan
37301  grep sde /etc/* 2>/dev/null
37303  mount /dev/sdq1 /mnt/btrfs_space
37308  grep -r /mnt/btrfs_space /etc 2>/dev/null
37311  btrfs device scan 
37312  l /sys/block/sde/
37313  btrfs check /dev/sdq1
37314  btrfs device scan 
37320  mount /dev/sdq1 /mnt/mnt
37323  btrfs device scan
37324  dmesg |tail -1
37326  lsblk -v
37327  lsblk 
37328  grep sde /proc/mounts 

Hope this helps.

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/  

  reply	other threads:[~2020-03-26  4:29 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-21 20:23 5.4.20: cannot mount device that blipped off the bus: duplicate device fsid:devid for Marc MERLIN
2020-03-21 21:25 ` Nikolay Borisov
2020-03-25 20:14   ` Marc MERLIN
2020-03-25 23:56     ` Anand Jain
2020-03-26  1:30       ` Marc MERLIN
2020-03-26  3:33         ` Anand Jain
2020-03-26  4:26           ` Marc MERLIN [this message]
2020-04-14  0:38             ` Marc MERLIN
2020-04-16 10:43               ` Anand Jain
2020-04-19 19:13                 ` Marc MERLIN
2020-04-20 11:10               ` Anand Jain
2020-04-20 14:56                 ` Marc MERLIN
2020-04-21  7:33                   ` Anand Jain
2020-04-22  5:54                     ` Marc MERLIN
2020-04-21  7:21 ` [PATCH] btrfs: boilerplate: devlist and fsinfo Anand Jain

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200326042624.GT15123@merlins.org \
    --to=marc@merlins.org \
    --cc=anand.jain@oracle.com \
    --cc=dsterba@suse.com \
    --cc=kernel-team@fb.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=nborisov@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).