Ext4, Inline Data, Crypto AG, Sales Prediction

  1. Did I mention that ext4 inline_data works great? Yes, it does. And it's enabled now on most of the systems. Until I did hit system, which doesn't use separate boot partition. Oh joy, it seems that GRUB 2.02 refuses to boot the system, if the option is enabled. FCSK! Patch for this issue has been submitted ages ago, but it hasn't been merged into the official distribution. Ah. Ok, so much fun. Next question is how do I easily fix remedy the situation. I wrote a small script which does following. A) Copy all files from disk to alternate location, preserving all metadata B) Disable inline_data option C) Copy files back. Situation fixed. I'm just thinking if I could do in place replacement for the files. But this was one off case, and I had plenty of space to use, so it didn't matter. Probably it would have been enough to copy file a as file b and then simply renaming it over a when inline_data is disabled. Hmm, curious. Gotta test that. Hmm, doesn't seem to work on the fly, I'll need to re-test that with remount. Anyway, sometimes having issues like this are just great. It forces you to dig into different options and solutions in great detail. Which can be also called learning things. Anyway, during that testing I also found out that system has around 40k inlined files, which using 4k cluster turns into saving of 160 megabytes of disk space. Not that much after all. Naturally not worth of the hassle, this is probably the reason why the inline_data is disabled by default, and that's probably the reason why GRUB isn't updated either. But I'll still need to test that "fix in place" option, one way could be also just reading file, truncating it to zero, and writing data immediately back. While inline_data is disabled. Then even same inode reference would be maintained. Tested, in place data replacement using truncate doesn't work. But it's trivial to copy file to tempfile and then rename it back. But this works beautifully, I've also tested it: """find . -type f -size -128c -execdir bash -c 'cp -pv "$0" _inline; mv -v _inline "$0"' {} \;""", drop triple quotes, using Python formatting. Of course this is totally warranty void, shoot yourself in the foot solution, but it worked nicely. Sure, don't run this to root system which is mounted, always boot the system from secondary source, disable inline option using debugfs feature -inline_data and then run this. After this, if you're under lucky stars, you can run fsck for the volume, and it doesn't report that it has found any inline data, and doesn't turn automatically the inline_data option back on. After this you can boot the system again, and grub now works with the ext4 volume. Sure, official why did you do it stuff. Well, maybe I did just it because it can be done? You can also exclude specific paths from the operation using \( -path "./no_inline_data" -prune \) with find. - Final words, it worked. - It's so nice to have proper file server on network, so you can dump full system images before doing anything hazardous. Yet I don't usually bother doing it with test systems. If things blow up, re-install is simple and quick task. But that would leave so many questions unanswered. kw: ext4, undo inline_data, GRUB, boot, fail.

  2. How the CIA used Crypto AG encryption devices to spy on countries for decades (@ Washington Post)- Hardly anything new. I'm guessing similar projects are currently running as well as many other projects in history, which just haven't been revealed. But that's part of that business. But the encryption history aspects of this article are really nice. Makes everyone think twice when considering NSA designed crypto stuff. - If discovered, be “easily masked as implementation or human errors. - Yeah, what shall we learn from history?

  3. Worked hard on complex sales prediction integration. Unfortunately I can't tell anything more about that. But sure, it's good to know how your future sales will be. I wish I would have similar system for stock market.

  4. Stuff above is like living dangerously. Wanna faster ext4, disable journal and barriers. Increase commit time to something insane and then start hitting reset randomly. Are we having fun yet?

2021-02-07