USB mont sometime failed - Printable Version +- Logic Machine Forum (https://forum.logicmachine.net) +-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1) +--- Forum: Scripting (https://forum.logicmachine.net/forumdisplay.php?fid=8) +--- Thread: USB mont sometime failed (/showthread.php?tid=2653) |
USB mont sometime failed - SigmaTec - 23.05.2020 Hi all, I developed an Lua script which writes "csv" files on a USB 2.0 key. This cyclic script performs regular "mount / umount" (every 6 hours) to guarantee the maximum number of correct files in the event of micro power cuts. It works fine, but I have random errors on the mount as : "mounting / dev / sda1 on / mnt failed: no such file or directory". Do you have any explanations for this problem? Than'k in advance for your help ! --- here is the umout/mount standard script I user --- Code: devs = io.ls('/sys/class/block/') RE: USB mont sometime failed - admin - 25.05.2020 (23.05.2020, 15:30)SigmaTec Wrote: This cyclic script performs regular "mount / umount" (every 6 hours) to guarantee the maximum number of correct files in the event of micro power cuts. This does not provide any benefit. You can mount once then simply run os.execute('sync') after writing to synchronize data to disk. RE: USB mont sometime failed - SigmaTec - 25.05.2020 Hi Admin, many thank for your answer. Have a good new week ! |