Re: high speed data to usb disk makes the kernel think that is has been unmounted

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Dec 05, 2020 at 12:49:45PM +0100, Patrik Nilsson wrote:
> Dear Alan,
> 
> After long time testing it seems that changing the TIMEOUT values did help
> somewhat, but not completely.
> 
> I tested two SSD and wrote to them at the same time:
> 
> # dd if=/dev/zero of=/dev/sdd bs=$((10*1024*1024))
> 
> # dd if=/dev/zero of=/dev/sdg bs=$((10*1024*1024)) # different bash terminal
> 
> The synchronize write gives a lot of errors as the log below (1) shows
> 
> Running big with blocks in synchronized mode gives the same kind of error:
> 
> # dd if=/dev/zero of=/dev/sdi bs=$((10*1024*1024)) oflag=dsync # this is
> another SSD bought for this test
> dd: error writing '/dev/sdi': Input/output error
> 9+0 records in
> 8+0 records out
> 83886080 bytes (84 MB, 80 MiB) copied, 185.585 s, 452 kB/s
> 
> When synchronized data transfer is done to sdi and sdg in a small block size
> everything works out as it should, but takes a long time.
> 
> # dd if=/dev/zero of=/dev/sdg bs=1024 oflag=dsync
> 56897100+0 records in
> 56897100+0 records out
> 58262630400 bytes (58 GB, 54 GiB) copied, 74235.8 s, 785 kB/s
> [...]
> dd: error writing '/dev/sdg': No space left on device
> 488386585+0 records in
> 488386584+0 records out
> 500107862016 bytes (500 GB, 466 GiB) copied, 702184 s, 712 kB/s
> 
> I have been unable to catch this kind of error leading to a crash.
> 
> The shutdown of the test computer did show the same kind of errors as the
> below log. It couldn't write asynchronous data.

Without more information it's impossible to tell what's really going
wrong.  The logs by themselves just aren't good enough.

Messing around with the timings isn't going to fix the real problem,
which is that you keep getting write errors.  Once a write error has
occurred you're already in trouble; failing to reinitialize the drive
afterward is minor in comparison.

The best thing for you to do at this point is collect a usbmon trace 
showing some errors as they occur.  Information on how to use usbmon is 
in the kernel source file Documentation/usb/usbmon.rst.

Alan Stern



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux