2014-08-24

I love citadel

Mail servers are a mess. There may be distributions out there with a good default configuration. Any deviation from there and you just want to run back to gmail.
There are, at least in my mind, 2 alternatives, which make any sense whatsoever:
citadel and kolab. kolab is the whole stack postfix, smtp auth stuff, imap, caldav, carddav, ldap, roundcube and whatnot stuck together. I'm quite sure it's a great thing once you got it running and it has everything I want. However there is no good ebuild for gentoo and the last time I tested it on a debian? ubuntu? virtual machine it asked for 10 to 20 admin passwords for different services until I lost track of what was working together with what.
citadel on the other hand is an old bbs evolved to a mail server (or groupware). It has a lot of those features as well, but the web interface is a little clunky / dated. Also its cal- and carddav interface doesn't work (at least with kde's kontact). There are a lot of features in there like message boards, blogs, chat rooms, xmpp server and so on, but what I really like is that its a mail server that is easy to install. It just wants to know an admin account, a couple of ports and a domain and you're good to go. spamd and clamav are just a enter-127.0.0.1-here away. There is sieve support, both scripting and simple rules you can click together. And as a bonus if you have admin privileges you can just enter more email addresses into your own contact information and you will start receiving on those addresses as well, thats easy aliasing for once!
So it took me at max half an hour to get it up and running to the previous state instead of weeks.

I love syncthing a little and I distrust owncloud a lot

So After my server crash I had to reinstall owncloud and then resynchronzie it. Well thats a crawl and I only have around 2.5GB, just the important stuff, not music and cat pictures ;)
I had a talk with a couple of friends and one was looking through the database of owncloud, and what he found scared me a lot. It seems owncloud uses lots and lots of tables but without any sense: usernames, groupnames and so on are saved in tables with one row (or field if you like the term better) ... varchar. So what happens when a user- or groupname is changed? Yes, owncloud has to go through all the tables and change every entry containing the name. And hopefully it doesn't miss anything. yak. I made better databases when I was 12 (and I learned it during an MS Access class in the adult education centre).
Another problem I have is the follwing: A couple of weeks ago my server had to reboot for a kernel update. After the reboot a lvm volume didn't get mounted. It was the volume with my owncloud data. How that happened is mostly irrelevant, the point is owncloud synced my "data" from the server and before I knew it, both my desktop machines had deleted everything from the owncloud folder. Since owncloud doesn't do any versioning I was really lucky that I could just mount the volume and reindex (which is not guaranteed to work or to not destroy your data!).
As I said, I got scared, that is not the alternative to dropbox I'm looking for.

Enter the world of syncthing. Basically it is an open source alternative to bittorrent sync. Currently it is at version 0.9.6 and seems stable enough. The lansync is quite fast and the upload to the server a crawl, but that's a problem with my upload speed, not with the software. Sure, there is a still a lot to do, like a native interface instead of the local webserver, a try icon, not showing a ms dos console on windows, an android app (though there is one in the making), but all in all I trust in it a lot more than in "I want to be a whole cloud with contacts, calendars, microsoft document editing, media player, everything in php and on a database that doesn't deserve to be called one" - owncloud.
To be really happy all I need is a webapp on top for up/downloading files via browser (suggestions very welcome) and an android app. Everything else is just make-up.

EDIT: I forgot to mention that syncthing has versioning: Both easy mode (keep $number-of-versions) and timemachine like (every minute the first hour, every day the first week...). Also it has a mode to protect a master-machine from changes.

2014-08-23

mdadm + lvm + dead harddisk = cluster-f-up

So another rant and this time it's not about ssl! I promise! really!

So there were two nice disks in my server. What do we do with disks in servers? raid of of course! Data must be safe an all... But since this server is on the cheap side of things, it doesn't have a (true) raid controller. So what do we use anyway? mdadm of course. and lvm on top, just for good measure. Actually we used it to seperate some stuff like user homes, certain data, just so we don't wake up one day with our server unable to boot because of some runaway 300GB log file...
Then one of the disks died. But hey, we have a raid right? One support ticket and five minutes later the server has a new disk and isn't booting. Well, the bootloader was on the first disk, so fair enough, lets sync the boot partition (on a seperate raid) first and lets do the rest later without downtime.
me: So how does one go about removing absent disk from a software raid?
mdadm: NO.
me: What?
mdadm: NO. JUST NO
me: But the disk isn't coming back, I just want to...
mdadm: NO.
me: okay, mdadm if you don't want to remove it fine, just take another one on top, will you?
mdadm: Fine, but I will only take it as spare :P
me: enough already, I'm increasing your active disk number to 3.
mdadm: Wait, I'm confused, now I have 1 working disk, 2 disk with the same id as the working one, but they are missing, and 1 spare.
me: wtf?!
me: internet to the rescue! *google*
internet: erm, well, nope.
me: really?
internet: well, you could just re-create the array and then add the new disk. only solution add all.
me: seems kind of dangerous, but everyones talking about no dataloss
one reboot later...
me: raid: go!
raid: ok
me: lvm go!
...
me: lvm?
...
me: god dammit!
some hours later I was looking at binary dumped raid headers in vim in hex mode, diffed side by side. let that sink in for moment. there were some insignificant differences between the working version without data from the new spare disk and the not working version with data from the old disk. differences like creation date or uuid. nothing a one-disk-present-one-disk-missing-newly-created raid should stop from spewing up it's contained lvm.
After that I dumped the first 500mb of the disk, vim, hex mode again, and looked for the lvm header itself. first good message that day: it was present. I could even pinpoint it to the byte on disk. However pvck (lvm fsck-like tool to check for lvm headers) did not find it, however much I told it where to look.
Well that's as far as I got before saying "screw it, I'm using btrfs with integrated raid and subvolumes and safe the data later".
Then I reinstalled Gentoo, quite smoothly.
Except for ssl certificates of course, they still suck, but I promised not to talk about that again. This time.

There and back again

Hello my dear readers,

yes you, all of you ... 3 or 4 ;)
After a journey via octopress, probably something(s) else and wordpress on my own server I'm back here. Why? Well, f'ed up. More on that in the next post, however one thing is clear to me now:
Since I don't use the pretty code rendering of octropress anymore and the data is public anyway using my own server is just a matter of pride. And that got a lot of my posts deleted or at least into digital limbo. So why not just host it here, where it's probably safe from accidental server crashes and probably also from nuclear wars? Well I don't know either anymore, so back I am.

2012-07-23

blog relocation

I relocated my blog to my own server. It is now based on octopress, so code should look waaaaaay prettier :)
please follow the link and don't forget to update your rss feed:

no-trust.org/flatline/blog

2012-07-07

webapps and language

hello socializing people,


i was just playing around with a social integration chain of youtube -> twitter -> facebook which works pretty neat now. There was just one problem: Since youtube is displayed in german by default since I life in germany, so are the automated posts that say i liked / favorited / whatevered a video that get sent to twitter and from there to facebook. But I have some friends who don't speak german and I generally like to use english anyways when it's public. The trick was to tell youtube to display itself in english, which claims to only affect the interface but as I guessed right: It also affects the text that's auto posted :)

2012-07-05

getting Command & Conquer: Red Alert 3 (Steam) to start up

Hello gamers,

yesterday I bought C&C: Red Alert 3 on steam sale. After downloading though it wouldn't start. It just sat there with its fancy splash screen, occupied 25% of my cpu (conquer alright!) but didn't start up. At first I thought it may be a problem with the steam version, but there were only problem reports about multiplayer and mods. Someone with Windows 7, 64bit version also claimed to have it running, so that couldn't be it either. *But* the game was build for Windows XP / Vista (32bit only!) which gave me the idea to screw around a little with the compatibility settings.

SOLUTION:
Start as Administrator / Set it to do so every time:
go to your steam folder, then to RA3, i.e.:
C:\Program Files (x86)\Steam\steamapps\common\Command and Conquer Red Alert 3\RA3.exe
right click -> properties -> compatibility -> run as an administrator
then you can just start it right from steam