5 ms·
> If he could get the drive eject button to unmount the SD card, this would actually be more functional that current tech. It bugs me that unmounting SD cards /
by josteink 11y ago
> If he could get the drive eject button to unmount the SD card, this would actually be more functional that current tech. It bugs me that unmounting SD cards / USB drives and physically removing it are two seperate actions.
To be fair, this was always a problem, also with old computers and OSes. There was no link between pressing eject and magical things happening in the machine to commit data. The data was simply already committed so there was no need to have any additional layers of security.
The difference between then and now is that new computers have enormous amounts of memory and use it to provide write-back caching. This means the OS can tell applications that data is committed when it's not. This is an OS level decision which is done for performance and has nothing to do with the physical eject-buttons on your devices.
You may call this a small nit, but I think it's an important one. The eject-button on old machines would suffer the exact same problems if it used an OS which offered write-back cache.
You could say old Macs didn't have this problem, which is true. But it didn't have an eject-button. It relied on the OS doing that. And then instead you had the problem of people not being able to get their disks out of their machines if the OS for some reason refused to release it (or that users didn't realize they had to drag the disk-icon to trash).
- timthorn 11y agoThe eject-button on old machines /did/ suffer the exact same problems - removing the disk whilst the activity LED was illuminated rarely ended well!
- viraptor 11y agoI just remembered that even hard drives at some point had similar issues. Remember to park your heads before power off!
- josteink 11y agoGood catch! I had completely forgotten about that one. For those completely oblivious to this: This was actually not about getting data written to disk, but to physically protect the drive from its own mechanical construction. The "park" command would cause the harddrive to move its magnetic read and write-heads away from the internal platters, so that when it was powered down and the disks stopped spinning, the platters would not be damaged or experience needless tear and wear. Yeah, I'm glad we no longer have to do that exercise.
- fit2rule 11y agoI still type "sync;sync;sync" before I unmount something. (This used to be how you'd tell the tape-spooler to rewind..)
- ashmud 11y agoReminds me: Sysinternals Sync on Windows. Always, always sync -r after writing to a zip drive on Windows. Even minutes after you think it is finished writing, do not trust the OS to have finished flushing to disk.
- jgrahamc 11y agoTo be fair, this was always a problem, also with old computers and OSes. There was no link between pressing eject and magical things happening in the machine to commit data There was on the Apple Lisa. Or rather ejecting a disk was something you did in the OS which made sure everything was written/closed before allowing the disk out.
- josteink 11y agoYeah I mentioned that in the end of my comment, together with the other issues that would typically lead to. It was definitely confusing to new users: Insert a disk was something which anyone could do, since it only involved simple movement of a physical object, but ejecting it required you to know and understand the OS. This was quite an "impedance mismatch" between what should ideally be two symmetrical actions, and I remember I had to help out my mother quite a few times :)
- amelius 11y ago> The difference between then and now is that new computers have enormous amounts of memory and use it to provide write-back caching. Also, not syncing to disk immediately can improve the lifetime of flash media, which wasn't a concern in the old days. However, I'm somewhat disappointed by current filesystems not using journaling to make it possible to pull out a USB drive without harm (other than losing the latest writes).
- ttctciyf 11y ago> the problem of people not being able to get their disks out of their machines if the OS for some reason refused to release it My first time on a Mac, about 1990, I felt pretty confident having plenty of early PC experience. A graphic designer I shared a house with had left me alone with (and permission to use) her Mac. I quickly discerned there was no software of interest actually installed, but found a floppy that looked something like a game. It wasn't, and I went to hit the ... wait, there's no eject button? After a fruitless few minutes during which I failed to notice the eject key on the keyboard (of all places!) I eventually opted for tweezers, and gently teased the floppy out of the drive. Imagine my surprise when I restarted the Mac to find it was unable to start, having apparently completely forgotten about it's own HD! The thing had to go back for servicing before it would even boot properly, iirc. My reputation as the house's resident computer expert was severely impacted, needless to say.
- soylentcola 11y agoOne of the things that drove me nuts using the earlier Macs at my college was the lack of an eject button. Sure, I understand the reasoning now, but when some crappy Hypercard project I was bungling made the computer freeze, I had no way to remove the floppy short of rebooting the whole computer and waiting or hunting around for a paperclip to push into the little manual eject hole. Still, seeing how many people in my office will just pull USB flash drives without ejecting them I almost see the appeal now.
- shdon 11y agoThat latter bit is actually so common that Windows was changed to accommodate it, as Raymond Chen wrote at https://blogs.msdn.microsoft.com/oldnewthing/20031216-00/?p=41483 https://blogs.msdn.microsoft.com/oldnewthing/20031216-00/?p=...
- digi_owl 11y agoI loved how only of my early optical drives had a notch tastefully designed into the front that allowed me to pry the drive open with any sufficiently rigid object, rather than deal with the "pointy thing into small hole" that everything later on had.
- mike_hock 11y agoWe also had that fixed with CDs/DVDs when the OS could lock the drive and handle the eject button any way it liked. I didn't quite like the way Linux handled this though, not allowing the disk to be ejected as long as any file descriptors were still open, which meant you had to hunt down the processes keeping them open. But it would be extremely helpful for writable media like flash to be able to do full write-back caching and only flush the cache when the eject button is pressed, then EBADF any further reads or writes to any open file descriptors.
- TazeTSchnitzel 11y agoOoh, it'd be cool if you could do the same thing for USB drives. Perhaps some sort of claw or magnetic mechanism could hold the drive in place.
- putterson 11y agoThis makes me wonder what those two holes in the shroud of USB A style connectors are for. After a bit of googling it looks as if they are to provide a bit of tension against removal. I'm sure you could repurpose them to lock the usb drive into a USB port.
- digi_owl 11y agofuser * while sitting at the mountpoint usually gives a clue. Also useful when something is hogging the audio device in /dev.
- oh_sigh 11y agoYou're right - the only solution would be a captive eject button, which did all of the write resolutions before allowing the disc to physically eject. And that would come with other usability problems, like users getting angry when they push eject and their card doesn't come out immediately.
- Tloewald 11y agoYou could select the disk and then "Eject". Dragging to the trash was a shortcut to unmount and eject. As for Macs not having the problem, this doesn't require qualification. Not only did Macs not have the problem, they treated disks as logical _volumes_ rather than physical devices. If you ejected a disk mid-save on a Mac it would complain, and if you inserted the wrong disk it would reject it and ask for the right one. If you did the same thing on a DOS/Windows machine it would correct the new disk (and leave the old disk corrupted too). Similarly, you could copy files from one disk to another without having two disk drives in Finder (it was a pain in the neck, swapping the disks, but it worked). Other computers needed special software and relied on the user to insert the correct disk. This advantage continues to this day. Windows still refers to devices by physical location.
- digi_owl 11y ago> Windows still refers to devices by physical location. Nope, not since NT. I learned that the hard way when moving a HDD containing Win2k around. Even though it was hooked to IDE master it would come up as D: as that was what it was assigned after it got formated with NTFS. You can go into disk manager and assign a partition any letter than is not already in use. You can even mount a partition into a existing FHS, much like on unix, but i can't say i have seen it used often. Basically the letters are there for backwards compatibility.
- deleted 11y ago[deleted]