Re:Hacked Together 118 GB Floppy Disk
by andrewaylett on Friday February 26, 2016 @04:37AM
(#11180598)
Filesystems often have a 'dirty' flag which is cleared as the very last write when unmounting cleanly, to let the OS know whether the filesystem might need to be checked before mounting it next time.
Also, unmounting helps you to be confident that nothing's started doing more IO since you ran sync.
Re:Hacked Together 118 GB Floppy Disk
by whyagaindavid on Friday February 26, 2016 @08:21AM
(#11181192)
I use this bash script to a umount with a shortcut key. Using KDE. (bad formatting in hn)
#!/bin/bash for i in `ls /media/$USER` do cd /media/$USER umount $i done
ls /media/$USER |grep -v cdrom0 |grep -v cdrom> /tmp/disk_status file=/tmp/disk_status if [ ! -s $file ]; then kdialog --passivepopup "Nothing Mounted " 1 else kdialog --passivepopup "Mounted devices: `cat /tmp/disk_status`" 2 fi
I don't even bother to unmount it; what would unmounting add, if the OS can recognize that the device is gone and clean up its mount tables? Is there some filesystem that waits until unmount to recalculate indexes or something?
(Okay, sure, the OS could tell me the disk is in use because I've got an overlay filesystem mounted on top of it, and would I kindly wait forever for that to stop being the case. But screw you, OS, I need this USB. Just send the FUSE server or SMB daemon or whatever a SIGPIPE.)