Re: Samsung T5 SSD: "Synchronize Cache(10) failed" on removal

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

 



On Sun, Sep 10, 2023 at 06:41:31PM +0930, Jonathan Woithe wrote:
> Hi Alan
> 
> On Sat, Sep 09, 2023 at 12:14:49PM -0400, Alan Stern wrote:
> > > If on the other hand it' is something best fixed, please let me know how I
> > > can assist with this.
> > 
> > The most likely situation where this would indicate a real problem would 
> > be if you had mounted a filesystem on the drive, written some data, and 
> > then unplugged it without unmounting first.  If you haven't done that 
> > then you don't have to worry about anything.
> 
> Thanks for confirming this.  The scenarios I've outlined all involve drives
> which have definitely been unmounted before they were unplugged.  Thus, so
> long as the unmount has been done then this error can be ignored.

In principle you can write to a drive without mounting it first.  
Perhaps the most common examples are creating/modifying a partition 
table, doing a filesystem repair, or copying an OS install image.  Then 
there wouldn't be an unmount to automatically synchronize the cache.

However, I believe the partitioning and repair utilities do their own 
cache synchronization, so again it's not an issue in those cases.  
Mostly it's just necessary to be careful about your own raw-disk 
accesses -- something most of us very rarely do.

> I guess what drew my attention to the message is that USB flash drives do
> not show the "Synchronize Cache(10) failed" error when unplugged.  I guess
> the different behaviour may be the result of varying caching arrangements
> (or other low level structural details) across the devices.

Yes.  Most likely the flash drives don't claim to have caches, so the 
kernel doesn't try to issue a SYNCHRONIZE CACHE command.

> > On the other hand, if you would like to get rid of those annoying error 
> > messages, you can do so by telling the kernel that the drive is about to 
> > be removed before you unplug it.  You do this by writing to the "remove" 
> > attribute file in the USB device's sysfs device directory; this is the 
> > equivalent of using the "Safely remove a device" button in Windows.  
> > Some GUIs may provide an easy-to-use mechanism for doing this, such as 
> > an "eject" selection on a device menu.
> 
> I've noticed separate "Eject" and "Unmount" items under various desktop
> environments and always wondered why they were separated.  Thanks for
> providing the missing information.  I personally run a very simple window
> manager (fvwm2) so don't get device menus.  If the message gets to me I'll
> look into arranging for the sysfs attribute write.  However, knowing now
> that it's essentially a quirk of the way the device interacts with the
> subsystem I will be happy to simply leave things as they are.
> 
> Thank you again for taking the time to respond.

You're welcome.

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