**** BEGIN LOGGING AT Thu Feb 19 02:59:58 2015 Feb 19 17:25:30 Hello folks, I've been using Ubuntu 14.04 on a bunch of beagle bone blacks at my workplace and I've been having a problem with them that I'm wondering if anyone here might be able to help me with Feb 19 17:26:10 I keep the software that I wrote to run on them in a git repository, each beagle has a clone on it, and a cron pulls them every 5 minutes to keep them up to date Feb 19 17:26:38 When I pull power without shutting them down first, they have about a 50-70% chance of corrupting the contents of the git repository so I have to remote in and re-clone it and patch things up Feb 19 17:26:59 Everything else seems fine, but the contents of my git repo are all 0 byte files Feb 19 17:28:28 I understand that powering down correctly would be best practice, but it seems odd that such a specific set of files are so likely to be corrupted when I pull power Feb 19 17:28:37 Has anyone else experienced anything similar? Feb 19 17:35:05 Not experienced that, but I'm curious. What filesystem are you using? Feb 19 17:35:31 Also, have you tried a different SD card manufacturer? AIUI, much hardware lies about when they've really committed data. Feb 19 17:35:39 HazeAI: A quick hack might be to throw a "sync && sync" at the end of your git pull cron job. Feb 19 17:35:43 And what SD card manufacturer are you using right now? Feb 19 17:45:11 I have Ubuntu flashed to the eMMC - No SD card in use Feb 19 17:45:58 well, forcing the sync is your best option then Feb 19 17:46:11 Thanks for the suggestion infinity - I'll test out adding "sync && sync" to my git pull cron Feb 19 17:46:32 HazeAI, do you also have it mounted as "noatime" ? Feb 19 17:47:34 Apologies rcn-ee, I'm not sure what you mean. It's mounted to /dev/mmcblk0p2, is there a command I could run to check what you are looking for? Feb 19 17:48:16 And for adding sync && sync to my cron, do you mean: sync && git -C /usr/local/bin/marshal pull && sync Feb 19 17:48:26 or : git -C /usr/local/bin/marshal pull && sync && sync Feb 19 17:48:55 mount|grep noatime Feb 19 17:49:47 looks like yes: '/dev/mmcblk0p2 on / type ext4 (rw,noatime,errors=remount-ro)' Feb 19 17:51:53 any chance can you change your procedure from yanking power to pushing the "power button"? Feb 19 17:52:49 HazeAI: The latter. Feb 19 17:53:40 HazeAI: Not that a forced sync will help you if you pull the plug during the sync or during the git pull, but it minimizes the window for data being in flight. Feb 19 17:54:04 (It'll also grind the machine to a halt while it's doing it, if there's a lot to sync) Feb 19 17:58:24 Great! Yeah, I am definitely training users to actually press the power button but I can't control folks 100% of the time, so I'm just trying to get the rate of occurrence down to something manageable Feb 19 17:59:04 I initially told people the risk of pulling power would be negligible (ugh, my own fault), and I've been trying to find the cause of these random corruptions for a good month now Feb 19 17:59:24 Didn't realize what it was until I flashed a fresh batch, then went back to test them, and most of their git repos were corrupted Feb 19 18:04:44 Fantastic, that seemed to do the trick. I've pulled the plug 5 times in a row now with no corruption. Thanks for your help infinity, ogra, and rcn-ee! Feb 19 18:04:58 mostly infinity ... :) Feb 19 18:05:23 since he doesnt have anything to do today :) Feb 19 18:13:07 *cough* **** ENDING LOGGING AT Fri Feb 20 02:59:59 2015