Archive

Archive for the ‘Geek Stuff’ Category

Reading Challenge

March 16th, 2012 3 comments

Some of you may have noticed my recent tweets about finishing books now and then. A few months back I started on a reading challenge to read through NPR’s Top 100 SciFi/Fantasy book list. I have a somewhat inconsistent reading habit. I’ll find an author I like, read everything by them that I can find, then go into a lull again when I run out of their books. The intent of reading through the list is to get exposure to a bunch of different authors, and hopefully get an idea of who I like and who I don’t.

My rules for the challenge:

  1. Only reading books available on Kindle. This cuts the list down to about 85 entries.
  2. If a series is on the list, I’m only reading the first book. If I like it, I’ll read the rest later.
  3. Treating the list as a countdown, starting at 100 and working down to one. Hopefully this means the books will get better as I go.

I started on this late last year, and I’m four books in so far:

  • #99: The Xanth Series by Piers Anthony. With 35 books in the series so far, I’m glad I choose to only read the first book in listed series, in this case A Spell for Chameleon. I’ve read some Anthony in the past, back in middle school, and I remember it being fairly juvenile stuff, and my memory served me right in this case. It’s not a bad book, but it’s pretty straightforward and plainly presented. Fun, but not terribly filling.
  • #98: Perdido Street Station by China Mieville. Very different from what I usually read, but I liked it. Very rich descriptions of the setting but the reader is left to figure out a lot of the physics and politics on their own. I’ll probably be revisiting this author once the list is done.
  • #97: The Doomsday Book by Connie Willis. An interesting take on time travel, though probably not what most people would call SciFi, as the science has next to nothing to do with it. Good story though, would definitely recommend.
  • #96: Lucifer's Hammer by Larry Niven and Jerry Pournelle. I was enjoying this through the first half, till about comet-fall, after that it just seemed to be a study in how people can be horrible to each other. Maybe I just have more faith in humanity, but I’d like to think we wouldn’t turn on each other quite so quickly.

So, now I’m on to #95, Red Mars, which I started to read a few years back and lost interest in. Hopefully it’ll be better this time around.

Categories: Geek Stuff Tags: ,

ZFS Drive Replacement

July 9th, 2011 No comments

My home storage server has been a source of annoyance for a few months now. I had upgraded it from an Intel Atom board to a E5500 and had some major stability issues involving bad RAM and a bad motherboard. After finally getting it stable, I learned one of my 2TB drives in my RAIDZ pool had started reporting a slightly smaller size, making it unable to participate in the pool. Luckily, the drive was still under warranty, and replacing it is a stupidly easy process, which I’ve decided to document here.

[chip@sumo ~]$ zpool status
  pool: storage
 state: DEGRADED
status: One or more devices could not be opened.  Sufficient replicas exist for
        the pool to continue functioning in a degraded state.
action: Attach the missing device and online it using 'zpool online'.
   see: http://www.sun.com/msg/ZFS-8000-2Q
 scrub: none requested
config:

        NAME                STATE     READ WRITE CKSUM
        storage             DEGRADED     0     0     0
          raidz1            DEGRADED     0     0     0
            label/2TBdisk1  UNAVAIL      0     0     0  cannot open
            label/2TBdisk2  ONLINE       0     0     0
            label/2TBdisk3  ONLINE       0     0     0

errors: No known data errors

As you can see, 2TBdisk1 has failed and is unavailable. Since these SATA controllers support hot-swap, I just hooked up the new drive while the box was running. FreeBSD didn’t automatically detect the new drive, so I had to instruct it to rescan the SATA device. Normally I would expect atacontrol reinit to do this, but I ended up having to detach and attach the appropriate ata chain to get it to see the new drive.

[chip@sumo ~]$ sudo atacontrol detach ata2
[chip@sumo ~]$ sudo atacontrol attach ata2
Master:  ad4 < SAMSUNG HD204UI/1AQ10001 > SATA revision 2.x
Slave:       no device present

With the new drive now being recognized, I applied a GEOM label to it, then replaced the failed drive in the ZFS pool.

[chip@sumo ~]$ sudo glabel label 2TBdisk4 /dev/ad4
[chip@sumo ~]$ sudo zpool replace storage label/2TBdisk1 label/2TBdisk4
[chip@sumo ~]$ zpool status
  pool: storage
 state: DEGRADED
status: One or more devices is currently being resilvered.  The pool will
        continue to function, possibly in a degraded state.
action: Wait for the resilver to complete.
 scrub: resilver in progress for 0h0m, 0.12% done, 4h40m to go
config:

        NAME                  STATE     READ WRITE CKSUM
        storage               DEGRADED     0     0     0
          raidz1              DEGRADED     0     0     0
            replacing         DEGRADED     0     0     0
              label/2TBdisk1  UNAVAIL      0     0     0  cannot open
              label/2TBdisk4  ONLINE       0     0     0  554M resilvered
            label/2TBdisk2    ONLINE       0     0     0
            label/2TBdisk3    ONLINE       0     0     0

errors: No known data errors

Once the replacement process was finished, zpool status goes back to normal:

[chip@sumo ~]$ zpool status
  pool: storage
 state: ONLINE
 scrub: resilver completed after 5h49m with 0 errors on Fri Jul  1 23:23:08 2011
config:

	NAME                STATE     READ WRITE CKSUM
	storage             ONLINE       0     0     0
	  raidz1            ONLINE       0     0     0
	    label/2TBdisk4  ONLINE       0     0     0  437G resilvered
	    label/2TBdisk2  ONLINE       0     0     0
	    label/2TBdisk3  ONLINE       0     0     0

errors: No known data errors

Overall a remarkably painless process, all without taking the machine offline!

Categories: Geek Stuff Tags: , ,

Eye-Fi Madness

August 30th, 2010 No comments

I set out with a simple goal this evening, to change my Eye-Fi card’s upload destination from Facebook, where it was putting each image in it’s own album, to simply uploading to Hindenburg via FTPS. This led to a fun filled evening of debugging and data recovery!

The configuration change on the Eye-Fi Manager side was easy enough, simply selecting FTP as the upload mechanism and filling in a few fields. For the server side of things, I decided to go with ProFTPD, largely because I’ve used it in the past and the configuration is pretty simple. I’d never used FTPS before, but it’s pretty easy to enable with ProFTPD, just a few configuration directives:

TLSEngine on
TLSLog /var/log/proftpd/tls.log
TLSProtocol SSLv3 TLSv1
TLSRequired on
TLSRSACertificateFile /usr/local/etc/kyzoku.2bithacker.net.cert
TLSRSACertificateKeyFile /usr/local/etc/kyzoku.2bithacker.net.key
TLSVerifyClient off
TLSRenegotiate none

However, this doesn’t appear to work. Based on the xferlog and tls.log, it appears the Eye-Fi client was connecting, but the data session was failing, but it did give the helpful message of “client did not reuse SSL session, rejecting data connection (see TLSOption NoSessionReuseRequired)”. This option is undocumented, and is actually “TLSOptions NoSessionReuseRequired” (note the plural), but it does solve the problem. Apparently clients are expected to reuse the TLS session between the control and data channels, but Eye-Fi doesn’t.

So, that’s working, but now my Eye-Fi card isn’t able to be read in either of our cameras or my laptop. Not sure what happened, but it appears the partition table became corrupt this evening. The card still had the only copy of a lot of our Comic-Con photos on it, and I really didn’t want to lose them. First, I decided to get a disk image of the SD card using Mac OS X’s Disk Utility. Then, I had remembered hearing about some open source software for recovering images from damaged cards, and after a quick Googling, I came up with PhotoRec.

PhotoRec is extremely easy to use. It opened up a terminal window with a curses interface, prompting through selecting a disk to scan, a place to save the found files, then initiating a scan of the Eye-Fi, turning up all of my missing images, along with a handful of other files that I didn’t realize were on the card (including an SQLite database, maybe used by Eye-Fi?) So happy I didn’t lose all those photos, and will have to work on getting them uploaded. Unfortunately, I think I’ve lost the ability to geotag those photos though…

Categories: Geek Stuff Tags: ,
Performance Optimization WordPress Plugins by W3 EDGE