My NAS Part 01 – Cooking something up

This series of posts will follow along as I build my very own NAS. In this first part I’ll talk about some of the things that happened up to this point.

As clever readers of my blog probably noticed already — I like NAS systems. I was so fond of them, that my first post in 2008 basically said “I’m going to build one”. Now, one year later it’s slowly coming along.

I tested some basic hardware components over the last few weeks and received the case I opted for today. The case itself is a Sharkoon Rebel12 Value Edition, a relatively cheap, big case for ATX boards. It features a large number of 5.25″ bays, so there’s a lot of room for expansion — or is there? Unfortunately Sharkoon had to place steel guides at each bay, normally not a problem if you just want to insert a CD-ROM or DVD drive. But for a SATA backplane module, this easily becomes a lot of hassle.

I ended up cutting the steel guides with a hacksaw since I won’t need them anyway and trying to bend them was a phenomenal waste of time. Now the backplane fits perfectly into the case (just as intended) and I’ve thrown the ol’ hardware from my small fileserver into the new case to test it. I’m quite pleased up to this point, although my hands are incredibly sore now.

There is plenty of room in the case, making the mounting of the mainboard a breeze. The PSU goes in the bottom of the case, a strange decision but makes changing the darn thing very easy, so it is highly appreciated.

The only thing I will probably have to change is the front-panel fan: It blocks 3 bays – way too much. As soon as I receive the Scythe fan I ordered for the back of the machine, I’ll give this a try. The SATA backplanes do have fans as well, so I hope ventilation won’t be that much of a problem.

Next week I’ll mount the second and third backplane into the machine — unfortunately I won’t be able to use them, though. As long as I miss the new mainboard, CPU and SATA controller there’s only two SATA ports onboard. But oh well, the hardware does come from an old machine, so I’m thankful it does work after all that hack and slash I did to the case and it’s hardware.

Pictures will follow!

Howto: Run Vector Magic Desktop Edition with Wine

Vector Magic is pretty cool. I loved the project back in the days when everyone could use it for free and was happy to see that they started providing a desktop client after going commercial. Even better: The client is utilizing Qt so we have a Windows and a Mac version. But nothing for Linux.

Don’t fret, of course you can run this application with Wine:
The only thing to notice here is that you need to set your Windows version to Windows 98, otherwise the application will always go haywire when loading a picture.

vectormagicwine

All features are working perfectly, no native DLLs needed.

Howto: Fix Wuala’s Copy & Paste on Linux

If you’re using a recent KDE version you’ll notice that Wuala’s Copy & Paste feature doesn’t really seem to work anymore. Instead of using the contents you specify within the application (say, files and folders) it’ll always use the contents of Klipper.

That’s pretty annoying if you don’t know that the contents does indeed come from Klipper. So, just clear your Klipper history and you should be fine.

Wuala Web Downloads

Wow, now that’s quite an update. Now you can download public files as well as password-protected files from the web. Share all your stuff with friends around the world in a safe, quick way. Great stuff that makes Wuala even better 🙂 .

Of course, that means you can download the API wrapper straight from the web as well and don’t have to mangle around with subversion anymore 😉 .

Using the Wuala API .net wrapper for quick in-folder search

An interesting question that came up to me was how to implement a quick, efficient in-folder search engine with the .net wrapper. Of course, by it’s nature this isn’t a given feature and because you’d have to enumerate through all the subfolders.

But the question tips of another aspect: LINQ in combination with the wrapper.

As the entire assembly is written with extendability in mind, let me say: Yes, you can easily use LINQ with the wrapper:

var allfiles = WualaFile.GetFileList(
"//wuala.com/Creative+Commons/Chaos+Computer+Club/Chaosradio+Express", true, false);

var files = allfiles.Items
            .Where(f => f.Name.Contains("09"))
            .OrderBy(f => f.Url);

foreach(var file in files)
{
   Console.WriteLine(""{0}"", file.Name);
}

Console.ReadKey();

If you want to build an in-folder search that also cares about subfolders though, recursively get the files from the folders, add them to a global index, run LINQ queries over it and export the Url of the result files back in. Easy as that.

Fixing mouse issues with VirtualPC -> VMware images

Microsoft often delivers free-to-test disk images of their products (like, for instance, the new Visual Studio 2010 CTP). These images are – who would have expected that? – in Microsoft’s own VirtualPC format. Luckily, the specs for the disk format are available and you can use the VMware Converter to just convert it into a vmdk (or use it directly, which I can’t really recommend).

Upon installing the VMware Tools, though, you’ll notice that the mouse gets stuck in the lower right corner of the screen if you didn’t remove the VirtualPC tools beforehand. Quite annoying, isn’t it? This comment describes how to solve the problem:

  • Fire up regedit, navigate to HKEY_LOCAL_MACHINESYSTEMCurrentControlSetContro lClass.
  • Within the keys under Class look for a value named UpperFilters, containing the value “msvmmouf”.
  • Remove “msvmmouf” from the value and reboot your VM.

Nifty.

Visual Studio 2008 Essentials

Despite all my bickering, Visual Studio 2008 is great. It was well worth the money to upgrade.

There are a few things missing from the Professional version, though. The lack of a powerful profiler for everyone still makes me shake my head but I’m using Red Gate’s ANTS profiler anyway, so who cares.

Let’s talk about some updates, add-ins and extras you should definetively try…

  • Visual Studio 2008 and .NET 3.5 Service Pack 1
    This service pack adds a plethora of new features, enhancements and bug fixes and should be installed right away. Data scaffolding, new WinForms controls, an entire new data modelling framework, countless WPF enhancements… you name it, it’s probably in the SP already.
  • PowerCommands for Visual Studio 2008
    This package contains numerous nifty functions that’ll improve your sourcecode and workflow. Remove unnecessary usings, open command prompts on the fly, way better undo… just read about the features on the homepage and try it, you won’t regret it.
  • AnkhSVN
    I don’t like SourceSafe. For it’s requirements it gives back very little. In comparison Subversion performs great: You don’t need a server or anything, just create a repository on your local disk, check in your files and start branching, merging and keeping book of your changes. And best of it all: It’s free. Now, that’s where AnkhSVN comes into play – it adds TortoiseSVN’s power into Visual Studio. Don’t know how I worked without this.

So, what’s missing on this list? Let me know 🙂 .

GTA IV for PC

I think I just spent more time in Windows than the last 2 years together. GTA IV is fun, easy as that.

I don’t know why people keep nagging at the game, it’s great and just what I’d expect of a new title of the franchise.

The only thing I can really get mad about are the horrible DRM-esque copy protection, the need to register at least 2 accounts (1x Rockstar Social, 1x Windows Live) and the massive memory leak that brings down the performance after a few hours of play.

So, come on Rockstar… Instead of spending thousands and thousands of dollars to keep the game copy-protected, spend a few thousands on debugging the PC version – for Pete’s sake. It really isn’t funny and the fact that the game doesn’t even start with ATi graphic cards is… ok, that’s to be expected 😉 .

Public SVN access is back

Okay, I admit… it’s not quite “back” but more like “resurrected”.

I re-setup the entire server and suddenly it works again. Currently there’s not much for guest users to checkout, though. The Wuala API Wrapper sourcecode can be obtained from there, since I won’t post the entire code for every little stable — I guess that’s interesting for some people. Address for checkout: //svn.tsukasa.eu:8443/svn/<repository>

The server’s now running with VisualSVN, routed through tsukasa.eu’s main Apache. It works reasonably well and the admin console is quite slick.

As you can see, WebSVN has been updated to the newest version, OHAB and other old projects have been removed from SVN.

Also new: Automated build/unit tests through CruiseControl .NET. Not that I’d ever commit non-working code 😉

Stopping Sweetcron from breaking with too long posts

Okay, now this is really really bad, starting with MySQL 5 there is a strict mode. What does that mean? The strict mode will not silently swallow all your data and just cut off what’s left but throw an exception back at you when you try to insert more data than the field type allows.

Sweetcron is really vulnerable for this kind of problem. It always stopped fetching the feeds to complain about a single post. Now, while fixing the problem on the software side would be preferrable I opted for a simple configuration change on the server side this time.

All you really need to do is altering the my.ini line that activates the strict mode:

sql-mode=”STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION”

will either become

#sql-mode=”STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION”

or

sql-mode=”MYSQL40″

Simply restart the MySQL service afterwards and sweetcron should eat the posts without complaining (I don’t even want to think about the loss of data here, but who cares?).

WordPress 2.7

Gee, there I am, not updating my installation for ages and now I’m wandering the path of nightly-builds again.

WordPress 2.7 is amazing. The new interface not only looks great but also offers a lot: You can collapse your toolbar to save space, the auto-updater has been improved and now supports updating WordPress’ core as well.

Quite slick, can’t wait for the final 🙂 .

How to deactivate (revoke) Far Cry 2

Far Cry 2 comes with a nasty copy protection. Actually, it’s more like a strict DRM variant that needs to be activated online and can only be used X times when not properly deactivating it.

You can manually revoke an activation without uninstalling the game by simply calling:

FarCry2.exe /revoke

Easy, huh? I’d prefer Ubisoft to not use any of these bugger DRM crap at all, but then again we all know the story of software piracy (note: pirates probably have a better version without this crap, so this whole thing is totally beyond the point anyway!).