From: Duncan <1i5t5.duncan@cox.net>
To: linux-btrfs@vger.kernel.org
Subject: Re: Re-mounting removable btrfs on different device
Date: Fri, 7 Sep 2018 03:32:30 +0000 (UTC) [thread overview]
Message-ID: <pan$d71b0$8d25ba8$5bb37179$bc1641a5@cox.net> (raw)
In-Reply-To: 990de394-15d2-55f3-c5ae-bef2de734978@georgianit.com
Remi Gauvin posted on Thu, 06 Sep 2018 20:54:17 -0400 as excerpted:
> I'm trying to use a BTRFS filesystem on a removable drive.
>
> The first drive drive was added to the system, it was /dev/sdb
>
> Files were added and device unmounted without error.
>
> But when I re-attach the drive, it becomes /dev/sdg (kernel is fussy
> about re-using /dev/sdb).
>
> btrfs fi show: output:
>
> Label: 'Archive 01' uuid: 221222e7-70e7-4d67-9aca-42eb134e2041
> Total devices 1 FS bytes used 515.40GiB
> devid 1 size 931.51GiB used 522.02GiB path /dev/sdg1
>
> This causes BTRFS to fail mounting the device [errors snipped]
> I've seen some patches on this list to add a btrfs device forget option,
> which I presume would help with a situation like this. Is there a way
> to do that manually?
Without the mentioned patches, the only way (other than reboot) is to
remove and reinsert the btrfs kernel module (assuming it's a module, not
built-in), thus forcing it to forget state.
Of course if other critical mounted filesystems (such as root) are btrfs,
or if btrfs is a kernel-built-in not a module and thus can't be removed,
the above doesn't work and a reboot is necessary. Thus the need for
those patches you mentioned.
--
Duncan - List replies preferred. No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master." Richard Stallman
next prev parent reply other threads:[~2018-09-07 8:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-07 0:54 Re-mounting removable btrfs on different device Remi Gauvin
2018-09-07 3:32 ` Duncan [this message]
2018-09-07 4:40 ` Remi Gauvin
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='pan$d71b0$8d25ba8$5bb37179$bc1641a5@cox.net' \
--to=1i5t5.duncan@cox.net \
--cc=linux-btrfs@vger.kernel.org \
/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