Skip to content


Filesystem issues and django-couchdb work

Last night, when shutting down my laptop (which had been up for quite a long time because of suspend/resume niceness), it crashed. I don’t know what exactly happened: pressed the GNOME’s logout button, applications were closed, until only my background was visible, then the system locked up, so I suspect my X server (some part of it, GPU driver (fglrx) might be the bad guy). I was able to sysrq s u o, so I thought everything would be relatively fine.

This morning I powered on my system, and while booting, fsck of some partitions was taking a rather long time. It’s pretty normal fsck was taking somewhat longer, but not thát long… I’m using JFS on most logical volumes.

When the consistency check of my /home partition was done, a whole load of invalid files was displayed and later on moved to lost+found: 34068 files. Once booted, I scanned my filesystems again, rebooted, logged in, started X. Everything started fine, until I launched Evolution: it presented my the ‘initial run’ wizard. Other issues (on first sight): all Firefox cookies were gone, and Pidgin’s blist.xml was corrupted. When using my old computer (which had frequent lockups on heavy IO usage) these last 2 issues happened a lot too, which is highly annoying, especially the blist.xml thing as I can’t see any reason to keep this file opened for long periods?

Luckily I was able to get my Evolution up and running again by restoring it’s GConf settings and ~/.evolution using some old backup (15/10/07). I guess I should backup more regularly… Next to this I hope I won’t find any other corrupted files, so the ones in lost+found are just Evolution email files and Firefox caches.

Anyway, here’s a screenshot displaying some of the initial and hackish work I’ve done this evening on integrating Django and CouchDB as I wrote about yesterday:

Django and CouchDB first shot

As you can see, currently I’m able to edit fields of an object. There’s one major condition: an object with the given ID should already exist in the ‘database’ which makes the current code rather useless, but hey ;-) I’ll add object creation functionality later tonight or tomorrow.

Current code is very expensive too, doing way too many queries to CouchDB, mainly in client.py. This most certainly needs work.

Upgraded my WordPress installation to the latest release, 2.3.2, in about 5 seconds. Got to love svn switch (although maybe I should start using git-svn for this installation too and git-pull the release branch in my local copy).

Posted in Development, Linux.

Tagged with , , , , , , , , , .


9 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.

  1. Eduardo Padoan says

    Great work so far!
    KeyError i an important part of he ict interface. IMHO, 404 errors should be translated to KeyErrors on the _Database class.

  2. Nicolas says

    Had to think about it a little, guess you mean dict interface ;-) You’re right… The client class most certainly needs more work. If you got more ideas, please let me know!

  3. Ka-Hing Cheung says

    Pidgin doesn’t keep blist.xml open forever. There’s a patch applied relatively recently that deals with some XFS issue, which may or may not apply to JFS:

    http://pidgin.im/pipermail/commits/2007-November/006688.html

  4. Nicolas says

    Ka-Hing: a guy called Eduardo Pérez pointed me at this code by mail too. I’m running 2.2.2 now, should check whether that november patch is in it already. If not, this should indeed fix the issue. Thanks for pointing out!

  5. Ka-Hing Cheung says

    2.2.2 is released on 10/23/2007: http://pidgin.im/ChangeLog

    PS: your page makes scrolling in firefox really show

  6. Nicolas says

    I see. Guess I should update.

    About the FF issue: no problems here… Didn’t try on any other machine yet, though *oops*

  7. Paul says

    Hi Nicolas,

    first off, thanks for kicking off some Django-CouchDB integration. Is it something you are going to develop further? I’m new to Python, Django and CouchDB, so I’m not confident in being able to carry on from where the code is at at the moment, though I will definitely be not too long from now.

    What would be of great help to me would be a working example application. The current one is empty.

    On a final note, I think Django for its templating system, and great capabilities with relational databases, along with CouchDB for non-relational data looks very interesting. I hope that you are able to get your code into Django trunk at some stage!

  8. Nicolas says

    Paul: I haven’t looked at the code for quite a while, don’t need it myself either anymore. I think what’s in my git repository is the latest code I got, I’ll check later. Take it, (ab)use it, share it ;-)

  9. Paul says

    Okay Nicolas, I’ll let you know if I make anything with it.



Some HTML is OK

or, reply to this post via trackback.