/srv/irclogs.ubuntu.com/2015/02/19/#ubuntu-arm.txt

HazeAIHello 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 with17:25
HazeAII 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 date17:26
HazeAIWhen 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 up17:26
HazeAIEverything else seems fine, but the contents of my git repo are all 0 byte files17:26
HazeAII 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 power17:28
HazeAIHas anyone else experienced anything similar?17:28
rbasakNot experienced that, but I'm curious. What filesystem are you using?17:35
rbasakAlso, have you tried a different SD card manufacturer? AIUI, much hardware lies about when they've really committed data.17:35
infinityHazeAI: A quick hack might be to throw a "sync && sync" at the end of your git pull cron job.17:35
rbasakAnd what SD card manufacturer are you using right now?17:35
HazeAII have Ubuntu flashed to the eMMC - No SD card in use17:45
ogra_well, forcing the sync is your best option then17:45
HazeAIThanks for the suggestion infinity - I'll test out adding "sync && sync" to my git pull cron17:46
rcn-eeHazeAI, do you also have it mounted as "noatime" ?17:46
HazeAIApologies 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?17:47
HazeAIAnd for adding sync && sync to my cron, do you mean: sync && git -C /usr/local/bin/marshal pull && sync17:48
HazeAIor : git -C /usr/local/bin/marshal pull && sync && sync17:48
ogra_mount|grep noatime17:48
HazeAIlooks like yes: '/dev/mmcblk0p2 on / type ext4 (rw,noatime,errors=remount-ro)'17:49
rcn-eeany chance can you change your procedure from yanking power to pushing the "power button"?17:51
infinityHazeAI: The latter.17:52
infinityHazeAI: 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.17:53
infinity(It'll also grind the machine to a halt while it's doing it, if there's a lot to sync)17:54
HazeAIGreat! 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 manageable17:58
HazeAII 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 now17:59
HazeAIDidn't realize what it was until I flashed a fresh batch, then went back to test them, and most of their git repos were corrupted17:59
HazeAIFantastic, 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!18:04
ogra_mostly infinity ... :)18:04
ogra_since he doesnt have anything to do today :)18:05
infinity*cough*18:13

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!