How does macOS guarantee no data loss when shutting down normally?
If you need to guarantee that data is, in fact, written permanently, you use fnctl(F_FULLFSYNC).
FWIW while fsync() on Linux does request that the drive flushes its hardware cache, it's up to the drive whether to actually honor this request, and many don't do so synchronously (but still report success). So unless you control the whole setup end-to-end - hardware and software both - you don't actually have the guarantees.
Thanks for the explanation
You could use an USB C power bank, because it seems to be usb-c powered
Re:New Mac Mini with M4
by holycrapwhodat on Tuesday October 29, 2024 @01:44PM
(#41987312)
It is not USB-C powered.
It needs 100-240V, 50hz-60hz AC power.
A missed opportunity though. If it’s USB-C powered, it could be even smaller and Apple could simplify its BOM by including a MacBook Pro charger with it.
Re:New Mac Mini with M4
by TheFuzzball on Tuesday October 29, 2024 @06:51PM
(#41990244)
If it was USB-C powered people would be complaining about the size of the external power supply.
Re:New Mac Mini with M4
by spacedcowboy on Tuesday October 29, 2024 @07:40PM
(#41990586)
If it only had one USBc input, how could it supply enough power for 5 USBc outputs ? Well ok, 3xTB5 + 2xUSBc, but still ?
Does it work 24/7 or have two power sources? Can you charge the powerbank at the same time so it will rely on the battery only when the power is down?
Many power banks support pass through charging where it powers attached devices while also charging the battery
Re:New Mac Mini with M4
by toasterlovin on Tuesday October 29, 2024 @04:58PM
(#41989340)
Is it common for desktop computers in this size to have a built in UPS?
If someone didn't know, macOS ignores fsync, so without UPS your data is not safe. Not an issue for laptops, obviously, but issue for battery-less devices.