WaaromZoMoeilijk / rpi-audio

0 stars 0 forks source link

Robustness #19

Open WaaromZoMoeilijk opened 2 years ago

WaaromZoMoeilijk commented 2 years ago

Attempt to do something graceful when USB drives are removed and reinserted even in the middle of the recording Write the very next split file into any USB mount points that are considered active Attempt to remove mount points that correspond to stale devices Note that a flaky USB that may accidentally remove itself and reinsert could be a problem or a cause to this removal. It's considered too complicated to try to find out if it's the same drive as before, but an rsync/unison of some kind may help other drives catch up Handle the case when the system has a stale mount that hangs around. Like umount -l perhaps Ensure uniqueness of new mount point used. Can still consider leveraging the OS's built-in triggers to auto-mount. It's just that you may want to look into a few safe workarounds and enhancements to that