zzamboni.org
Ideally Blue

zzamboni.org
Ideally Blue

Archive for

December 2011

Dec 27 / 7:41pm

cf-cmd: A command-line tool for running CFEngine snippets

After building the typical "test bundle" scaffolding in an editor for the hundredth time, I decided to do something about it. The result is the cf-cmd command.

A little useful script I wrote for making it easier to test CFEngine code snippets. Follow the link to see the full details.

Filed under  //  cfengine   tools  
Dec 20 / 2:17am

Reading on multiple media

A couple of days ago I finished reading Steve Jobs by Walter Isaacson. I thoroughly enjoyed it (I may post a longer review later on, but I really liked learning the "behind the scenes" of much of what I witnessed from the outside over so many years).

With this book, for the first time, I decided to conduct an experiment. I got the book as an audiobook (from Audible, playing on my iPhone), as an ebook (using Kindle on my iPhone) and also the hardcover physical book. This allowed me to read the hardcover book when at home, to read the ebook whenever I was around and had some quiet time, or to listen to the audiobook when I was moving around (walking, driving, working out, etc.).

It worked quite well. Having multiple means of consuming the book allowed me to finish it in a shorter time, and also to experience the differences of each media type. Overall, for the sheer pleasure of reading, I think I still prefer reading on paper. But I really appreciate not having to carry the heavy book everywhere I go, and to be able to continue "reading" even when I could not focus my eyes on the book.

My one wish: synchronization! It would be great if the Kindle book and the Audible audiobook would synchronize among them, so that one would skip to wherever I stopped on the other (like what Kindle does when you read the same book across multiple devices).

Filed under  //  audible   books   kindle   reading   stevejobs  
Dec 15 / 2:22am

New website for "Learning CFEngine 3"

I'm happy to announce that the website for my book is now live at http://cf-learn.info/.

In this website you will find:

  • General information about the book. 
  • A discussion forum for any type of questions, feedback or suggestions about the book. 
  • Downloadable code examples from the book, plus (over time) many other new examples. 
  • List of Errata, and access to the Errata system at O'Reilly 
  • A blog devoted to the book and to CFEngine. 

The site is fairly empty at the moment (the blog, the forum and the errata page are live, I encourage you to participate, particularly if you have purchased the Early Release version of the book and want to provide any sort of feedback), but content will grow over time.

Check it out! And of course, let me know what you think.

Filed under  //  announcements   book   cf-learn   cfengine  
Dec 15 / 12:07am

Fix journal in an HFS+ file system

Yesterday my external Western Digital disk (which I use for Time Machine, among other things) stopped mounting automatically when I plug it in. This may *cough*definitely*cough*have something to do with me unmounting it forcefully while it was doing a backup, since I was in a hurry.

Disk Utility reported everything was OK with the disk, but it still failed to mount. Upon poking a bit deeper, I found these messages in the logs:

12/14/11 11:49:00.000 PM kernel: jnl: disk2s2: open: journal magic is bad (0x0 != 0x4a4e4c78)
12/14/11 11:49:00.000 PM kernel: hfs: late jnl init: failed to open/create the journal (retval 0).
12/14/11 11:49:00.000 PM kernel: hfs_mounthfsplus: hfs_late_journal_init returned (0)
12/14/11 11:49:00.000 PM kernel: hfs_mounthfsplus: encountered errorr (22)
12/14/11 11:49:00.000 PM kernel: hfs_mountfs: encountered failure 22 
12/14/11 11:49:00.000 PM kernel: hfs_mount: hfs_mountfs returned 22

Aha! Journal error. A bit of Google searching led me to this page, where one comment gave me the key:

root# mkdir /tmp/disk && mount_hfs -j /dev/disk2s2 /tmp/disk
root# diskutil disableJournal /tmp/disk
An error occurred journaling the file system: The underlying task reported failure on exit (-69860)
root# diskutil enableJournal /tmp/disk
Journaling was already enabled for volume Casa on disk2s2
root# diskutil unmount /tmp/disk
Volume Casa on disk2s2 unmounted

Despite the error in the "disableJournal" command, after this sequence the Finder was able to mount the disk, and things seem to be working fine. The trick in the first command is the -j option, since it allows the disk to be mounted (without journaling), so that the disableJournal/enableJournal commands can be issued.
Filed under  //  diskutil   hfs   macosx   tips  
Dec 6 / 3:03pm

"Learning CFEngine 3" Early Release now available -use AUTHD to get 40-50% off

 

Automated system administration for sites of any size

My upcoming book "Learning CFEngine 3" is now available as an Early Release, which includes (for now) the first four chapters of the book. You can use the code AUTHD to get 40% off the print book, or 50% off the ebook version.

Go get yours! And of course, I'd be happy to receive any feedback you have.

Filed under  //  book   cfengine   oreilly