Archive for the ‘Unix’ Category

Getting started with ZFS on Linux: starting the f’n thing

2009-09-27

I am running Ubuntu 08.10 (yeah, i know, waiting for 09-10) and just got a Rosewill RSV-S8 to replace my Drobo, and want to run ZFS on the disks in it, because ZFS is badass. I thought I had to run OpenSolaris or at least Nexenta (ubuntu on top of the solaris kernel, and yes, it’s real) but it turns out there’s a project called zfs-fuse which lets you run ZFS on Linux. FUSE is the “Filesystem in Userspace” project, which lets you run any filesystem as a regular system user. Fuse is necessary because ZFS licensing prohibits the GPL’d linux kernel from using its code, and normal linux filesystems need to be made a part of the kernel.

Now that the background is out of the way, I thought I’d start to pastedump the warnings I run into along the way, so that the greater googlenet may be able to search for them. (more…)

Mercurial – SVN hg convert un-fubar script

2009-07-29

Another nerd post! Turns out I’m using my blog as more of a script repository. Oh well!

If you’ve ever imported an svn repository into hg, then you may have discovered you need to keep the *exact* repo around… unless you know some magic! (thanks bos!)

The secret comes in knowing that hg convert uses a hidden, unversioned file to do its thang, .hg/shamap. The bigger secret is revealed when you run hg tip --debug – the same information is versioned, you just need to squeeze that metadata format back into a file. Because this involves string manipulation, and because I’m old school like that, I used perl to do this.

poppy@host:~/project$ hg log –debug | perl -e ‘my (@x,$l); while(){if(/extra: convert_revision=(.*)/){$l=$1.” $l”;push(@x,$l);}if(/changeset: \d+:(.*)/){$l=$1} }; print join(“\n”,reverse(@x)).”\n”;’ > .hg/new-shamap

poppy@host:~/project$ mv .hg/shamap .hg/old-shamap # if you have one…

poppy@host:~/project$ mv .hg/new-shamap .hg/shamap

BAM! Now you can clone and re-sync your code anywhere, and push it around however you like. It may be dirty but it’s expedient and works for me! Let me know if it works for you.

Unfail for Linux Network Manager

2008-02-01

I use ubuntu (now kubuntu, whatevs) and had the little network manager applet go AWOL on me – it was stuck with “manual configuration” and wouldn’t do its magic for me. Now, I’ve had to write my own nastiness for ifup/down scripts before, so I could cope, but it sucked. I have looked around, but only recently found [a page with the solution to the problem.](https://answers.launchpad.net/ubuntu/+source/knetworkmanager/+question/15308) Life is tastes better now.

rsync – i bet you think it’s working for you

2008-01-10

Hey folks! If you’re a unix nerd like me, you probably use rsync for everything. Unfortunately I learned today that if you do `rsync -vaP –delete source dest` you may not have sync’d files. Why? Because that only uses the timestamp.

Yeah.

Anyhow, `rsync -c` is what you want. This does a checksum everytime regardless of timestamp. A word of caution though: it takes *forever*. However, my 80GB cache of corrupted MP3s are thanking me.

The Linux “Switch” (aka, Why My Next Computer Will be an Apple Again)

2006-09-29

For those of you just tuning into my blog and/or my life, I ["switched"](http://www.pauloppenheim.com/blog/2005/12/16/im-a-switcher/) my computing platform in a strange way – from Mac OS X to Linux. I have learned a lot in the past 9 months, and I would like to share some of my surprising discoveries.

(more…)