Every once in a while I have to dive deeper into computer systems to fix stuff or improve some aspect of my computing environment in support of my real work. It reminds me of gardening.


26
Mar 12

Ars Technica explains Amazon Web Services

For a while, I’ve wondered what all the difference Amazon cloud computing services were. With unfamiliar jargon and technical hyperbole, I came to believe that it was an entirely new way of thinking. It turns out it isn’t, thanks to this primer on amazon web services on Ars Technica. A virtual machine is still a virtual machine; it’s just called an “instance” in Amazon parlance. Short and sweet, the article just made cloud computing more accessible to me.


26
Jan 12

Notes on Replacing Skype with Google Voice

I’ve been wanting to replace Skype with something else, so I thought I would dust off my old GrandCentral / Google Voice account. I couldn’t get it to work at first and shelved it. In the meantime, I posted the number online and only recently received a few calls, which I promptly missed.

Skype, despite its bloated user interface, works fairly well out of the box once you figure it out. The paradigm is familiar: click a name to call, or find the latest hiding place for the “call phones” keypad. Google Voice, however, is a bit different.

First of all, there are actually three voice-enabled products. Google Voice is the one that handles the telephone call connections. Google Talk is a voice enhancement of Google Chat, an instant messager (IM) client that runs like a normal desktop application. Finally, Gmail has the ability to send and receive calls, in addition to serving as your browser-based email client.

Google Voice works with GMail to place calls. Instead of connecting from your computer to the phone number, Google Voice is like a switchboard operator that sets you up with a two-person conference call. You initiate your call to a number with Google Voice using the Google Voice web page, and then Google Voice calls YOU back to make the connection. Once you answer the phone, Google Voice then calls the phone number you’re trying to reach.

To make a call from your computer, then, you need the ability to answer the incoming call. Google Voice allows you to designate “Google Talk” running on your computer as the “phone” it will call. You may have it installed as a desktop client, as it works as a messenger client. However, Google Talk does not answer calls if you have Google Voice open on your computer. However, if you also have GMail open, you will get a ringer alert there. Once you answer the Google Voice call with GMail, you are connected and the other phone number is dialed, and things proceed rather well from there.

It’s very weird and convoluted. It may be that Google isn’t interested in creating and easy point-to-point calling solution that works completely on a computer like Skype, but it may also be typical Google disorganization with regards to their family of overlapping solutions, additionally hamstrung by the lack of concise, well-curated documentation.

In summary, to set up you need to:

  • Signup for Google Voice with your Google account
  • Set up Google Talk account, if you don’t already have one
  • Register Google Talk as a Phone in Google Voice
  • You may have to make an outgoing call first in GMail to activate the calling feature
  • You may have to add credit for dialing numbers outside the United States/Canada

Then, to make a call:

  • Open Google Voice in a browser window
  • Open GMail in a separate browser window
  • Use Google Voice to place the call to a phone number
  • Use GMail to answer the Google Voice connection, which will then proceed to call the phone number

To receive a call:

  • Google Voice will attempt to ring all your devices registered to it, and it will do so all at the same time
  • If Gmail is not open in a browser window, I presume that the Google Talk IM client will pick up, but I’ll have to test that.

Although this is a lot of hoops to jump through, the Google Voice product is technically pretty good. Call quality is good for me, and the voice mailbox and transcription services are cool. It’s nice to get an email when you get a voice message.


16
Oct 11

Recovering a Bad Macintosh External Drive

A friend of mine reported this problem:

“You see, my external hard drive has just kicked the bucket…with all my files still on it. It randomly started making a clicking noise. It will no longer connect to any computer for longer than 40 seconds. I’ve gone around to a couple different places to see what they could do without sending it out for it to be taken apart to retrieve my data.”

I received the drive already removed from its IOMEGA 1TB enclosure. The drive was a regular 3.5″ 1TB SATA drive.

Low Level Disk Recovery

The first step was to stuff the drive into a bare PC rig and run Spinrite 6 on it. Spinrite is a hard drive utility written by Steve Gibson, an old-school assembly language programmer whose relationship to computers is similar to the way a master swordsmith relates to steel. Spinrite fixes any problems it finds at the very deepest level of the hard disk, below the operating system layer, so it works both for Macintosh drives as well as PC drives. It is very highly regarded. However, it only runs on PCs, not Macintoshes, so if you’re a Mac user or are a PC user that doesn’t have an extra throwaway PC lying around, you are out of luck; there is no comparable software for the Mac that goes as deep as this. Best bet: make friends with your local PC tech! This thread about disk recovery on Macintouch, while old, still gives useful information about the use of SpinRite with Macintosh hard drives.

After a 4.5 hour run at level 2 “data recovery” mode, Spinrite found no unreadable sectors. The drive was, as far as level 2 scanning was concerned, just fine. Furthermore, I didn’t see any signs of disconnecting or hear any weird clicking noises.

MacOS X Disk Utility

I booted up my MacBook Pro and used a USB SATA connection kit to connect to the drive. It mounted (appeared) on the desktop just fine.

Next step was to do a VERIFY DISK operation on it with Apple’s Disk Utility program. Disk Utility can check whether data on the disk is organized as expected. Every disk drive in a computer has data on it that describes how it is organized. Files, for example, have file names and other properties, and these are all put into an index that is stored in addition to your data. If the index gets corrupted, then the operating system can’t find files anymore. The data is there, but the pointer to the data is gone.

After a few hours, Disk Utility reported a minor problem (volume size mismatch), which it reportedly was able to repair. There were no other errors at all. I returned the drive to its owner to try to copy the data from it.

If Disk Utility had reported significant problems, then I would have had to purchase a utility like Disk Warrior to do a more comprehensive disk recovery. Unlike Disk Utility, which can only make minor repairs to an existing disk index, DiskWarrior looks at the hard drive like a giant jigsaw puzzle and attempt to reconstruct a new disk index from scratch through smart analysis of each sector and figuring out where it should go. This is a time-honored technique.

As I was not familiar with the current crop of Macintosh disk utilities, I looked for insightful commentary:

  • One non-technical computer user tried all five major repair tools: DiskWarrior, Drive Genius, Data Rescue, and Techtool Pro. Unfortunately, his experience did not have a happy ending. His despair, however, is our gain: he describes the difference between each tool, as he learned by trying out each one.

  • Old-school Macintosh user and tech writer Ted Landau writes about the fading-away of disk utilities in today’s marketplace. The comments provide additional insight into the use of each tool.

My assessment at this moment is that DiskWarrior is the program to buy, to be used after running Spinrite 6 on the drive on a PC. Like Spinrite, DiskWarrior is a single-purpose tool designed to repair the disk indexing structures. However, it does not fix unreadable sectors on a disk; that’s what Spinrite does. The combination of the two should be powerful enough to handle any data recovery situation where the drive is still physically operating. The other programs mentioned–Drive Genius, Data Rescue, and Techtool Pro–appear to be more like Swiss army knives, and are sold with dozens of functions that have more to do with broader disk management and general computer maintenance.

The mystery, however, is why Spinrite detected no errors and Disk Utility reported only a volume size mismatch. This is a non-critical error, akin asking someone how much money they have in their wallet and getting an answer that is a few pennies off. It should not have caused the clicking and disconnection problems reported.

Diagnosis?

As I mentioned, the disk itself was received already removed from its enclosure. Since the disk worked fine in my PC rig through the SATA port, and mounted without trouble on my Macintosh via a SATA-to-USB adapter, that means that it’s probably the enclosure itself that is faulty. There are two major components other than the disk drive itself: the logic board and the power supply.

Unless there was some kind of electrical surge event, every single external hard drive enclosure I’ve owned since 1994 has failed due to the enclosure. The symptoms: the drive works intermittently and shuts down unexpectedly, or disappears from the operating system while you’re trying to use it. The drive itself is fine, so transplanting either the power supply or putting it in a new enclosure (which includes a new power supply) has worked. I haven’t been able to find references to “power supply degradation over time”, so I’m not sure how much of my experience is coincidence, but practically speaking I’ve had good luck swapping the drive with a newer power supply or enclosure.

As my friend had already purchased a new external hard drive, I didn’t bother to test the old enclosure by putting the drive back inside. However, I did check to see whether Iomega sold replacement power supplies (they are external AC-DC adapter “wall warts”), and they do. He may test the enclosure with a different power supply to see if there’s any difference. He’ll need to match voltage, current, plug and polarity.

Tools Mentioned

Software

  • Spinrite 6PC ONLY commercial software. Use for low-level data recovery/repair before doing anything else, as this verifies the physical data integrity (“whether data can be read or not”) of the disk. Requires a PC that can boot from either CD or floppy disk into FreeDOS. Although Spinrite 6 was last updated in 2004, it works with any hard drive in a PC that can be accessed from DOS. To use it, you must plug your hard drive into the computer, and then boot the Spinrite CD or diskette. It takes about 4 hours to scan a 1TB disk with no errors. If there are many errors on the disk, the scan/repair time can be measured in days; the software shows you the estimated time to completion. Price: US$89.

  • Disk Utility – Available in your Mac’s Utilities folder. Run DISK VERIFY on the Spinrite-recovered disk to ensure that the logical data integrity (“whether data is organized correctly”) is OK.

  • DiskWarrior – Commercial software that is highly specialized in fixing scrambled Macintosh hard drives, and nothing else. Doesn’t handle recovery of unreadable disk errors, so you would use Spinrite for that first. It’s possible that other Mac software such as Drive Genius, Tech Tool Pro, or Data Rescue can do that, but it seems unlikely that they are a match for Spinrite’s low-level approach. Price: US$99.

Hardware

  • Handling a Hard Drive Safely – Once you have removed a hard drive from its enclosure (be sure to handle it carefully to avoid damage). A drive that is outside of an enclosure or case is called a “bare drive” (as in naked).

  • SATA or PIDE – You need to see what kind of hard drive you have. Drives manufactured between 1990 and 2006 are probably going to be IDE drives. Such drives are described as ATA, PATA, or PIDE. They have a wide ribbon cable that plugs into the back, with a 4-prong power blog. Most drives today use SATA connectors, which are a lot smaller.

  • Hard Drive to USB Adapter – This is a device that allows you to temporarily connect a bare drive (either SATA or PIDE) to your computer through a USB port. There are many, many cheap kits on the market, but this one from the venerable Cables to Go gets high marks for build quality. I like that it also has an additional power switch. When you use one of these, you should be careful NOT TO MOVE THE DRIVE while it is operating, unless you really want to trash it permanently. You should also carefully power it on and off as you would any external drive. Price: About US$20 for the Cables to Go version, US$10 for the cheap-o versions.

  • Hard Drive Dock – Unlike the adapter, a dock allows you to plug a bare hard drive into a slot like a toaster. They’re useful if you like using bare drives for backup purposes. This is an option, generally speaking, only for SATA drives. If you have an older PIDE / ATA drive, then you need to use the adapter. Like the adapters, they plug into a USB port. If you are transferring data between bare drives, you might find the dual slot dock version more useful. Price: Between US$40 and US$80.