On Friday, 12 January 2018 09:58:17 GMT Adam Carter wrote: > > I replaced it with a USB3 drive, so I needed to update the udev rules > > that automatically mount it and then "umount" it when it's removed. > > Pretty sure you'd risk filesystem corruption by not umounting before you > remove the device. Did it used for force an fsck on each mount because the > filesystem was "dirty"? If not, i have a fundamental misunderstanding of > how this stuff works.
Yes, the sequence ought to be: sync && umount /dev/<device> || eject /dev/<device> I don't recall if eject includes the previous steps and therefore it is superfluous. I find some applications are reluctant to let go of filesystems on pluggable devices and umount can fail. In this case --lazy option of umount should work: umount -l /dev/<device> -- Regards, Mick
signature.asc
Description: This is a digitally signed message part.