How to mount RAID1 volume on Ubuntu

If you ever need to mount an encrypted partition from a RAID1 NAS on your Ubuntu system (like a laptop or a different server) here’s a simple three steps instruction. Figure out what partition needs to be mounted (you can do it by running parted or similar to figure out what your target should be); for the sake of the example it will be /dev/sdd2. And now:

% sudo mdadm –assemble –run /dev/md0 /dev/sdd2
% sudo cryptsetup -v luksOpen /dev/md0 mapperpoint
% sudo mount /dev/mapper/mapperpoint /mnt/external/

If you need to check the state of the drive while connected via USB enclosure, run

% sudo smartctl -aH -d sat /dev/sdd

The only trick is to add -d sat disk type.

Or to simplify the whole thing, just run Disk Utility and click “Start RAID” button 😉

Finally upgrading from Debian Lenny

If you like me was putting of an upgrade from Debian 5.0 Lenny you might find yourself blocked out, because ftp.us.debian.org/debian/dists/lenny doesn’t exist anymore anywhere on the US mirrors. However, I needed to do one last update before getting on dist-upgrade. 

Luckily enough I was able to find a mirror in Germany which still has Lenny dist around. So, if you find yourself in my shoes edit /etc/apt/sources.list on your system and replace 
 ftp://ftp.us.debian.org/debian/
with
 ftp://ftp.de.debian.org/debian-archive/debian/

then do usual update and then an upgrade. Good luck!

Mark Twain and data science

When I look at data science nowadays it reminds of

In the space of one hundred and seventy-six years the Mississippi has
shortened itself two hundred and forty-two miles.  Therefore … in the Old
Silurian Period the Mississippi River was upward of one million three hundred thousand miles long … seven hundred and forty-two years from now the Mississippi will be only a mile and three-quarters long.  … There is something fascinating about science.  One gets such wholesome returns of conjecture out of such a trifling investment of fact.
                 Mark Twain

I don’t know why…

Smart-ass recruiters out there….

An spam-email from a recruiter (target company name isn’t mentioned _anywhere_):

   I came across your resume on Dice and would like to talk to you about
   a Hadoop Engineer position with our client, which is a Fortune
   10 company based in Cupertino, CA. This is the largest and most
   valuable consumer electronics/technology company in the world today
   which makes cutting edge smart phones, personal computers & music
   players. 

Now I wonder which one of us is an idiot?

Git is absolutely fabilous, of course

After using git for like 5 years – and shall I say I know most of the tricks in the book and outside of the book 😉 – I still find some neat things in it, that please me immensely in spite of being simple.

I am doing this Gradle implementation of Apache Bigtop build system and thought that would be about time to split one Gradle file in two: separation of concerns and all that stuff. So, naturally I have fired-up IntelliJ IDEA, did some splitting, and copying, and other things. Got all my functionality working to the same extend as it were. And now it is time to commit: I have original build.gradle and new packages.gradle files. So,

% git commit -a -m ‘Separating build logic into its own module’

[BIGTOP-1201 f319b55] Separating build logic into its own module
2 files changed, 53 insertions(+), 429 deletions(-)
rewrite build.gradle (90%)
rename build.gradle => packages.gradle (90%)

Seriously, how smart and cool is that?