Fuck you, probability!

So why do we nerds use NAS/Server storage with RAID systems? Because we know hardware can fail, especially mechanical hardware.

And there are different variants of RAID (redundant array of independent disks) systems

  • RAID 0 (All disks just appear as one)
  • RAID 1 (One disk is mirrored to another one)
  • RAID 10 (Half of the disks is mirrored to the other half)
  • RAID 5 (Redundant parity information is stored so that 1 out of N disks can fail without data loss)
  • RAID 6 (Same as RAID 5 with one additional spare disk, so that 2 out of N can fail)

Back to topic, why am I writing ‘FUCK YOU, probability’?

The idea for RAID 5/6 came out of the typical probability how often a mechanical disk may fail. So if you’re almost paranoid you’re choosing RAID 6 for your Data to be ‘absolutely’ sure you won’t loose data.

Yeah, of course, until you come to that point, like me, when over a fucking weekend 3 out of your 5 disk RAID 6 system fail.

(more…)

Rescuing data from a damaged Windows HDD pt.II

When I did and wrote the first post I did not know of ddrescue.

And it worked like a walk in the park, it just took eight and a half hours…

/tmp # ddrescue -d -r3 /dev/sdd2 blah.img blah.logfile
GNU ddrescue 1.21
Press Ctrl-C to interrupt
     ipos:  113173 MB, non-trimmed:        0 B,  current rate:       0 B/s
     opos:  113173 MB, non-scraped:        0 B,  average rate:   5280 kB/s
non-tried:        0 B,     errsize:    1362 kB,      run time:  8h 28m  5s
  rescued:  160990 MB,      errors:     1259,  remaining time:         n/a
percent rescued:  99.99%      time since last successful read:      1m  6s
Finished

Just 1362kB couldn’t be recovered. Everything of importance could be viewed/retrieved. Perfect.

The Browser Struggle

I were a long-time Firefox user because of the unique addon called ‘tree style tabs’ and this browser is still the only one implementing this feature the right way.

Basically there’s no alternative, period.

So now I’m facing the problem that Firefox gets slower and slower.

First of course I’m a tab whore, 50-100 tabs are normal, because I also use tabbed websites for some kind of ‘read-later’ feature. Tree style tabs come in handy here, because you’re able to collapse a tree and forget it for some time until you need those tabs again. So this is the explainable slowdown of my so beloved Firefox.

Second, it gets slow loading websites – wtf? – that’s not really explainable, all other browsers I’ve tested, even with alot of tabs still load pages fast. And Firefox has even the feature (also with plugins) to not load pages until you activate them. So a lot of concurrent page loadings can’t cause that slowdown.

Last but not least, Firefox is eating ALOT of RAM, I even got problems at my workstation @work with 16GB RAM, swapping like hell. Of course the browser isn’t my only application running… but when you read the stats and the browser is eating more than one third of your memory you’re beginning to ask questions…

So I just do not get around the fact that I have to find another browser supporting my needs. That goes so far that I’m really going beyond my so fuc**ng needed tree style tabs plugin and that I’m ready to ditch it. (more…)

Jenkins Pipeline: using string keys of a map to unstash artifacts in a loop

Just using my blog as my permanent public notepad.

def my_keys = build_result.keySet() as List;

for (int i = 0; i < my_keys.size(); ++i) {
  def key_to_unstash = my_keys[i];
  print 'Unstashing ' + key_to_unstash;
  unstash "${key_to_unstash}";
}

my_keys = test_result.keySet() as List;

for (int i = 0; i < my_keys.size(); ++i) {
  def key_to_unstash = my_keys[i];
  print 'Unstashing ' + key_to_unstash;
  unstash "${key_to_unstash}";
}

 

 

Rescuing data from a damaged Windows hdd

A neighbour talked to me on the street lately that his laptop hard disk may be damaged, because his laptop didn’t even boot anymore. The data on the disk is important to him so he asked if I may take a look.

So that’s what I did with this hdd, a WD 500GB.

  1. Put it into my harddisk docking station and checking if my system recognizes the hdd.
    • Yay. At least the partition table isn’t damaged, and it’s not a headcrash. I can access all partitions and mount them.
    • Ohoh, Windows partition damaged! SATA read errors on this one, so maybe damaged blocks. (used dmesg -w)
    • Backup partition readable without erros and transferred all data to another disk.
  2. Attempt to rescue data from the damaged partition
    • *Uses dd magic* {dd bs=1M conv=sync,noerror if=/dev/sdd2 of=/media/data/win7.img}
    • After dd has finished, setting up the loop device ({losetup /dev/loop2 /media/data/win7.img}).
    • Generating a vmdk for virtual box to be able to load the image as a disk for my Windows 7 VM.
      • {VBoxManage internalcommands createrawvmdk -filename /tmp/test.vmdk -rawdisk /dev/loop2}
    • Starting the VM and let windows do the task of repairing the damaged ntfs partition, let’s hope there’s something to rescue after that step…
    • … while waiting for that step to finish, my neighbour brought me his 3TB external hard drive to transfer the data on.
      • Which was formatted with FAT32 *sigh*, saved the data, reformatted to NTFS and copied the data back.
    • The NTFS chkdsk took almost more than 72h!
    • And after that 72h, nothing useful was there to rescue. The “User” folder was just empty. 🙁
      • Well, after a second look some days later i remembered that windows ntfs chkdsk saves data in “found.000”, so i checked that again and found at least some files which were recovered, hopefully enough for my neighbour. 🙂
  3. finish.

 

6 years, finally my PC system is too slow.

In November or December 2010 I bought a i7 950 with 3.0GHz, over time I upgraded the RAM to 24GB and the graphic card stopped at a nvidia GeForce 760 GTX. Six years of well enough performance for everything I could think of, programming, 3D graphics, gaming.

Finally this is over.

I bought Deus Ex: Mankind Divided (err.. yes I know that this game is a graphic whore!) and realized that even on low graphic preferences some scenes result in a dia show, despite other completly fluent parts. And because of that stuttering combat parts I gave up playing on my current machine.

Thinking about new PC components now…

Qualys SSL Labs: SSL Report: A+

Yes, I’ve got it back!

After my ssl certificate provider startssl.com upgraded the root certificates with the power of SHA256withRSA instead of SHA1, I’ve got my A+ rating for SSL secured websites back.

Here the link for verification: https://www.ssllabs.com/ssltest/analyze.html?d=mmo.to

With the upgrade of my account at startSSL on May, 28 I could create a new certificate which gained all the benefits of the upgraded signature algorithm, so to say, not rated ‘weak’ anymore. 😀

Why I did not check my rating earlier? Well, lazy?! Other more important tasks to do?! 😛

Elliptic-curve cryptography for TLS certificates still not quite usable

Today I tried to just chose a elliptic curve for my TLS certifcate which I thought to be suitable, but was very disappointed about the browser support for those curves. I generated a key with a 521 bit curve but realized afterwards that browsers like M$ ones and chromium (wtf?) only support two curves recommended by the NSA.

Okay, sorry, I don’t really care what the NSA recommends, but I can’t put some major browsers before the doorstep. Well, so I reverted back to the 4096bit RSA key, because of the wide adoption.

Maybe I’ll provide a key with P-384 later on.

You know, you’re thinking about some future proof solution, at least for some years, but you’re stopped by slow technology adoption… quite disappointing.

At least I still got my A+ on ssllabs.com:

https://www.ssllabs.com/ssltest/analyze.html?d=mmo.to

Some links:

Gitlab-CI and how to safely build docker images

Well. That was some hard time to get that running.

These ways of building docker images with gitlab-runner(s) can be found online:

But no one mentioned just using a bare gitlab-runner on your server with standard shell access and the gitlab-runner user added to the docker group. In the end it’s the simplest variant and the most obvious from my view but not the first propagated.

I tried the whole bunch mentioned above only to fail after hours of playing around, so I chose to get back to good oldschool gitlab-runner-without-docker and voila, everything runs smooth.

 

Microsoft, Windows 10 and the paternalism of users

Attention: This is a rant, with some swearing…

Yes, Windows 10 is here…

… and Microsoft desided to force users to install ‘the wonderfull free upgrade to Windows 10’. So my father was punished by an automatic  install.

The update system wasn’t even asking him. He went away from his PC and came back some hours later only to find his system already installing the new operating system.

Well. After the installation he declined the new licensing and got his Win7 back, at least that went smooth, but in my opinion microsoft should be charged for the lost hours of waiting for install/deinstall of this shit called Windows 10.

And just after restoring Win7 a window popped up and said it would install Win10  within 1 hour again, so when you’re just gone because your wife needs help for whatever, you’re again punished by a installation of Win10 you did not want. Only by choosing first to postpone and later to deactivate (after 3 or 5 different dialogues) he could avoid to have Win10 again.

Microsoft: Why the fuck do you force users like this? Are you so dumb to think, that everything on the users Systems is ready for Win10 ?!

Maybe there are compatibility issues with EXPENSIVE programs like Autodesk Inventor/3dSMax/Alias Wavefront and similar tools for PRODUCTIVE work?!

Hell, I could sue you for this, it’s so … so… ….. ….

To sum it up: You guys at Microsoft, who decided this shit – You are god damn assholes.