unmounting a thumb drive

I use

mount -t vfat /dev/sdb1 /mnt/thumb

and then when I’m done

umount /mnt/thumb


dmesg shows:

FAT-fs (sdb1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.

Is there something I need to do differently?

Hi
Run the command sync before the umount command to ensure all data is written.

Clean up the device via;


fsck.fat -av /dev/sdb1

is that message from the mount or the umount? That is not clear from your story.

When it is from the mount, it is probably not correct unmounted from a MS Windows system. And that is most probably the case when the Windows system is just stopped and the Fast Boot feature is on there. In the case of Fast boot, the windows system is not realy shut down (and the devices correctly unmounted).

In that case you should read the message as: … was not properly unmounted on another system

I think the error was produced at (or before) mount.

fsck.fat -av /dev/sdb1

found a “dirty bit” and removed it.
I no longer see the error.
Thank you!

When I pull the drive out, dmesg shows:

xhci_hcd 0000:00:14.0: Cannot set link state.
usb usb4-port1: cannot disable (err = -32)

What does this mean?

On Fri 15 Dec 2017 07:26:01 PM CST, ravas wrote:

I think the error was produced at (or before) mount.

Code:

fsck.fat -av /dev/sdb1

found a “dirty bit” and removed it.
I no longer see the error.
Thank you!

When I pull the drive out, dmesg shows:

> xhci_hcd 0000:00:14.0: Cannot set link state.
> usb usb4-port1: cannot disable (err = -32)

What does this mean?

Hi
Just remember to sync before umount and you won’t face that issue… :wink:

Is the USB device 2.0 or 3.X? If USB 2.0 then probably the xhci driver
barfing a bit?


Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
openSUSE Leap 42.2|GNOME 3.20.2|4.4.92-18.36-default
If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below… Thanks!

That is of course correct for unmounting at Linux.

But this here went wrong on a Windows system where it was not unmounted properly before being transferred to the Linux system. It was left connected and Windows was shut down when being in “Fast reboot” (could be a different wording, I am no Windows user) mode. That will leave that “dirty bit” on (and possibly more artefacts).

That behaviour is mentioned here several times on the forums.

USB3 in a USB3 slot.