G-RAID, Time Machine, and Spotlight Headache

A few days ago, of course right before the “Money Back Guarantee” expired on our G-RAID 8TB Time Machine drive at work both my S3 and I were battling with a rather nasty pernicious bug that was plaguing this device on our new fancy Mac Pro Server running OSX Mountain Lion.

The problem was this, you plug the drive in, using Firewire 800 and Time Machine sees it and starts backing up files. That works just fine. After say 1TB of files get backed up Time Machine works gamely for about three or four hours and then the drive suddenly goes deaf. What I mean is that the drive is still connected, the icon is on the Desktop, but you can’t do anything with it. It gives you a fusillade of meaningless errors, vague ones like “Unspecified error with file system” and the like and Time Machine is stuck and can’t do anything at all with the drive. It’s not really a headache for us currently because the server is brand-spanking-new, but still, it’s a concern for us. You have to eject the drive, and not a plain eject either, but a Force Eject. When you move it to another computer and plug it in and do a fsck on the drive everything pans out fine. Everything is hunky-dory, journal is fine, structures are peachy, the works. So annoying.

So off to Google we go. Turns out there MIGHT be a bug in the “Turn off Hard Drives when possible” in the Energy Saver preference pane in System Preferences. This strikes me as a wee bit of bullshit, the drive should go to sleep and wake up elegantly like anything connected to a Mac should (and almost always does!) so, fine, turn that off. Testing. Ah, failed. So next stop was to try to irritate the drive with constant actions. To that end I created a script:

!/bin/bash

while true
do
touch /Volumes/G-RAID/keepalive
sleep 60
done

So what this script does is touch, which is a Unix command in the Mac that just runs out and accesses a file, it’s size is zero, it just runs the most basic of file operation on a drive. If you touch a file on a sleeping drive, it should wake it up. If the drive is counting down until it goes to sleep, this operation will reset that counter. Then the entire thing takes a nap for a minute and does it again, and it does it over and over forever.

We tried that, and still ended up with a failed Time Machine backup and a drive that’s gone deaf. The exact error you get in Time Machine is “com.apple.backupd: Error: (22) setxattr for key:com.apple.backupd.HostUUID … ” So, still no solution to our problems. We finally figured out what the silver bullet was, and it came from an unexpected source. We added the G-RAID drive to the Privacy pane of Spotlight in the System Preferences on the server and voilà! Magical solution!

Since I did that, the drive has been working happily since I made the change, it’s been about a week. My working theory is that mds (which runs the Spotlight service) either locks a file or does something sneaky with this extended attribute on the HostUUID object and that, somehow, ruins access for the entire file system on that drive. It’s not that the file system is damaged, it’s just not working.

So, where’s the bug? Is it in mdsworker, mds itself, backupd (Time Machine), Firewire 800, the Firewire 800 cable, or the G-RAID drive? The answer is a definitive YES. Somewhere. Something is causing it and the only solution seems to keep mds’s muddy hands to itself and pester the drive every minute with a meaningless file operation via touch.

The upside is the damn thing works, so we’ll keep going with it until it stops working. I wish there was something clearer than this Error 22 from backupd to go on, but alas, this seems to be a valid workaround and frankly I don’t really need Spotlight to go futzing about on the drive anyways. There won’t be any searching done on it anyhow, just the indexing that Time Machine needs and that’s it.

I guess in the end, all’s well that ends well.

Installing a HP LaserJet 1505 printer on Apple OSX Mountain Lion

What a problem this was! We had a user with a MacBook Pro that had a new copy of Macintosh OSX Mountain Lion 10.8.2 running on it. Plugged in a rinky-dink HP LaserJet 1505 and nothing. Even though there was the exact same printer installed before, from the user’s home, the system refused to reuse the connection for the printer at work. Obviously that has to be because the system notices it’s a different device and refuses to play along, which I find stupid.

Plug in the printer, try to add it, and the Add Printer function goes out to Apple Software Update to look for the driver and then comes back and tells us that nothing is available. Then commence zombie debugging via muzzle flare, wandering around in the dark trying to fix what shouldn’t be happening but apparently is beyond all logic and reason.

So how you do diagnose a Mac? Here’s a handy-dandy guide which anyone can use to fix their Macs. I seriously doubt any issues ever survive this particular procedure:

  1. Clear PRAM – Turn off computer, turn on computer while holding down  Command-Option-P-R. The computer will restart and you’ll hear the startup chime twice. Let go of the keys. ~ For this, just do it. It doesn’t matter if you don’t think doing this will fix your problem, it will. Just shut your pie hole and do this. If you don’t do it, I don’t want to hear about your problems. It’s magical. I don’t care if Apple says it won’t do anything. This thing DOES EVERYTHING IN CREATION – apparently. That and it cannot hurt. Lots of fluids and plenty of bed-rest. 
  2. Repair Disk Permissions – Start Disk Utility, find your “Macintosh HD” and click “Repair Disk Permissions” and wait. Do this. Often. Regularly. Lots. Weekly. Now.
  3. Download Onyx. Pick which version of OSX you are using, download it, install it and use it. I recommend skipping everything it wants to do and going right for the Automation button. Uncheck “Repair Permissions” and “Display of folders content” and check the rest. Click Execute and wait. When the system asks for a reboot. Reboot. Everyone should do this weekly. Think of it like vitamins for your Mac. Plus, it can’t hurt.

At this point your system should be all spic and span and whatever niggling bit was bothering you should be dealt with. Of course, for the problem I had to deal with at work, there is one little thing extra, one thing more. Open Finder, click Go on the Menubar, then Go to Folder… and type in /Library/Printers and click Ok. You’ll see a list of folders. In this list find the folder named “hp” and KILL IT WITH EXTREME PREJUDICE. Y’arr! This !@#$ folder is at the very center of my hatred for all that is Hewlett-Packard. I’ve started to unceremoniously refer to them as Fudge Packard. Bastards. Anyways, killing the folder does the trick, it clears everything up and Mountain Lion can download software from Apple again for the HP Drivers – blah blah blah. I’d rather just get a sledgehammer and pound the HP LaserJet 1505 into foil, but hey, you have to cope or have some sort of attack. I regret buying HP. I regret the LaserJet 1505. What a piece of crap. Steaming.

Fake installer malware makes its way to Mac | TUAW – The Unofficial Apple Weblog

Fake installer malware makes its way to Mac | TUAW – The Unofficial Apple Weblog.

When it comes to installing things on your Macs I often times advocate a rather carefree attitude. One thing that has always been true, and this article just nails home the point, is that even the most secure system can fall if the person holding the keys is tricked or cheated into opening the door.

I have said to many people whom I’ve given computer advice, if you have doubts, please contact me and I can look at it and give you advice. It’s free, and I’d rather help in the vein of “An ounce of prevention is worth a pound of cure.”

First Look at Mountain Lion OSX for Macintosh

I purchased and downloaded the newest version of Macintosh OSX codenamed Mountain Lion. The download took a brief amount of time and once established I didn’t have a problem handling it. The first step was creating an independent system installer using a USB memory stick. I found some instructions that I remembered from when I did this with OSX Lion and the instructions worked well, up to a point. I was able to find the InstallESD.dmg file and I set up my 16GB memory stick with the proper format settings, specifically Mac HFS File System with Journaling and GUID partition map. The first issue I ran into was a strange memory error, that while restoring the dmg file to the USB memory stick, after the Mac was done really, in the verification step it failed with this odd arcane “cannot allocate memory” error. I went immediately to Google to look and found that if I mount the InstallESD.dmg file first, that *that* is the magic bullet. Turns out, it was.

Now that I have Mountain Lion on a USB memory stick I got a stock 24” iMac out of storage and set it up. Plugged the USB memory stick in, then the mouse and keyboard, main power, and while holding down the option key, turned it on. Everything worked as I expected it to! So far so good.

Once the system was up and running and in setup it prompted me to connect to a Wifi system, which was not a problem since I share Wifi from my primary work iMac (long story for another day) and it seemed satisfied. Then I ran into my first problem with Mountain Lion. During initial system setup I could not successfully log into any Apple ID. My personal one, or the one for work, either one didn’t work. The system allows you to continue without it and so that’s exactly what I did. Once I moved on to setting the time zone, this also failed, but I suspect it has everything to do with my shared Wifi coming from my Snow Leopard iMac and not something endemic to Mountain Lion. Instead of Mountain Lion successfully setting the time zone by it’s location I set it by hand. Not really a problem.

Once I got the system up and running, idle at the desktop everything was as it should be. My next step was to try to connect my test iMac up to my Apple ID. So logically I went first for System Preferences, then to Accounts, and there set my Apple ID. I was half hoping that setting it there would have had a chain reaction and set it everywhere else, but that didn’t happen. I noticed that iCloud wasn’t set up properly, so I found it in System Preferences, it wasn’t a problem, just a very weak annoyance. Then I tried the Mac App Store, had to do it again, same for iTunes. The only real irk that upset me was fiddling around with “Back To My Mac” feature which asked me to turn on sharing with a button that lead to the sharing panel. I was lost in there (no, not really, but I was in the headspace of an end-user) and it took me a while to notice that Apple did tell you where to go to set things up, so my one tweet about this being a problem is wrong, I was just hasty. I must say that much of this I will pin on me being in the “end user headspace” and not as an Admin, which I would have been much more careful and slow with in my approach to Mountain Lion. If you read and aren’t hasty, this isn’t a problem.

Every app that I’ve used worked well, some needed Java to be installed but the OS prompted to fetch it and install it for me without a problem so that was fine. Of the apps that work that I’ve tested, at least in that they open up are:

* Aqua Data Studio 11.0
* Dropbox
* iSquint
* KompoZer
* MarsEdit
* Miro Video Converter
* MPlayerX
* Music Manager (Google Cloud)
* OpenOffice.org
* Photo Wrangler 2.1
* Picasa (needed update)
* Postbox
* Seashore
* Spotify (needed update)
* The Unarchiver
* Transmission
* VLC
* What’s Keeping Me?
* XTabulator
* Zipeg

Of course, all the apps from the Mac App Store I assume work well. Dropbox was a non-issue, 1Password was smooth-as-glass, as I expected. But what really surprised me was Postbox. I recently fled Sparrow as an email client when they announced that Google was acquiring them. Postbox was my alternative. When I copied over Postbox and started it for the first time it offered to collect the settings form Mail.app which I didn’t think anything of and let it go ahead. Postbox seamlessly captured my iCloud email account and after I typed in my Apple ID password, I was up and running! For some strange reason, that really pleased me.

So, what is next? So far everything seems to test fine in Mountain Lion. There are some goobers from Lion that I still need to work out – such as secondary monitors in full screen mode being stupid, that sort of thing, and also to see if VirtualBox will work, but for the most part I’m satisfied that this new OS is exactly as Apple bills it, and they have done a very good job. There are some small irky bits and on my Twitter I’m sure it came across as being ranting-and-raving, but actually it’s quite good.

Next steps at work are tallying up all the people interested in Mountain Lion and figuring out how we’re to pay Apple for the licenses, then helping everyone set up Apple ID’s on their own. There is going to be a headache with all these new very independent and unmanaged Apple ID’s floating around in space, but if you want the Bright and Shiny you have to swallow a seed or two.

Google Drive Failure

Google Drive is a failure.

Google Drive was released yesterday, and I clicked the button on the website letting Google know I was interested in their product. I received an email late last night informing me that my Google Drive was ready. This morning, on a lark really, I went to the Google Drive website and clicked on the download link for the sync application to add to my work iMac. I downloaded the DMG fie without a problem and opened it up. I copied the Google Drive app to my Applications folder, like you are supposed to with Macintosh, and then I sat back and marveled at it. Google Drive, finally.

I’ve been a loyal Dropbox customer for years and back in January I sprang for the $100 a year expansion of my Dropbox up to 50GB. Everything I use connects to my Dropbox via the Dropbox API and just for the record, I am totally in-love with Dropbox. There is no reason for me to leave them as a customer. But even if you are loyal, it doesn’t mean you can’t explore. I have a professional account with Box.com through my work, and we arranged that after drop.io was consumed by the wraiths at Facebook. I have a personal Box.net account with 50GB but I don’t use it because Box only allows sync with paid accounts, so it’s not worth my while. Google Drive was just along these lines, just another option to look into.

So I started Google Drive on my iMac and I was asked to authenticate, something I expected. Then nothing. I started the app again and nothing. I opened up the Console app and here is what I found:

4/25/12 7:17:44 AM Google Drive[22481] *** __NSAutoreleaseNoPool(): Object 0x2e2ba80 of class OC_PythonString autoreleased with no pool in place – just leaking

4/25/12 7:17:44 AM Google Drive[22481] *** __NSAutoreleaseNoPool(): Object 0x2e37440 of class OC_PythonString autoreleased with no pool in place – just leaking

4/25/12 7:17:44 AM Google Drive[22481] *** __NSAutoreleaseNoPool(): Object 0x2e332f0 of class NSCFString autoreleased with no pool in place – just leaking

4/25/12 7:17:44 AM Google Drive[22481] *** __NSAutoreleaseNoPool(): Object 0x2e32600 of class NSCFString autoreleased with no pool in place – just leaking

4/25/12 7:17:45 AM [0x0–0x221c21a].com.google.GoogleDrive[22481] 2012–04–25 07:17:45.119 Google Drive Icon Helper[22488:903] Inject result: 0

So, it’s broken. This isn’t the first time a new app was built that failed horribly on my iMac. If anyone cares, and perhaps if anyone from Google is reading, this is a standard 2009–2010 iMac running Mac OSX 10.6.8. The only thing different about this particular Mac is that the account has it’s home on an AFP-connected OD-domain’ed Apple xServer. A network home. This causes headaches for Adobe Acrobat Reader so it’s probably the reason why Google Drive collapses on startup.

Since I can’t run the application, and since it wasn’t designed elegantly to take into account those people who have network-based computers like mine – unlike Box.com’s sync app or Dropboxes sync app, I can only state that Google Drive is not ready for prime time. Google Drive is not ready to compete in the marketplace and Google has to go back to the drawing board and try again.

Flashback Trojan on Mac OSX

Apple makes some marvelous products. In this case, I’m talking about Apple Remote Desktop. With ARD I was able to scan every single one of my client Macs to check to see if any of them were infected with the Flashback Trojan Horse. Before my scan I would have sworn on whatever-you-like that none of my systems that I manage here at WMU were infected. Turns out I was right.

Macs really aren’t susceptible to viruses and the biggest threat comes from Trojan Horses. To scan a mac for infection you just open up Terminal and run these two commands:

  • defaults read /Applications/Safari.app/Contents/Info LSEnvironment
  • defaults read ~/.MacOSX/environment DYLD_INSERT_LIBRARIES

If you get an error from both of those commands, you are in the clear. It’s quite easy to do, mostly just opening up Terminal and copying and pasting and getting the errors and being satisfied. The removal instructions are straightforward to follow, so even removal of an active infection should be a snap.

If you try these commands and don’t get errors, don’t panic. Just let me know and I’ll find a way to help you out.

Worst Case Scenario / Sleepless in Kalamazoo

My night was going very well. I was very pleased with how practically flawless my afternoon progressed. At work I have two very small computers in a very public setting and they are performing as usual, wonderfully. Around 2am I woke up with a start because a nagging feeling that I was forgetting something hit me square between the eyes in that fuzzy zone between being awake and just falling to sleep. I had exposed two of my machines into the cold dangerous world without getting their MAC Addresses or Serial Numbers!

In many ways my work computers feel a lot like beloved pets. I care about them and look after them, and in this case worry about their safety. They were rather far away and in a particularly exposed condition where it’s terribly infeasible to go to them, flip them over, and get the information off their cases.

ARD to the rescue! Once again Apple Remote Desktop saves the day and quiets my worried mind. I opened my MacBook, connected to my workplace VPN, opened ARD, found my two little ones happily chugging along and remembered that ARD has some rather good reporting features baked-in to the software. I clicked on the first machine’s icon and went to Reports. I asked for Serial Number and the MAC Addresses for both the Airport wireless network adapter and the wired Ethernet adapter. I did this for both machines and printed the results as ‘PDF To Evernote’. Now I have all the information I forgot to get earlier stuffed into my Evernote archive.

Now, if, light-forbid my two exposed machines get stolen I won’t be sitting there facing the police with my pants around my professional I.T. ankles utterly unable to conjure on the spot Serial Numbers and MAC Addresses.

Now perhaps I can get some sleep!

Shuffle thy mortal coil

Everything is done, for the Apple Digital Lifestyle project for our soon-to-retire management person. Getting to this point was a challenge only in terms of getting the data off of the old computer. The old machine was a Dell Dimension desktop loaded with Windows XP. I got the machine running and everything was fine, as far as Windows XP can be fine and I inserted my Knoppix DVD into the disk drive and rebooted. Then began the hurdles, the system was configured to boot first to the HD, not to the DVD, so I changed that and rebooted, the disk wouldn’t read and the system booted to the HD anyways, up comes Windows XP. Turns out, this computer is so old that it doesn’t have DVD, just a plain CD-ROM drive that I errantly mistook for a DVD drive. So I swapped out the Knoppix DVD and traded it for a Knoppix CD, rebooted and finally was up and running in Knoppix. I mounted the volume where the user files lived and used the tar utility to copy them over the network to my iMac on my desk. Once that was done I switched Knoppix out for DBAN, a popular hard drive erasing utility and booted into that, set it to chew away using DoD short wipe and proceeded to unpack the tar file I had copied over. I had unpacked the users data, trimmed out the meaningless Windows junk and ended up with about 800MB of user data in the end, mostly music and pictures and a few documents peppered in. I made a new ‘tar’ file and then copied that over to the new iMac using my handy-dandy USB file transmission cable. I had utterly blanked on the fact that both my iMac and the new iMac had fancy FireWire 800 capability, and only now that I reflect upon it do I feel rather silly in forgetting FireWire.

Once the data was over, I moved all the documents where they needed to be and then I thought about how I would manage the music and pictures. First was the pictures, I opened iPhoto ’09 (which came with the iMac!) and clicked on File, Import, pointed it to the directory that held the mishmash of user data and in about 45 seconds (I couldn’t help but time it) all the user pictures were now in iPhoto. I did the same thing with iTunes for the music and that took a whole 30 seconds. I then threw all the rescued remains in the trash (because they were now in iPhoto and iTunes) and then rescued bookmarks, that took a whole 10 seconds and into Safari it went. Cleaned everything up, installed the ‘Free’ HP All-in-one, and that took 2 minutes to unpack and 30 seconds to set up, I had a test print a minute later. Packed it all up, walked it to the manager’s office and he’s all set to enjoy.

What will he enjoy? His big thing is email and using iChat Video Chat. That’s the biggest selling point I think for this entire adventure. He can see his daughter and her budding family, full audio/video Mac goodness for as long as he likes to do so. I suggested that he could even set up a link in the morning and have a virtual “magic mirror” run all day long so they could spend time close to their loved ones without the expense or trouble of traveling.

After this entire adventure it struck me that I effectively ran an entire micro-sized Apple Store from inside my head. I had a Genius Bar (my office), I was the Genius (don’t have a fancy apple shirt, tho) and I got the user interested, sold, migrated, and trained – just like in an Apple Store. If Apple ever were to establish a store in Kalamazoo I would definitely moonlight there, without a doubt. The last time I did enter an Apple Store was with my Father in Syracuse a few months ago, the salespeople approached and I was busy pointing out a 21″ iMac to my Dad and as the sales guy approached he heard me actually running through his script. He chuckled and smiled and stood behind me. That’s why Apple succeeds, because they impress people like me and we become evangelists. Walking around, free Apple advertising and when someone comes up and asks, we show them all the wonderful fun they could have and then they go and buy into the dream as well, the cycle continues.