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

partially qualified domain names, OS X Yosemite v10.10.1

Apple broke DNS compatibility towards partially qualified domain names with the latest OS X release. On Nov. 18th they released an update with a patch to this issue (since I spent the time to escalate it). From release notes I quote:

Allows you to append search domains for partially qualified domain names when performing DNS lookups (consult the discoveryd man page for more information)

How was it supposed to work? And how can we activate it?

If you are a big corporation you are going to have a very complicate and hierarchically designed DNS system. Sometimes you just want to shorten the amount of data you type in to jump from one box to another, so… taking as a sample the Akamai mirror of you’ll see that will CNAME to Imagine you are working for Akamai, and you need to ssh into e3191.dscc , without the partially qualified domain name feature you’ll have to type in the full fqdn. Instead, if you have in your domain search field, you don’t have to, your resolver will do it for you.

So, on OS X… I quote from my Apple Support guy’s email:

You can edit /System/Library/LaunchDaemons/ and add ‘–AlwaysAppendSearchDomains’ as a string to the ‘ProgramArguments’ array. That should re-enable search domains for PQDNs once you reboot after saving.

I add… you can simply “sudo launchctl unload /System/Library/LaunchDaemons/” and “load” to refresh the daemon after having edited the file, without rebooting your laptop/workstation…

enjoy 😉

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! 🙂


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

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:


grafi e dintorni

non provate a creare (in python e con primitive standard, mentre con le ctypes potrebbe funzionare) una matrice di adiacenza per un grafico di 250mila nodi… e’ un filino troppo grossa… 😀

…ovviamente ho dovuto killare il processo. Ok che OsX e’ figo, ma vi sareste fidati a continuare a lasciar swappare un processo da 10Gb ?

+ + +

[EN] adjacency matrix (with standard python primitives) for a graph of 250.000 Vertex ? FAIL!

* * *

p.s. it might be my implementation… this is the initialization of the datastructure…

tot = 250000
adj_matrix = [[0]*tot]*tot

…but it was not behaving correctly, so I switched to a for loop with append() … which was giving then problems with memory.


bipartite graphs” (or graphs in general, and oo-implementations), any suggestion of good books to buy?

+ + + update

Last login: Wed Dec 23 16:58:14 on ttys002
grinder:~ zeph$ sudo port install boost

and recovered the book from “Informatica 3” … :
A practical introduction to data structures and algorithm analysis, JAVA EDITION“, Clifford A. Shaffer

…digging into the hole of the white rabbit 😀

p.s. this was the red pill… Puzzle Master, “Liar Liar” puzzle

p.s.(2) a big thank to my gf Maria, student of philosophy, which pointed to me the “Liar Paradox“… I would have been still having headache trying to sort out the splitting algorithm without her hint


related to: “extreme compression

grinder:msm.git zeph$ ./gmsm 90575_exp90575.txt 90000_exp90000.txt
reading… 90575_exp90575.txt
a: converting to int()
reading… 90000_exp90000.txt
searching the bigger suitable divisor
selected the 1^th number of the serie
b_size: 445883
c_size:3100, r_size:445881
…writing results

-rw-r–r– 1 zeph staff 448983 Apr 12 18:33 90575_exp90575.txt
-rw-r–r– 1 zeph staff 448985 Apr 13 19:12 90575_exp90575.txt.msm

non ho compresso nulla… e i resti sono enormi…
comincio a dubitare della mia idea

in compenso mi sono divertito con python… (magra consolazione)

i sorci sono disponibili qui: Math Series Mapping

p.s. per chi volesse farsi del male e “misurare” la velocita’ del proprio pc puo’ provare il generatore di numeri di Fibonacci che ho codato per l’occasione… e’ un buon modo per far andare la CPU di quel nuovissimo pc che vi siete presi, tanto con WORD non lo metterete mai sotto carico come si deve 😀