Bug 1331265

Summary: Fedora corrupts the file system on USB drive
Product: [Fedora] Fedora Reporter: Jarmo <rh>
Component: kernelAssignee: Kernel Maintainer List <kernel-maint>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 24CC: gansalmon, itamar, jonathan, kernel-maint, madhu.chinakonda, mchehab, rh
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-10-05 17:15:52 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Jarmo 2016-04-28 07:24:21 UTC
Description of problem:

Fedora corrupts the file system on USB drive if run Fedora on USB stick.

Version-Release number of selected component (if applicable):

Currently:

4.5.2-301.fc24.x86_64 #1 SMP Thu Apr 21 14:16:00 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

How reproducible:


Steps to Reproduce:
1. Install Fedora 23 or fedora 24 to USB stick.
2. Run and use it normally, one day or few days. 
3. Sooner or later the OS hangs and boot fails with disk IO issues.

Actual results:

Errors like next.

sd 3:0:0:0: [sdc] Attached SCSI removable disk
usb 3-3.2: Disable of device-initiated U1 failed.
usb 3-3.2: Disable of device-initiated U2 failed.
usb 3-3.2: USB disconnect, device number 4
sd 2:0:0:0: [sdb] tag#0 FAILED Result: hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK
sd 2:0:0:0: [sdb] tag#0 CDB: Write(10) 2a 00 02 9f 39 e8 00 00 10 00
blk_update_request: I/O error, dev sdb, sector 43989480
EXT4-fs warning (device dm-0): ext4_end_bio:328: I/O error -5 writing to inode 1191563 (offset 0 size 0 starting block 4845885)
Buffer I/O error on device dm-0, logical block 4845885
Buffer I/O error on device dm-0, logical block 4845886
sd 2:0:0:0: [sdb] tag#0 FAILED Result: hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK
sd 2:0:0:0: [sdb] tag#0 CDB: Write(10) 2a 00 02 9f 3c 10 00 00 08 00
blk_update_request: I/O error, dev sdb, sector 43990032



Expected results:

Fedora OS should run normally on USB stick.

Additional info:

Have tried with three different new sticks.
Same issue with ext4 and btrfs. 
fsck.btrfs/fsck.ext4 detects and usually can fix the disk issue.

Similar bug:
Bug 1266311 - Buffer IO error when using usb flash disk as SCSI generic-device by hostdev

Comment 1 Jarmo 2016-05-17 05:07:04 UTC
Especially "dnf update" make filesystem corrupted and next boot fails. Always it's  /dev/mapper/fedora-root.

Comment 2 Laura Abbott 2016-09-23 19:21:01 UTC
*********** MASS BUG UPDATE **************
 
We apologize for the inconvenience.  There is a large number of bugs to go through and several of them have gone stale.  Due to this, we are doing a mass bug update across all of the Fedora 24 kernel bugs.
 
Fedora 24 has now been rebased to 4.7.4-200.fc24.  Please test this kernel update (or newer) and let us know if you issue has been resolved or if it is still present with the newer kernel.
 
If you have moved on to Fedora 25, and are still experiencing this issue, please change the version to Fedora 25.
 
If you experience different issues, please open a new bug report for those.

Comment 3 Jarmo 2016-10-05 17:15:05 UTC
Please close this bug this as don't have time play with this now. Used a workaround: not running Fedora on USB. Thanks.

Comment 4 Jarmo 2016-10-05 17:15:52 UTC
Closing myself.