Take Control of Drobo + Time Machine

03 December 2008 | By Ian in Apple, Hardware, Hobbies, Misc | No Comments Yet

The Drobo storage device is a beautiful piece of technology. It is quite possibly the most user-friendly RAID (like) device on the market. With very little effort, you can have 3TB+ of failure-protected storage at your fingertips.

The problem with the Drobo is that in order to change its true data capacity on the fly and dynamically share it between multiple volumes, it must create “pretend” volumes in even-sized chunks. 2TB, 4TB, 8TB, and 16TB are the options currently available. This means that if you have 1.2 TB of actual space, the Drobo will tell your OS you have two or more TB.

This isn’t usually a problem except when you are running low on space (the Drobo is good to warn you when this happens) or when you are using the Drobo as a Time Machine storage device. Time Machine will continue filling up a drive until it is almost full.

In this post, I will provide you with a simple approach that will allow you to isolate your Time Machine data and give it room to grow in the future.

Preparation
If you have an empty Drobo, I suggest you format it with the largest size you feel comfortable with. Drobospace has a good article explaining the tradeoffs of formatting with a larger partition size.

Open Apple’s Disk Utility and click the drive icon (not its nested partition(s)) for your Drobo.
Next, click the Partition tab and examine your data volumes. You should see one or more named segments in the Volume Scheme section.

Most likely you have just one large volume here named Drobo. If you already have more than one volume, we will work with the largest one.

Making the Time Machine volume
If you already have a dedicated partition for Time Machine, you can skip to the next segment.
You should see a small resize handle in the lower right corner of the DLP. If not, you have journaling disabled. See the note on enabling journaling below and then return here.

Press the plus button below the Volume Scheme display to create a new volume. Name this volume something descriptive like Drobo Time Machine. Make sure to use the format “Mac OS Extended (Journaled)”.

Next, drag the volume size divider so your new Time Machine partition will have a much space as you can see yourself giving it down the road. I’ll create an 8TB partition and allocate a 4TB volume to Time Machine.

Finally, press the Apply button and let OSX create the new volume. Note that the Drobo may throw some free space warnings during this procedure. This is merely an effect of the OSX partitioning process. This procedure can take a long time depending on how full and how fragmented your Drobo is.

Give Time Machine only what it needs
Now that you have a volume just for Time Machine, you need to shrink it down to just the size you want TM to use for now.

If I have 1.6TB of usable space available on my Drobo, Time Machine will eventually gobble all that up if I leave the new 4TB TM volume as-is. The final step is to shrink that volume down to the right size for now and to expand it only when you are ready.

In Disk Utility, your new volume should have a small resize handle in the lower right corner. Grab that handle and move it up to shrink the volume. I want my Drobo to always have at least 1TB available for usable storage, so would shrink the TM volume down to 600GB.

Press apply and let the Mac resize the partition. Your Time Machine volume is now the perfect size for your backup needs. When you need to enlarge that volume in the future, just go back into Disk Utility and drag the volume handle down to the desired size.

A word on journaling
If the options to resize or split a partition are disabled in Disk Utility, your drive is either not formatted as Mac OS Extended or has journaling disabled. Having the wrong format type will require a volume reformat in order to continue. No journaling is a quick and simple fix:

Open Terminal.app
Run the command “diskutil enableJournal ‘/Volumes/My Drobo’”
Substitute “My Drobo” for the appropriate name.

Once you have completed the volume creation and resizing procedure, you probably won’t need to re-disable journaling. If you have a good reason to turn it back off, run the command “diskutil disableJournal ‘/Volumes/My Drobo’”.

There was a time several months ago when Apple Time Capsule devices required connected Drobos to have journaling disabled, but that problem has long since been fixed. Journaling should be enabled on all Mac OS Extended volumes unless you know what you are doing.

For more information, Apple provides an excellent KB article on the topic.

Summary
I hope this explainer proves useful to you if you find yourself in this situation. Please feel free to share your experience in the comments below.

Let Me Google that for You: Mesothelioma

01 December 2008 | By Ian in Misc, Opinion, Sites of Interest | 4 Comments

A co-worker just pointed out a wonderful new tool for those who are frequently bothered by people who would rather ask you question instead of Googling it themselves:

LetMeGoogleThatForYou.com

Aside from being snarky and satisfying, it immediately struck me as a brilliant money maker. Perhaps even the best Google AdSense for Search referral generating tool since Mozilla put the Google search bar in every broswer it ships (Mozilla pulled down 75 million USD last year from your searches).

So, next time your cousin wants to know all about mesothelioma, send your response by way of LMGTFY and know that those guys are probably making a good chunk of the $40-$60 CPC the keyword “mesothelioma” commands.

Of course, I am in no way affiliated with LMGTFY. If they aren’t using their site as a Google search revenue generator, they’re missing out.

Update:
I’ve delved into their code and it would seem that they aren’t currently monetizing their searches. Perhaps it is better this way because it might break Google TOS to have their current gag auto-submit the search on behalf of the user.

Still, if you arrived on this page after searching for mesothelioma, I have my own ads that I use to help cover the cost of this and all my other sites. Just sayin’…

Update 2:
Good for them! The site is now sponsored by 37 Signals and they are bouncing traffic through Google AdSense for Search. Unfortunately, the referral version of the search results does not have the pretty look that traditional search results do. However, this does not degrade from the original thrust of the site which is to teach people that they, too, can use the Google.

A New Home for Package Tracking: Boxoh.com

25 November 2008 | By Ian in Development, Google, Hobbies, Made by isnoop, PHP, Related sites, Site Features | 7 Comments

My Google maps making, RSS feed slinging, universal package tracker has moved to greener pastures. Boxoh.com is your new go-to place for tracking UPS, FedEx, USPS, DHL, and Airborne packages.

Backstory: In 2006, I posted a handy new utility I’d cobbled together which was a mashup between package tracking for for multiple services. It quickly became by far the most popular page on this site, with more than 1.4 million tracking requests last month. It gets more than three times the traffic of my movie theater RSS generator and four times the traffic of another spinoff site, FeedSifter, a simple RSS/Atom feed filter.

If you are familiar with MediaTemple’s GridServer service, you’ll know that using up all 1000 GPUs (server work units) for the past several months is not a good thing. Those cycles weren’t just going to waste on poorly written scripts, either. Each hit to the tracker consumed an average of 0.0002 GPU (WordPress uses 8 to 16 times that with each hit). It wasn’t always this way, though. Check back soon for an upcoming post on how I managed to cut down the CPU usage of the package tracker by 90% with some intelligent code analysis and a creative caching solution.

Boxoh.com is now hosted on a screaming VPS server with plenty of spare power. I’m taking full advantage of APC caching and several other behind-the-scenes tweaks one can only get a grip on when they are running a dedicated server.

Thanks to all of the people who have made the service so popular!

Also, thanks to Juplex for a fast and friendly site design!

Power to the Depot

17 November 2008 | By Ian in House, Misc, Opinion, Rants, The Emerald City | 4 Comments

I should preface this by saying that I normally do my home improvement shopping at Lowe’s. Historically, they have had better customer service and have a higher likelihood of carrying the oddball things I require for my more unusual projects.

This weekend I found myself going back and forth between Lowe’s and Home Depot as part of a home improvement project. Each time I visited Home Depot, I noticed an unnerving trend: abnormally attentive employees.

There were a lot of staff on hand and they kept stopping me and asking if I needed any help. At first I thought it was because I was one of the few people in the hardware store at 9am on a Sunday. Perhaps with my large graph paper pad, they assumed I was a mystery shopper. Maybe they just had a corporate pep rally so they could be expected to be truly helpful for a few days before going back to the norm.

I knew something was up when an employee helped me load several dozen pavers and a few bags of sand onto a cart, pushed them through checkout, and then helped me load it all into a truck. He even brought me a spare bag of sand after one tore a little bit.

I pointed out that his service was exemplary and that everyone was abnormally helpful for a big box hardware store. He confessed that they are running a new program called “Power Hour” from 8am to 8pm on weekends. During this time, they boost staff and have everyone make sure all of the customers are well attended to.

Home Depot may have just discovered the secret to weathering this economic downturn.

In a time when many companies are trying to lure in customers with lower prices, rebates, while cutting staff, at least company is spending their customer attraction dollar on its employees. In the home improvement market, they probably don’t have a lot of wiggle room for big sales and discounts. Making sure they have plenty of staff on hand who are eager to help will probably make a huge difference for them this season.

Unfortunately, it is a bit of a catch-22. They’ll have to rely on word of mouth for news of their improved service to spread. They can’t reasonably run an ad campaign shouting “We now have the customer service you want and deserve* (*Saturday and Sunday between 8am and 8pm)”. Still, this is probably a big expense for them and they are going out on a limb. If they don’t see a reasonable return, they may just drop it and go back to the way things used to be.

If you shop at a Home Depot this season and you experience exceptional customer service and attentiveness, let the staff know and maybe even let corporate HQ know.

With any luck, this is just the beginning of a revolution in big box home improvement customer service.

PHP Closing Tags Stealing Your Cookies?

24 October 2008 | By Ian in Development, Opinion, PHP, Rants | 6 Comments

PHP logoAs a professional PHP developer who enjoys helping others learn about the language, I have noticed several phases of PHP skill development. One of the first phases is when one stops piling all of their code into one file and starts storing their classes and specialized logic into reusable files. For some, this change brings on a wave of problems that may be very difficult to track down.

The Problem

At some point, many PHP developers run into an inexplicable White Page of Death or at least stubborn cookies and headers that won’t change when they should. A common cause is include files with white space after the PHP closing tag. Your web server might send these characters to the browser before you process your header() or setcookie() calls, causing them to fail. PHP allows for a single newline after a PHP closing tag before it starts interpreting characters as output.

Solutions

Omit PHP closing tags
The PHP closing tag is useful when you embed PHP into a page that already contains other content such as an HTML template. However, if you only intend to have PHP logic in a page and nothing else, you can omit the final PHP closing tag:

<?php
$test = new testClass();
$test->helloWorld();
// End of PHP script. No closing tag needed.

This approach does not incur any additional resource penalty to the server.

Output Buffering
If you feel that you need to send output before processing headers and cookies, you should use output buffering. The ob_* class of PHP functions are very useful in these circumstances, but be aware that it comes at the cost of an increased memory footprint and slightly slower processing.

Error Logging
Instead of silently failing or dying with a white page of death, error logging would tell you exactly what is failing and why:

[24-Oct-2008 15:17:31] PHP Warning: Cannot modify header information - headers already sent by (output started at /websites/demo/htdocs/whitespace.php:5) in /websites/demo/htdocs/cookie.php on line 8

I suggest everyone who develops in PHP do so with log_errors enabled. If develop with logging on from the beginning of your project, you will quickly capture potential problems before they grow too great in number and become overwhelming.

I prefer to set my error_reporting level to “E_ALL & E_STRICT” because many standards and best practices are enforced with these messages. (E_STRICT will be included as part of E_ALL in PHP 6)

Once you have logging enabled, you can SSH into your server and “tail” your error log for real-time error output:
[ian@devbox]~ tail -f /tmp/php.log
Using the “-f” flag will follow the log and give continuous output as it appears in the log file.

Please note that logging should be used sparingly (at least at a higher error_reporting level) in production servers. Also, I advise against using PHP’s display_errors in any case, especially production servers. In a production environment, this argument can provide dangerous information to site visitors. You may find it useful in development, but I find that not all errors will be visible or readable when output within your page. However, your log files will never let you down.

New MacBook Pro is Looking at You?

18 October 2008 | By Ian in Apple, Hardware, Rants | No Comments Yet

I’m in the Apple store right now playing with a new MacBook Pro. I love the backlit keyboard of the original MBP, so I decided to get it to light up in this bright showroom for a quick demo.

On the old MBP, you’d cover both speaker grilles at once. There is a light sensor in each one and the brightest of the two is used to determine how much to dim the screen and brighten the keyboard.

Covering the speakers in the new laptop didn’t work, so I tried placing my hands symmetrically all along the sides of the screen. The screen finally dimmed when I slid my fingers across the top bezel above the screen.

Whenever I blocked the camera’s eye with my finger, the screen would dim. This was a troubling revelation. If the MBP is using its camera as an ambient light sensor, that means it is effectively always on and collecting image data even when the recording light is off. This would be a significant departure from the original built-in iSights where Apple claimed the hardware that drives the camera is so tightly linked to the indicator LED that one could not record you without your knowledge.

I busted out my credit card for some fine-tuned testing. I slowly slid it across the top of the bezel and found that it didn’t always dim when I covered the camera. In fact, it only dimmed when the small lighter spot just to the left of the camera was covered. I had assumed that this was the green indicator LED for the camera. A quick trip to Photo Booth confirmed that the LED is in fact on the right side of the camera.

So, rest assured that your new MacBook and MacBook Pro are not constantly recording you as you write emails in bed with your hair in curlers. The placement of the light sensor may cause concern at first, but a bit of investigation quickly indicates that there is little to worry about.

Cryptographic Key Rotation Solutions?

07 October 2008 | By Ian in Development, Misc | 1 Comment


I’m working on PCI DSS (Payment Card Industry Data Security Standards) compliance for my company and one of the bigger hurdles we’re looking at is cryptographic key rotation. Our biggest concern is rotating keys for data stored in a DB. It seems we have two solutions and one theoretical option available:

1) 3rd party vendor
There are several companies offering appliances that are essentially crypto proxies which act as a middle man between data and logic.

2) Home brew
We’ve considered storing a key version number next to the encrypted column in the database. When one key is to be disused, a new one is generated and every value stored with the old key revision number is decrypted and re-encrypted with the new key. Meanwhile, all of the data is still accessible as the old key is not invalidated until all rows using that ID have been updated.

3) Theoretical crypto magic
I’m no cryptography expert, but it seems that there should be some means of generating several symmetric keys that result in the same encrypted data. Those keys could then be split into a shared/private pair where the system requesting the data only knows the shared portion; the private portion is a secret known only to the machine performing the encryption. The private key can be invalidated on demand and a new pair generated. No machine need ever store the complete key.

I don’t know if this last scenario is possible. If it’s not out there yet, this may be an interesting market for such a scheme. If there is a workable solution, this may be the ideal solution.

Are there other solutions I’ve overlooked? If you’ve implemented key rotation on DB data, what method did you use?

T-Moble Forces an iPhone User to go Legit

08 September 2008 | By Ian in iPhone, Misc, Rants | 7 Comments

I’ve been a very happy customer with T-Mobile for over four years now. Ever since the beginning, I have been using various smartphones with their T-Zones service. T-Zones was originally intended to be a walled garden internet service where you pay $4.99 (when I signed up) each month for the privilege of being able to view T-Mobile’s WAP store. However, a salesperson clued me in that smartphones generally have the ability to change their network settings and with a couple of minor tweaks, you get full internet access at a much better rate than the $19.99 data plan they sell.

All this changed a couple of weeks ago. At first I thought it was just my phone, but after a while of not being able to access my maps and email, I called T-Mo up and found the real reason:

T-Mobile has disabled the hole that once allowed T-Zones users to access the full internet.

As an interesting aside, T-Mobile knows all about my hacked iPhone. In fact, they have people who are trained to deal with it on a limited basis. That means that they can also tell just how many hacked iPhone users there are out there with T-Zones. Perhaps some exec saw these very figures and assumed that at least one in four would stand to have their internet access prices quadrupled. However, I won’t be one of them.

I’m currently paying just under $60/mo all taxes and fees included for 1500 anytime minutes, 400 text messages, and (previously) unlimited internet access. If I bend to their new rules, that price will jump to nearly $80/mo. At that price, I might as well transfer over to AT&T and finally go legit.

By finally switching to AT&T, I get all of the following:

  • No more jailbreaking
  • Visual voicemail
  • A warranty for my expensive phone
  • Access to the latest hardware
  • A more legit tax write off since I have a business license to develop software for the iPhone

But at what cost?

  • Ending a four-year run with a carrier that I really like who generally respects long-term customers
  • Opening a two-year contract with a carrier who sees long-term customers as a threat, so they milk every dollar they can out of long-term contracts
  • Losing the warm fuzzy feeling of saying “screw you” to the man and using my phone on a different network

So what now?

Tomorrow is Apple’s press event. Due to the fact that Best Buy just started selling iPhones yesterday, I doubt there will be an iPhone update, but there is no sense in rushing out today to buy one. Also, I’m about to take a two week trip to Europe and I’ve found that aside from being generally more expensive domestically, AT&T is also $0.30 more per minute for international roaming calls where I will be.

So for now I sit tight. As soon as I return from my trip, I’ll be reluctantly terminating my account and shackling myself into a terrible contract with a terrible company–that is, if my beloved T-Mobile hasn’t changed their mind.

How Green Is My Thumb?

22 April 2008 | By Ian in Hobbies, House, Made by isnoop, Misc, Related sites, The Emerald City | 3 Comments

This is the first growing season in our new house. We have quite a bit of gardening space, so my wife and I will be attempting to fill that space with beautiful and edible plants.

In an attempt to keep this information handy for my own reference, I have decided to start a journal. I’ve made it public in the hopes that it someone might care to share some advice or learn from my inevitable mistakes.

The blog is called The Nu Leaf.

Tags:

iPhone Developer Program: The Gift of the iMagi

24 March 2008 | By Ian in Apple, Development, iPhone | 3 Comments

This morning, I completed the final step to activate my iPhone Developer Program membership. The last news I heard about this program indicated that it was (I assume it continues to be) a fairly exclusive program and they are only allowing small numbers of people to join at this time.

I didn’t apply for it until late last week, and I didn’t download the SDK until late in the day it was released, so I’m not sure how I got in so easily. Perhaps they’ve opened the gates to everyone or maybe I just got lucky. I did write a couple of mac apps in the past: MacSaber and WiiSaber. Perhaps they saw those uploads in the Apple Software site and took an interest.

No matter the reason, it’s a bit of a mixed blessing for me. For one, I’ll have to drop my fantastic T-Mobile cellular plan and go legit with my iPhone to run the dev software. I’m currently paying $45/mo for 1500 minutes, unlimited data, and no contract. I’m looking at $79.99/mo for a comparable AT&T plan.

What’s worse, as much as I’d like to, I just don’t have the time to write iPhone apps right now. Heck, I haven’t been able to find enough time to update this blog in months!

Boo hoo, right?

Well, I’ll just have to make the time to write some apps. I have several promising ideas, and I’ll need to sell at least one of them to help justify the increased monthly cost of the new service.