I would like a way to shut down the block devices to do safe removal by turning them off. On Linux there is the UDisks2's
udisksctl power-off -b /dev/sdX command. Is there something similar? Or if you know a library to use to create a script that can do this.
umount will unmount a block storage device. Once the device is unmounted, it is safe to remove/unplug it. There doesn't appear to be a
udiskctl for macos.