Dumb ways to die

Like accidentally removing a disk from your system while VMware workstation is running a machine from it. Uh-oh, I thought after I had removed the disk and woken the machine up to see that Ubuntu-14.04 had been running. Straight away put the computer back to sleep and put the disk back but the VM wouldn’t shut down or turn off and Workstation wouldn’t quit so in the end I had to kill it.

Having rebooted and tried to start the Ubuntu VM again, I got nasty errors like "reason: failed to lock the file". Next I copied all the files to another disk and re-added the vmx file to workstation (“I moved it”). Same types of error.

On the plus side, I was pretty confident this wasn’t terminal. After all the machine was asleep when the disk was removed, no writes were taking place and modern file formats can cope with that. A look in the folder showed a couple of Ubuntu-14.04-1.vmx.lck files. Simply deleting them allowed the VM to start and all was well. Could have been worse.

The reason I took the disk out in the first place was to put the DVD drive in. The reason I did that was to burn a Centos 7 iso. The reason I did that was to replace my physical install of Centos 6.5. The reason I did that was because I couldn’t get my Bamboo tablet to work on 6.5, despite manually building the kernel module and recompiling the kernel from source. The reason I wanted to use the pen was to do some graphic work in Gimp. The reason I needed Gimp was Photoshop’s lack of Bezier curve drawing. The reason I needed bezier curves was for a piece of artwork for a label for a new product my wife is working on. Finally we get to the business justification!

Happily, and as expected, Centos 7 works out of the box with the Bamboo dock. Also glad that judicious choice of options in the Centos 7 installer didn’t wipe out any of the other partitions with other operating systems and data on my disks. All told, good progress. And lucky.

Spotlight on Sloooooowness

Hmmmm. I have a new theory about why my Yosemite Mac is so damn slow.

Spotlight.

I turned it off and (without any scientific tests) seemed to get a much better experience. I disabled it by adding the hard drive in the exclusions of Spotlight preferences.

Of course, I immediately started getting complaints from “other users” that they couldn’t find anything so I’ve had to be a bit less harsh on the exclusions.

I also wonder why indexing activity is not visible using iosnoop or iotop. Maybe it is and I’m just not looking at the output correctly or maybe it happens at such a low level that it doesn’t trigger any counters. Or maybe it all happens in memory in kernel interaction with the file buffer cache (unlikely but possible). However, if that were the case I would still expect kernel cpu to be logged.

Certainly worthy of a bit more investigation, i.e. “googling” plus some dtrace perhaps.