You are not logged in.

#1 2018-07-30 11:58:21

probackup-nl
Member
From: Delft
Registered: 2017-11-15
Posts: 93
Website

[solved] sdb to sdc -> BTRFS error: btrfs_commit_transaction:2244: -5

Arch was EFISTUB booted from a 32.1GB USB stick (/dev/sda).
Additionally there is a second 31.0GB USB stick (/dev/sdb) used for backups.

Several USB sticks and drives have been plugged:

[    2.786825] usb 1-3: new low-speed USB device number 4 using xhci_hcd
[    2.932257] usb 1-3: Product: USB Keyboard
[   61.522647] usb 1-3: USB disconnect, device number 4
[  165.586720] usb 1-3: new high-speed USB device number 6 using xhci_hcd
[  165.729097] usb 1-3: Product: External USB 3.0
[ 2761.069261] usb 1-3: USB disconnect, device number 6
[58514.580294] usb 1-3: new high-speed USB device number 11 using xhci_hcd
[58514.722648] usb 1-3: Product: External USB 3.0
[59526.828567] usb 1-3: USB disconnect, device number 11
[64533.485957] usb 1-3: new high-speed USB device number 13 using xhci_hcd
[64533.627552] usb 1-3: Product: USB Flash Drive
[65083.851463] usb 1-3: USB disconnect, device number 13
[65084.149198] usb 1-3: new full-speed USB device number 14 using xhci_hcd
[65091.192530] usb 1-3: new high-speed USB device number 15 using xhci_hcd
[65091.344278] usb 1-3: Product: USB DISK 2.0
[65416.762674] usb 1-3: USB disconnect, device number 15
[65639.522439] usb 1-3: new high-speed USB device number 16 using xhci_hcd
[65639.667891] usb 1-3: Product: Intenso Slim Line
[65780.601777] usb 1-3: USB disconnect, device number 16
[65817.649074] usb 1-3: new high-speed USB device number 17 using xhci_hcd
[65817.790477] usb 1-3: Product: USB Flash Disk
[65858.585157] usb 1-3: USB disconnect, device number 17
[65879.155728] usb 1-3: new high-speed USB device number 18 using xhci_hcd
[65879.301123] usb 1-3: Product: Mass Storage Device
[66033.898717] usb 1-3: USB disconnect, device number 18
[66065.582363] usb 1-3: new high-speed USB device number 19 using xhci_hcd
[66065.724143] usb 1-3: Product: USB DISK
[66138.938862] usb 1-3: USB disconnect, device number 19
[66194.012345] usb 1-3: new high-speed USB device number 20 using xhci_hcd
[66194.154139] usb 1-3: Product: USB DISK
[66215.580212] usb 1-3: USB disconnect, device number 20
[66242.332337] usb 1-3: new high-speed USB device number 21 using xhci_hcd
[66242.473732] usb 1-3: Product: Voyager VEGA
[66408.695034] usb 1-3: USB disconnect, device number 21
[66441.045638] usb 1-3: new high-speed USB device number 22 using xhci_hcd
[66441.187075] usb 1-3: Product: Patriot Memory
[66618.503591] usb 1-3: USB disconnect, device number 22
[66640.365595] usb 1-3: new high-speed USB device number 23 using xhci_hcd
[66640.507098] usb 1-3: Product: MKNUFDAM32GB
[66749.145673] usb 1-3: USB disconnect, device number 23
[66777.888911] usb 1-3: new high-speed USB device number 24 using xhci_hcd
[66778.030928] usb 1-3: Product: STORE N GO
[66939.477484] usb 1-3: USB disconnect, device number 24

These were removed using command:

echo 1 > /sys/block/sdc/device/delete

Around 58511 the issue with sdb seems to start:

[58511.125298] usb 1-2: USB disconnect, device number 3
[58511.413623] usb 1-2: new full-speed USB device number 7 using xhci_hcd
[58511.810328] usb 1-2: device descriptor read/64, error -71
[58512.040322] usb 1-2: device descriptor read/64, error -71
[58512.270300] usb 1-2: new full-speed USB device number 8 using xhci_hcd
[58512.393655] usb 1-2: device descriptor read/64, error -71
[58512.623651] usb 1-2: device descriptor read/64, error -71
[58513.373626] usb 1-2: new full-speed USB device number 9 using xhci_hcd
[58513.373783] usb 1-2: Device not responding to setup address.
[58513.580437] usb 1-2: Device not responding to setup address.
[58513.786964] usb 1-2: device not accepting address 9, error -71
[58513.910316] usb 1-2: new full-speed USB device number 10 using xhci_hcd
[58513.910469] usb 1-2: Device not responding to setup address.
[58514.117099] usb 1-2: Device not responding to setup address.
[58514.323626] usb 1-2: device not accepting address 10, error -71

Around 64221 the hardware seems to have returned:

[64221.696008] usb 1-2: new high-speed USB device number 12 using xhci_hcd
[64221.957073] usb 1-2: New USB device found, idVendor=26bd, idProduct=9917, bcdDevice= 1.00
[64221.957090] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[64221.957101] usb 1-2: Product: USB DISK 3.0

At [64225.141018] the kernel decided to rename/re-insert /dev/sdb to/as /dev/sdc according to:

[64225.141018] sd 4:0:0:0: [sdc] 60604416 512-byte logical blocks: (31.0 GB/28.9 GiB)

2700+ seconds later a corruption is signalled:

[66937.641583] BTRFS error (device sdb2): bdev /dev/sdc2 errs: wr 1, rd 0, flush 0, corrupt 0, gen 0
[66937.643617] BTRFS error (device sdb2): bdev /dev/sdc2 errs: wr 2, rd 0, flush 0, corrupt 0, gen 0
[66937.644891] BTRFS error (device sdb2): bdev /dev/sdc2 errs: wr 3, rd 0, flush 0, corrupt 0, gen 0
[66937.645813] BTRFS error (device sdb2): bdev /dev/sdc2 errs: wr 4, rd 0, flush 0, corrupt 0, gen 0
[66937.647262] BTRFS error (device sdb2): bdev /dev/sdc2 errs: wr 5, rd 0, flush 0, corrupt 0, gen 0
[66937.647985] BTRFS error (device sdb2): bdev /dev/sdc2 errs: wr 6, rd 0, flush 0, corrupt 0, gen 0
[66937.649409] BTRFS error (device sdb2): bdev /dev/sdc2 errs: wr 7, rd 0, flush 0, corrupt 0, gen 0
[66937.650028] BTRFS error (device sdb2): bdev /dev/sdc2 errs: wr 8, rd 0, flush 0, corrupt 0, gen 0
[66937.650733] BTRFS error (device sdb2): bdev /dev/sdc2 errs: wr 9, rd 0, flush 0, corrupt 0, gen 0
[66937.651049] BTRFS error (device sdb2): bdev /dev/sdc2 errs: wr 10, rd 0, flush 0, corrupt 0, gen 0
[66937.652043] BTRFS: error (device sdb2) in btrfs_commit_transaction:2244: errno=-5 IO failure (Error while writing out transaction)
[66937.655384] BTRFS info (device sdb2): forced readonly
[66937.655390] BTRFS warning (device sdb2): Skipping commit of aborted transaction.
[66937.655395] BTRFS: error (device sdb2) in cleanup_transaction:1854: errno=-5 IO failure
[66937.658532] BTRFS info (device sdb2): delayed_refs has NO entry
[70559.291144] BTRFS info (device sdb2): disk space caching is enabled
[70559.291150] BTRFS error (device sdb2): Remounting read-write after error is not allowed

When unmounting /dev/sdc2 and running a fs check, no error is found:

# btrfs check /dev/sdc2
Checking filesystem on /dev/sdc2
UUID: 074dea1a-31ba-4c15-be8e-2fdf6cbcc7f0
checking extents
checking free space cache
checking fs roots
checking only csum items (without verifying data)
checking root refs
found 8633974799 bytes used, no error found
total csum bytes: 7770880
total tree bytes: 684818432
total fs tree bytes: 641433600
total extent tree bytes: 33423360
btree space waste bytes: 150482176
file data blocks allocated: 146757287936
 referenced 42608242688

Afterwards dmesg is appended with:

[141010.314265] BTRFS error (device sdb2): cleaner transaction attach returned -30

Notes
1. This is the first time this happens since running this hardware setup since 2017-12-27
2. This is also the only day that I did so much USB device plugging
3. I did not accidentally /delete /sdb because in that case the USB device won't come back after physcial removal and re-insertion.
4. Trying to mount /sdb2 results in "wrong fs type, bad option, bad superblock on /dev/sdb2, missing codepage or helper program, or other error."
5. After unmounting the second mount for /sdb2 that error is gone.

Secondary /sdb2 mount is like:

/dev/sdb2 on /mnt/sdb2 type btrfs (rw,relatime,ssd,space_cache,subvolid=5,subvol=/)

What should I change to prevent this "BTRFS: error (device sdb2) in btrfs_commit_transaction:2244: errno=-5 IO failure (Error while writing out transaction)" from re-occurring?

Last edited by probackup-nl (2018-07-30 12:40:45)

Offline

#2 2018-07-30 12:40:04

probackup-nl
Member
From: Delft
Registered: 2017-11-15
Posts: 93
Website

Re: [solved] sdb to sdc -> BTRFS error: btrfs_commit_transaction:2244: -5

probackup-nl wrote:

Arch was EFISTUB booted from a 32.1GB USB stick (/dev/sda).
3. I did not accidentally /delete /sdb because in that case the USB device won't come back after physcial removal and re-insertion.

I am not so sure that

echo 1 > /sys/block/sdb/device/delete

wasn't used.

It is safer (and shorter) to use

eject /dev/sdb

Eject also unmounts mounted file systems, which might have been the cause for this trouble here.

Offline

Board footer

Powered by FluxBB