Nick Taylors blog

Icon

killing time with travel, technology & land rovers…

Media Temple: Moving WordPress and MediaWiki from (gs) to (dv)

I’ve reached the point where I’ve outgrown the Media Temple (referral link) (gs) gridservice offering and have migrated to a (dv) dedicated virtual plan. My primary reasons were increased scalability, performance and flexibility. I’ve read some negative comments about Media Temple, but I’ve been with them for 3 years and had no problems, other than the occasional slowness. Their customer service has always been responsive and helpful. 

I have a number of sites hosted on the (gs), including WordPress and MediaWiki sites with MySQL databases, some of them are mine and some below to third parties. 

(dv) comes with a Plesk front-end management tool, which is ok, but the first thing I did was enable ssh access as I prefer the extra flexibility that hands-on environment gives you. Though I did spend the afternoon familiarizing myself with the Plesk environment and I like it well enough.

There are a few caveats when moving WordPress to a new site. I also changed the domains, and that added some extra complexity. I moved:

I got rid of the leading hostnames mainly to simplify my environment and it also aids SEO

These are some of the things you should watch for:

  • The backup and restore of the database didn’t work well and I didn’t have much confidence in it. (mt) have a KnowledgeBase article on the subject. I used the command line to backup the databases like this:
    • $ mysqldump --add-drop-table -u Username -p dbname > dbname.sql
  • And restored them like this:
    • $ mysql -u Username -p dbname < dbname.sql
  • As I’ve moved domains, the databases needed some work to fix links. I found an article that was of help, but what you basically do is
    • update the wp_options table with:
      • UPDATE wp_options SET option_value = replace(option_value, 'http://OLDURL', 'http://NEWURL') WHERE option_name = 'home' OR option_name = 'siteurl';
    • update the references to absolute URLs:
      • UPDATE wp_posts SET guid = replace(guid, 'http://OLDURL','http://NEWURL');
    • update the posts that reference other posts on the site:
      • UPDATE wp_posts SET post_content = replace(post_content, 'http://OLDURL', 'http://NEWURL');
  • As I changed domain names, the permalinks broke. Make the .htaccess file writeable and in wp-admin/settings/permalinks hit “save changes” to regenerate the permalinks. If you have a problem here, it’ll probably be down to the .htaccess file either not existing or not being writable. 
  • WordPress on (dv) requires the permissions on the wp-content/uploads directory to be 777, or you have problems adding to your media library. There may be a better way of doing this, but after spending a couple of hours I decided it was good enough. You also have to either edit the wp_options table in the database or simply change the settings/misc uploads setting in WordPress admin to be “wp-content/uploads” (note there’s no leading “/”). There are a lot of threads on the (mt) forums discussing this, this is the most relevant one. The WordPress forums also discuss this problem
  • Also to allow successful uploads to your media library, PHP safe-mode has to be “off” as the httpd server and filesystem permissions are different. The easiest way to change this setting is via the Plesk control panel, but you can also edit /etc/php.ini
  • I had some non-WordPress files, mostly images, on the old sites, so I used .htaccess to redirect to the new locations, specifically for links to files and images I’ve been posting to forums for years, and didn’t want them to break. For example, http://nickt.com/landrovers redirects to http://exerro.com/oldsites/2009/http://nickt.com/landrovers/.
  • I use the WordPress Database Backup plugin, and it needed a new backup directory to be created in wp-content and made writable. 
  • I noticed that the WordPress Automatic Upgrade and the automatic plugin upgrades now require an ftp username and password. 
  • I setup MediaWiki to use short URLs, like Wikipedia, (aka removing “index.php” from the URL) in line with best practices for forming URLs using this method
  • Also for the “codex exerro“, I only allowed authorized users to read pages using this method
  • I temporarily disabled account creation by adding “$wgGroupPermissions['*']['createaccount'] = false;” to  LocalSettings.php

I’m still wondering whether or not to use Drupal instead of MediaWiki for both the “codex exerro” and a private wiki I’m building. Drupal has more flexibility in terms of user rights management (or is at least simpler than MediaWiki) and managing content (unsurprisingly as it is a Content Management System), but doesn’t look as good out of the box and is more complex to setup and maintain.

Anyway, it took around a day to migrate half a dozen sites and databases. I’m looking forward to pushing (dv) to see what it’s got!

Drobo Update – PSU problem

I’ve mentioned before that I’ve had problems with my 2nd generation Drobo. I’m not the only one.

I have to say, Valorie in Drobo tech support did a great job handling my case. It seems that it may be a PSU problem (yes, just like my Lacie drives!). Both the Drobo and the Lacies come with cheap Chinese-made PSUs.

Drobo PSU details

As you can see from the photo, it should be capable of outputting 6.7A at 12V. My multimeter said 12.36V, though I’ve no way of measuring the current draw when active. Drobo support said that the 1TB Hitachi Ultrastar HUA721010KLA330 drives are a known “power hog”. The drive itself states a current draw of 850mA (I have 2 installed, the other 2 are 750GB Seagate Barracuda ES ST3750640NS, with a stated draw of 520mA, so there could be some truth in that. If this is the case, I know from personal experience that it’s possible for multiple restarts to corrupt volume information resulting in data being lost.

They are sending me a new PSU, so we’ll know soon enough.

ZFS Server Specs

I’ve done some research over the past few days and have pulled together a component list for building my home-based ZFS NAS server. I’ve made the list available via Google Docs, click here for the full version.

I’ve not had time to jot down my reasoning behind this, but in summary this configuration gives me the capacity I need now, room for future expansion, fits into my rack at home, and is (almost) in budget.

Antenna Cabling Components

I’ve mentioned this before, but now I’ve almost completed the antennas and cabling from my shack in the basement to the Diamond X6000A on the roof, the Diamond X50A in the attic, and the yet to be installed Alpha Delta DX-EE. This should give me good coverage from 40m up to 23cm.

I really like the Times Microwave products, and the connectors work well with their cabling, obviously. I’ve used LMR-400 [LMR-400 specs - PDF] and LMR-400 Ultraflex [LMR-400-UF specs - PDF] for VHF/UHF and I use Belden 8267 for HF. The connectors I’ve used are the TC-400-NMC N-connector [TC-400-NMC - PDF] and the EZ-400-UM PL-259 connector [EZ-400-UM - PDF]

I usually source cabling from Ham Radio Outlet and get the Times connectors from Hutton Communications.

Fscking storage!

Alright. I’ve had enough.

I’m a reasonably demanding home storage user, I guess I have around 3 TB of data and 4-5 TB of capacity at home. Photos take up close to 1TB, I’ve a lot of my own video, transcoded video, and music.

RAID Grave

I’ve tried all sorts of solutions – external drives, Infrant (now NetGear) ReadyNAS, Drobo, etc. They all have their shortcomings. My Drobo, with over a TB of data let go. My ReadYNAS 600 died of old age (it was sad to see it go). Playing with multiple 1TB external drives is fragile and stressful. All of these products (except the ReadyNAS) are black boxes, the most status you get is a green LED or no mounted volume. At least the ReadyNAS has a MIB available, and I’ve used Nagios to monitor my ReadyNAS NV:

aluminas-status.jpg

I’d also been thinking about failure, and I’ve had controller failures, PSU failures, disk failures; and it occurred to me that even RAID5 may not cut it. It seems I’m not alone in thinking this, and I found that Robin Harris over at storagemojo.com had been thinking this since July 2007. He also thought some more about disk reliability. I also like Joerg Moellenkamp’s presentation about the end of RAID5.

Feeling validated in my concerns, I decided to brainstorm a little and decided I need to have a storage facility to provide the following:

Fast response and transfer time; simply locate it on my GigE LAN at home.
Around 12TB storage, expandable
Rack-mountable
Open Operating System
Very configurable
Monitorable
The ability to support something more reliable than RAID5.
Be affordable, budget around $2k

There’s only one thing that meets all these criteria, I have to build my own ZFS Server.

133831135_c86f117c5c_o.png

By the way, fsck is not a rude word!

Drobo woes

A while ago I bought a Drobo, the 2nd edition with Firewire 800 as I thought it’d be a nice way to get a could of TB of storage attached to the Mac Pro. A lot of people rave about the Drobo, but I’ve found it to be a disappointment. It seems like a great idea, but I’ve had problems with it.

drobo-share-inside.jpg

Firstly, I had a few hundred GB of ISOs that I needed to off-load from some external drives (for temporary storage, I use and recommend the 1TB Samsung SpinPoint F DT HD103UJ, a nippy and (so far) reliable drive with a 3-platter array. Maximum PC has a good review. I combine it with with good looking and performant Icy Dock MB559UEB-1S-B, with USB2 and Firewire 800 interfaces. I moved the ISOs over to the Drobo, after some testing, and of course, after I’d deleted the ISOs from the external drive, the Drobo started playing up.

It would restart a few times a day, and then it would hang occasionally. After leaving it for a while, I’d always have to cycle the power by pulling the PSU lead out from the back. I’d opened a support ticket with Drobo when the thing stopped mounting.

Something clearly had become corrupt, as when I tried to mount the Drobo volume my Mac (both my Mac Pro and my Macbook Pro), would crash with the black screen. Not good. I used a combination of tools, including Data Rescue II, Techtool Pro, and Disk Warrior 4 – they couldn’t help. At this point I knew Drobo couldn’t help, and as the data was recoverable (albeit in a time-consuming way), I blatted the hardware and drives and put them in a factory default condition. I’ve upgraded the Firmware to v1.3.0, the dashboard to v1.2.4. and guess what, the damn thing is still restarting.

I’ve had it with consumer grade crap. I’m building a ZFS server.

Animoto – quick and easy slideshows from your on-line photos.

After I saw Michael Arringtons post on “Animoto On the iPhone“, I had a little play with both the iPhone app and their website. I’m impressed. It solves a problem I’ve had for a while – how do I make quick and dirty slideshows from my photos? Well, with it’s flickr/Facebook/SmigMig/Picasa/photobucket integration, as well as the ability to upload photos and music from your computer, it took me <1minute to get my first 30s video working. Take a look here: 

I’m liking it, in fact I’ve just bought an “all-access-pass” which will let me create and download longer videos. 

So far, recommended.

LaCie drive problems again!

I’ve had a few LaCie drives in my time, and all but two have given up the ghost. The remaining two were on light-duties, but both recently refused to spin-up after a reboot.

I found that it’s not a rare problem, and after reading this article, I stuck my multimeter on the power cable and found they were both barely putting out 11V, 1V less than the specified 12V. The 5V line looked a little low too.

So anyway, I logged a support ticket with LaCie, who said as my drives are out of warranty I’d have to buy a new PSU for $20. I followed-up by reminding them that it’s a well-documented problem on the interwebs. They promptly responded with a offer of 2 free PSUs!

Bravo LaCie, but you should have offered them up straight away if you know there’s a problem with this batch of PSUs. Still, I’m happy you handled this case as well as you did – many thanks.

Still, I’ve moved on. I’m not a fan of the RAID0 stripes LaCie use in their products, I’ve lost data because of it (and spent $2k to get it back). My Drobo isn’t behaving well either. The Netgear/Infrant ReadyNAS NV is still going strong though – if I wasn’t building my own NAS I’d buy the ReadyNAS Pro.

I can’t wait until my 12TB ZFS, RAIDZ2 server is up and running…

ConnectCharge Inlets for the Land Rovers

As the D90s are not used every day, it’s wise that we look after the on-board batteries. I recommend the CTEK maintenance chargers, which are easy to mount on-board (I have the US800 model installed under the seat in the Defenders). 

However, connecting an extension cord currently involves crawling under the truck, removing a waterproof cap and plugging in the extension – not ideal, you get grubby and it is a little vulnerable to rock damage. 

I discovered that Marinco/Guest make some great electrical accessories designed for marine use as part of the “ConnectCharge” system. It does what it says on the can, it connects your internal charger to the shore supply. I picked up a couple of ConnectCharge Inlets (P/N 150CCI) and some ConnectCharge cords (P/N 157200) which clip together to make a robust system (BTW, I ordered them from http://www.stayonline.com). 

Now the inlet requires a 1-7/8″ hole. I’ll be mounting mine on the wing vents, which means I can easily replace the vent cover and I won’t damage the wing. Coupled with two retractable power extension cords, which will plug into the ConnectCharge inlets I think I’ll have a much better system. 

Of course, the ultimate solution is to have an automatic ejection system, like the Kussmaul Super Auto Eject, as found in emergency vehicles.

OSX Security Checklist

SANS SCORE is a good effort in promoting minimum security standards and best practices. Amongst the various checklists, I came across a good one for OSX, with Eric Conrad being the team lead. 

Along with Apples “Mac OS X Security Configuration for Version 10.5 Leopard” [PDF link], it provides a good background into securing your Mac. 

I’ve a mirrored version of the SAN document here.

Archives

what am I doing?

Google Friend Connect

flickr stream

Copper Mountain near Ski Area Acc & State Hwy 91 near Founders Village, CO, United States Falling Rock Tap House Winter Park Backblaze problem near Founders Village, CO, United States near Founders Village, CO, United States Protesting for the sake of it Denver International Airport, Denver, CO 80249 San Diego International Airport Altitude Sky Lounge Hamltons Tavern near 5th Ave & Market St San Diego Convention Center San Diego Convention Center Santa Fe Depot near Garfield St & E 7th Ave Winter Park Resort London Heathrow Heathrow Airport Terminal 5, Heathrow Terminal 5 (Stand 31) London Heathrow Airport Washington Arts Centre Strat Strat Strat Strat Strat Strat Strat