Cameras, iPhones, iPads: just yank out the flash drive/SD card whenever you want
Computers: Please submit a request and we will respond in three business days
@christianselig “Your request could not be completed since you are looking at the volume. Please stop looking at it, and try again"
@christianselig such a pet peeve of mine, specifically with an SSD dedicated to Time Machine that I need to eject every time I move the machine.
What are journaled file systems for if not this specific use case?
@kirsch change the mount options from async to sync, async is default to protect memory life and speed up read/write, sync writes as the file system calls so it's safe to remove at any time. (normally you only use sync for stuff like security camera cards, etc, that you don't want to lose anything on a power outage). Note that this will cut your cards lifetime by quite a bit compared to async mode.
@kirsch @christianselig Journalled filesystems prevent filesystem corruption. They don’t guarantee that data in your buffer cache is written out and if it isn’t then you can lose data.
@david_chisnall @christianselig which is acceptable for a Time Machine drive, in my opinion.
@kirsch @christianselig Does the OS have a way of knowing that the drive is used exclusively for Time Machine?
I’ve never used a directly attached disk for Time Machine, but I was under the impression that it created a disk image in the disk so that the same disk could be used to back up multiple machines (and for other things), does it use the entire disk?
The disk image approach introduces some fragility (there are two filesystems and partial commits to the lower layer one can affect the integrity of journalling in the higher-level one). This is why Time Machine requires some extra sync commands for network shares. It will be doing some aggressive fsyncing on removable disks, but a depressing number of removable disks lie about completing sync operations (it gives them better benchmark results).
@david_chisnall @christianselig back in the pre-AFS days for network backups it used disk images. For directly attached disks it didn’t unless you jumped through hoops.
I don’t know if disk images are used in any circumstances today but certainly not for an AFS disk directly attached.
And yes, the OS knows.
@christianselig show me an iPhone/iPad that has a flash drive slot.
@christianselig weeeeell teeeeeechnically you are right. So I’ll call “touché”.
@Daytonlowell that’s technically correct, but inconvenient as hell.
@pnpnerd Sure, but the post was about how the OS handles unplugging a mounted disk without manually unmounting it first, not about whether dongles suck.
@christianselig change the mount options to automount the drive as sync instead of async (the default) and you can yank the card out whenever you want. Memory cards default to async mounting because it's far, FAR faster to cache in local memory and write later and it's easier on the flash memory itself when you're actively working on files.
@christianselig Even better when they won’t let go. I keep my music library on a flush SD card do I can swap between computers, and half the time MacOS won’t let go of the card because “It’s in use” by who knows what as it won’t tell me.
@sgtstretch @christianselig I haven’t plugged my kindle in for days, but I bet if I log in I’ll get to close the “please eject before unplugging” notification *again*
@christianselig when I switched to macOS from windows and saw this I got flashbacks from 10 years ago
@Mister_Eel Wait, does Windows not require it?
@christianselig @Mister_Eel you can ask the system to eject it before unplugging it but it's not really necessary.
@eduardobragaxz @christianselig to add to this: it used to be necessary but I remember years ago now Microsoft officially stating it was no longer necessary (after it had been common knowledge in nerd circles for a while)
@eduardobragaxz @christianselig @Mister_Eel Windows lets you choose which behaviour you want per-drive, which is nice.