* Re-mounting removable btrfs on different device
@ 2018-09-07 0:54 Remi Gauvin
2018-09-07 3:32 ` Duncan
0 siblings, 1 reply; 3+ messages in thread
From: Remi Gauvin @ 2018-09-07 0:54 UTC (permalink / raw)
To: linux-btrfs
[-- Attachment #1: Type: text/plain, Size: 1423 bytes --]
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 with the following errors:
sd 3:0:0:0: [sdg] Attached SCSI disk
blk_partition_remap: fail for partition 1
BTRFS error (device sdb1): bdev /dev/sdg1 errs: wr 0, rd 1, flush 0,
corrupt 0, gen 0
blk_partition_remap: fail for partition 1
BTRFS error (device sdb1): bdev /dev/sdg1 errs: wr 0, rd 2, flush 0,
corrupt 0, gen 0
blk_partition_remap: fail for partition 1
BTRFS error (device sdb1): bdev /dev/sdg1 errs: wr 0, rd 3, flush 0,
corrupt 0, gen 0
blk_partition_remap: fail for partition 1
BTRFS error (device sdb1): bdev /dev/sdg1 errs: wr 0, rd 4, flush 0,
corrupt 0, gen 0
ata4: exception Emask 0x50 SAct 0x0 SErr 0x4090800 action 0xe frozen
ata4: irq_stat 0x00400040, connection status changed
ata4: SError: { HostInt PHYRdyChg 10B8B DevExch }
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?
[-- Attachment #2: remi.vcf --]
[-- Type: text/x-vcard, Size: 203 bytes --]
begin:vcard
fn:Remi Gauvin
n:Gauvin;Remi
org:Georgian Infotech
adr:;;3-51 Sykes St. N.;Meaford;ON;N4L 1X3;Canada
email;internet:remi@georgianit.com
tel;work:226-256-1545
version:2.1
end:vcard
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Re-mounting removable btrfs on different device
2018-09-07 0:54 Re-mounting removable btrfs on different device Remi Gauvin
@ 2018-09-07 3:32 ` Duncan
2018-09-07 4:40 ` Remi Gauvin
0 siblings, 1 reply; 3+ messages in thread
From: Duncan @ 2018-09-07 3:32 UTC (permalink / raw)
To: linux-btrfs
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Re-mounting removable btrfs on different device
2018-09-07 3:32 ` Duncan
@ 2018-09-07 4:40 ` Remi Gauvin
0 siblings, 0 replies; 3+ messages in thread
From: Remi Gauvin @ 2018-09-07 4:40 UTC (permalink / raw)
To: linux-btrfs
[-- Attachment #1: Type: text/plain, Size: 519 bytes --]
On 2018-09-06 11:32 PM, Duncan wrote:
> 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.
>
Good to know, thanks.
[-- Attachment #2: remi.vcf --]
[-- Type: text/x-vcard, Size: 193 bytes --]
begin:vcard
fn:Remi Gauvin
n:Gauvin;Remi
org:Georgian Infotech
adr:;;3-51 Sykes St. N.;Meaford;ON;N4L 1X3;Canada
email;internet:remi@georgianit.com
tel;work:226-256-1545
version:2.1
end:vcard
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-09-07 9:19 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-07 0:54 Re-mounting removable btrfs on different device Remi Gauvin
2018-09-07 3:32 ` Duncan
2018-09-07 4:40 ` Remi Gauvin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox