device unbind

I don’t like writing about things I didn’t do. But in this case my colleagues at OLX are mentioning I shall document it, for others. We were in trouble with an EBS volume on AWS as we had 2 of them attached to a box, one supposedly released but not completely.

From AWS Web UI we saw that the device was released, but in the box we could still do the listing of the content of the mounted device. It was RO though… but still, unclean situation.

We first cleared the filesystem in memory cache, and at least that removed the data from within the filesystem tree structure… but we could still fdisk list the device… at this stage I went for the latest escalation solution in this domain… call Alessandro Rubini, co-author of Linux Device Drivers.

Solution suggested… go into /proc/sys device folder “xen”, then folder related to the device module “blkblock” or something similar… then in there, there were 2 symlinks, with the name/alias of the devices… this is basically the reference in memory of the mapping between the module and the device… it is kept in the MODULE_DEVICE_TABLE data structure. Echoing such string (unique to the device) into the “unbind” special file which is in the above followed folder, releases the datastructure and therefore the device without having to unload the module. There was another healthy device held by such module, therefore we couldn’t unload/load it to flush its state.

$ ls /sys/bus/xen/drivers/vbd/
bind module uevent unbind vbd-12345 vbd-98765
$ echo  vbd-98765 >/sys/bus/xen/drivers/vbd/unbind

Third Async Cats Meetup

incontro berlinese sulla gestione di team remoti

Async Cat Herding

Our third meetup will be slightly unusual in that instead of being a brief lunch session we’ll try and bring enough speakers together for an afternoon session. The idea was born at Europace: After our last meetup Stefan Rudnitzki approached me the idea of hosting a “complete afternoon meetup all around innovative management techniques over at Europace”. We quickly picked a date, reached out to interesting speakers and booked the meetup space.

Please make sure to register online.

As at least some talks will be German only, as such the announcement will be kept in German below.

Innovative team management techniques Meetup @ Europace

Hallo zusammen,

die Europace AG plant gemeinsam mit Async Cat Herding am 28. Februar 2017 einen Nachmittag rund um das Thema innovativer Team Management Methoden. Das Ganze findet bei der Europace AG (eine Tochter der Hypoport AG) in der Klosterstraße 71 in Mitte statt. Euch…

View original post 398 more words

i2c_hid & cryptdevice

you’ll find lots of people complaining about luks, cryptdevice, grub and a damn usb keyboard… now, the fun comes with new laptops like the one i’m playing with

first of all it has on board a cursed SoC called baytrail (renamed bayFAIL by most of the people on the internet) …. second, well…. whatever… you are on your own … as me, as always

the laptop is a Lenovo 100S, it comes for 199EUR off the shelf in any electronics store in Germany… and to install, go straight to a Debian Testing amd64+i386 DVD iso… to be dd-ed onto a usb stick. Don’t use a non-multiarch installer, the EFI will be ur enemy. It won’t boot 😉

so…. the solution for the damn keyboard… once installed… and once you logged in with an external usb keyboard is to modify the /etc/initramfs-tools/modules and add the following:

i2c_designware_platform
i2c_designware_core
i2c_algo_bit
i2c_hid

then just type:

update-initramfs -u

and reboot

…yes, you are welcome

Hadoop Summit 2013

k, k, k… after 2 days in Amsterdam, for the first european edition of the Hadoop Summit, I finally realised that most of the obstacles I encountered working with HDFS > HBase > Hive were due to the edge use case I was putting in practice

1) very few people use Hive over HBase

2) even less people use HBase’s Thrift interface (apart of Facebook)

they are all very powerfull instruments, but here I have to quote my current project manager… “u do not pay licenses, but u need the most expensive people on the market to have it running”

more details here… if u wanna try it out (pumping a MySQLdump into Hadoop) https://pypi.python.org/pypi/SqlHBase/0.1

Maildir server on OsX

hi nerds! anyone fancy of having his/her own portable Maildir backup? I’ve created a homebrew package for courier-imap (and courier-authlib). Would u mind testing it? I want your feedback! 🙂 https://github.com/zeph/homebrew

UPDATE: https://github.com/mxcl/homebrew/pull/16354

SECURITY CONCERN! :: edit the etc/imapd in order to bind only to 127.0.0.1

to start it:

sudo authdaemond start
sudo /usr/local/Cellar/courier-imap/4.11.0/libexec/imapd.rc start

and use ur normal sys credentials (and point ur config in the email client to “INBOX”)

p.s. u might need to created the Maildir folder in ur home dir … use:

bin/maildirmake

Why opensource?

Start from a specific situation: you are on a tight schedule, with pressure from management to approve or prove an issue on the software release being tested, and the counterpart R&D team blames you that the metrics are wrong. Actually, you check the application and they are right… looking into the source code u see the bug, u fix it, and within hours u are back on the main business, finalizing the testing activity. Now, what would have happened with a proprietary testing tool? You couldn’t have checked the code. You would have had to argue with the ur R&D team about the existence of the issue, and with the vendor on the other side. Project would have been delayed or QA totally skipped, with all the risk it takes having a potentially broken release in production. Is it worth the money of the proprietary tool? I preferred to convince my management to spend in R&D resources in my team, and get a solution we could trust. It has proven to be a good choice

Tags: , , , , , , ,

Powered by Qumana

subqueries do not get cached

WTF???

…the cache is not used for queries of the following types:

* Prepared statements
* Queries that are a subquery of an outer query
* Queries executed within the body of a stored function or trigger

http://dev.mysql.com/doc/refman/5.0/en/query-cache-operation.html

+

For certain cases, a correlated subquery is optimized. For example:

val IN (SELECT key_val FROM tbl_name WHERE correlated_condition)

Otherwise, they are inefficient and likely to be slow. Rewriting the query as a join might improve performance.

http://dev.mysql.com/doc/refman/5.1/en/correlated-subqueries.html

I have 5 nested views… from 1 to 4, I have GROUP BY, ORDER BY, JOIN of the data over themselfs and other amenities… and on a ~2milion rows table, it doesn’t take more than 14 seconds…

the last view… has a subquery… evaluating the data related to the “currently evaluated row”, looking on the same table for values of “the same group”… and it gets DAMN SLOW… cause the “query cache” mechanism of MySQL does not kick in

k, tomorrow morning I go for the rewriting… I’ll create a VIEW about the data I need to be correlated, and I’ll JOIN it… let’s see 🙂