Skip to content

Instantly share code, notes, and snippets.

@rmarchei
Last active February 17, 2017 12:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rmarchei/4f63b6682766721e178eec9722dc7368 to your computer and use it in GitHub Desktop.
Save rmarchei/4f63b6682766721e178eec9722dc7368 to your computer and use it in GitHub Desktop.
Ubuntu Xenial on Vagrant: workaround for 'Medium access timeout failure. Offlining disk!'
ACTION=="add", SUBSYSTEM=="scsi" , ATTR{type}=="0|7|14", \
RUN+="/bin/sh -c 'echo 180 > /sys$$DEVPATH/timeout'"
@rmarchei
Copy link
Author

rmarchei commented Jul 1, 2016

Workaround for "Medium access timeout failure. Offlining disk!" on Ubuntu Xenial 16.04 running on Vagrant.
Issue:

[ 3594.567150] sd 2:0:0:0: [sda] tag#14 Medium access timeout failure. Offlining disk!
[ 3604.783031] blk_update_request: I/O error, dev sda, sector 11129560
[ 3604.801351] Buffer I/O error on device sda1, logical block 1390828
[ 3604.836151] Buffer I/O error on device sda1, logical block 1390829
[ 3604.863836] Buffer I/O error on device sda1, logical block 1390830
[ 3604.890827] Buffer I/O error on device sda1, logical block 1390831
[ 3604.925370] Buffer I/O error on device sda1, logical block 1390832
[ 3604.996842] sd 2:0:0:0: rejecting I/O to offline device
[ 3605.013664] sd 2:0:0:0: rejecting I/O to offline device

Copy 99-vagrant.rules to /etc/udev/rules.d/, then reboot or run udevadm trigger --action=add --subsystem-match=scsi or run echo 180 > /sys/block/sda/device/timeout

Copy link

ghost commented Feb 17, 2017

I had this problem too and your commands above definitely fix it. Any idea why it's necessary @rmarchei? Is it just a bug that Ubuntu needs to fix?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment