Loading

Monday, October 10, 2011

Expanding a Virtual Disk on a Dell MD 3000i SAN - How To

If you're like me you don't allocate all disks to a SAN out of the gate.  I like to keep a little in reserve so I can add capacity when needed.  Then, once all the disks are added I'll usually pickup a couple more disks and keep those in reserve.  In either case once it comes time to add capacity to a virtual disk on a Dell MD 3000i SAN it can be a little tricky.

This will be accomplished in two steps.  First add the capacity of one or more physical disks to a disk group.  Next expand the virtual disk.  The first step is rather easy and done through the Modular Disk Storage Manager utility.  Step two is a little tricky as it uses the Dell smcli command line utility.

Step 1 - add one or more drives to a Disk Group
  • Open the Dell Modular Disk Storage Manager utility
  • Click the Modify tab
  • Under the Storage subsection click Add Free Capacity (Physical Disks)
  • Select your disk group, click next
  • Select the capacity/number of disks, click finish
Now if you go back to the Summary tab and click Disk Groups & Virtual Disks you can see that you have free space available.


NOTE: This step can take some time to complete. Depending on the size and type of RAID you are running, it may take several hours or more (even days!) to complete. It will not take the disk group down, but may slow things a bit.  Also, this MUST complete before you can perform the next step!  If you jump the gun and run step two prematurely you'll receive the message, "Error 11 - The operation cannot complete because a virtual disk is performing a modification operation..."




Step 2- Expanding a Virtual Disk
  • Decide how much space to add in Bytes.  You could use a calculator such as this or this bit calculator.
  • On the computer running Dell Modular Disk Storage Manger, open a command prompt.
  • Navigate to Program Files\Dell\MD Storage Manager\client OR Program Files (x86)\Dell\MD Storage Manager\client if you are on a 64 bit machine.
  • Use the smcli command to expand the disk. Examples below.
smcli Syntax: smcli ArrayName -c "set virtualDisk ["virtualdiskname"] addCapacity=virtualdiskcapacityinbytes;"

Example smcli command - assumes the following:
  • MD3000i named SAN1
  • Virtual Disk named Disk1
  • Want to add 500GB to virtual disk
smcli -n SAN1 -c "set virtualdisk [\"Data1\"] addCapacity=536870912000;"
While this expands the capacity of the SAN virtual disk the operating system may not automatically recognize it.  On Windows 2008 server perform the following:
  • Open Server Manager 
  • Go to Storage, Disk Management
  • Right-click the desired Windows volume and select Expand Volume
  • Follow the prompts in the Extend Volume Wizard

Thursday, October 6, 2011

Cisco ASA ASDM Install and Download

A few months ago I got a new work computer.  Since it was a good opportunity to start fresh I didn't transfer all the programs from my old one to the new.  And one of them I neglected to transfer was ASDM.  I wasn't too worried about it since I often manage my ASA firewalls via the terminal using PuTTY.  But I had a need for ASDM recently so I downloaded it and ran it from my computer, but to my chagrin I received the message, "Unable to launch device manager from..."  Crap!

Since I couldn't remember exactly how to download ASDM from my ASA and it took me a bit to figure out.  And since I wanted to upgrade to the latest anyway, I thought I'd write myself a reminder here so in a year or two when I get a new computer I don't have to go through this same trouble again.  I hope others find it useful as well.

First, download the latest ASDM bin file from Cisco (you'll have to have a valid SmartNet contract to access the downloads section).  At the time of this writing the latest version is asdm-645.bin.

With that downloaded use something like TFTP to copy the file to the ASA.
config terminal
copy tftp: disk0:/asdm-645.bin
Next, register the ASDM bin with the ASA.
config terminal
asdm image flash:asdm-645.bin
NOTE: the ASDM version needs to be compatible with the IOS on the ASA.

Finally, access the ASA's admin interface with https://<LAN_interface_IP&rt;/admin.  NOTE: this has to be on the LAN interface, either from a computer running inside the ASA, or for an external computer connect via VPN, then access ASA's LAN interface.


Click the link, "Install ASDM Launcher and Run ASDM."  Follow the steps to install and connect to your ASA.

Wednesday, October 5, 2011

Steve Jobs 1955-2011

I'm no fan of Apple, but as a techie I have a profound respect for Steve Jobs and everything he's done for my industry, for computing in general and for consumer electronics.  Well done Steve!


Monday, October 3, 2011

Amazon ELB & IIS - Capturing Client IP Address

I've been using Amazon EC2's Elastic Load Balancer (ELB) for a couple years now to load balance web applications, and for the most part it's been great.  The one draw back I've run into is that IIS logs the load balancer's private IP address as the c-ip address, rather than the client's actual IP address.  Essentially the ELB acts like a NAT device.  This can be a problem when trying to troubleshoot requests to your IIS sites.  And is just plain annoying.

So I finally did a little digging on this and found a simple and elegant solution.  That is for IIS to log the IP address value of the X-Forwarded-For request header which ELB populates with the client IP address when it forwards the request to IIS.

Start by downloading the IIS X-Forward-For ISAPI Filter from F5 (click here for more information), and extracting the files.  There's a lot here, including source code, but all you need is the appropriate F5XForwardedFor.dll, either x86 (32 bit) or x64 (64 bit).  To make it easy I copied mine to the root of C:\inetpub, i.e. C:\inetpub\F5XForwardedFor2008\x64.

Next, open IIS Manager, highlighting the server name in the Connections pane.  In the <servername> Home pane double-click ISAPI Filters.  Then in the Actions pane (upper-right corner) select Add.  Give the filter a name (I used Xforward) and specify the exact location of the Executable (F5XForwardedFor.dll).

NOTE: by adding this at the server level it will apply to all sites on the server.


Click OK and you're done.  Now, sit back, relax and wait for your server logs to accumulate.  Here's a view of an IIS log after enabling the F5XForwardedFor ISAPI filter.


NOTE: After installing this ISAPI filter I did notice a slight CPU load increase on my IIS servers, around 1-2% more.  Basically my servers average between 10% - 30% under normal load, now they average about 12% - 32%.  Not much, but noticeable, but in my opinion worth the load.

Thursday, August 11, 2011

Copying an EBS-backed Windows 2008 AMI Between AWS Regions - How-to

Unfortunately Amazon doesn't have an easy or native way to copy or move or launch an AWS AMI from one region to another.  There are a number of posts on the Internet about how to do this with a Linux AMI, but I haven't been able to find clear instructions on how to do this for a Windows AMI.  So, here we go...

The basic steps involve starting a temporary Windows instance in each of the two regions, say us-east-1 and us-west-1; attaching the EBS boot volume to the server in the "source" region; making an image or zip file of the volume; copying the volume to the temporary server in the "destination" region; extracting the file to a new volume; finally, attaching that volume to a server.

Notes:
  • This will take a while (several hours), particularly if your AMI is large.
  • Clean up the boot volume of the image you want to copy to another region by deleting any unnecessary files, such as temporary files, etc. as it will reduce the overall time this process takes.
  1. Launch a temporary Windows instance in the “source” region and another one in the “target” region. (You may not have to launch temporary servers if you have one available in each that can handle the load of compressing a large volume which can be quite CPU intensive.  Additionally you need to have enough available disk space for the compressed volume to be stored temporarily.)
  2. Determine the snapshot for the boot volume you want to migrate (you must own the AMI) using the command ec2-describe-images.


  3. Create a new EBS volume from that snapshot in the same zone as your origin server.  This can be done many ways, but here's how to do it from the command line using the AWS tools:
    ec2-create-volume --snapshot <snap ID> -z us-east-1c
  4. Attach that volume to your temporary server instance as, say, “xvdg”:
    ec2-attach-volume <volumeID> –i <instanceId> –d xvdg
     NOTE: You will be able to browse the contents of the volume in Windows Explorer.

  5. Connect to your temporary source server with RDP.
  6. Zip the entire contents of the newly attached volume.  NOTE: I used 7zip and sent the zipped file to another volume on the temporary source server in 1GB chunks (this makes it easier and quicker to transfer to the destination server; in particular you can begin copying the chunks soon as each is finished rather than waiting for one large file.)
  7. Copy that zipped file (or files) to your instance in the “target” region.  This could be done by a variety of methods.  I chose to copy my 1GB chunks to an Amazon S3 bucket, then I could easily download those onto the destination server.

    In the target region:

  8. Create an EBS volume of appropriate size (30GB for Windows 2008 by default) and attach it to your temporary destination server.
  9. Unzip the file to the new volume.  Again, I used 7zip.
  10. Detach the volume.

    Now, for the Windows specific stuff….

  11. Launch a basic Windows 2008 instance of the right architecture (32 or 64 bit).
  12. Soon as the instance is “running” (see Pinging Amazon EC2 Instances to determine exactly when your instance is available) stop it and wait for its state to become “stopped”.
  13. Once it stops, detach its “/dev/sda1” volume and delete it using ec2 commands:
    ec2-detach-volume <the_volumeID_of_sda1> –i <new_windows_instance>
    ec2-delete-volume <the_volumeID_of_sda1>

  14. Now attach the new volume (from steps 8-10) to the stopped Windows instance as ‘/dev/sda1’:
    ec2-attach-volume <vol_id> –i <windows_instance_id> –d /dev/sda1
  15. Start the instance to make sure it boots, and connect to it with RDP.
  16. When you’re satisfied that it boots and is setup the way you desire, stop the instance using ec2stop -i <instanceID>.
  17. Finally, create an AMI from that server by running ec2-create-image -i <instanceID>.
That's it.  Now you have an AMI in a different AWS zone that is a copy of one from your initial zone.

How Can I Improve My Web Site's Search Results Ranking?

Tonight my friend contacted me and asked how she could get her store's new website to show up in search results.  While I don't claim to be an expert I do have a little experience with web sites, ecommerce, blogging and SEO (search engine optimization).  Here's a list of what I told her just shooting from the hip.

I told her it's definitely a multi-faceted approach.  First, her site looks good, is easy to navigate and has relevant information.  Without a decent place to start none of the rest of this will matter.
  1. Start with a good site with good, relevant content.
  2. Be patient. It takes time to rise to the top, or even to rise at all.
  3. Get visitors. The more traffic your site gets naturally (sometimes called type-in traffic) the better it will rank in search results. Give the URL to all your customers. Print it on their receipt, on the merchandise bags, put a flyer in their bag. Put your sites address up in your stores. Outside the stores. Basically anywhere you can. Get your existing customers to go to the site.
  4. Add content (merchandise and info) to your site often as possible.  Keep the site fresh. Use the island names (or your location) in product descriptions if/when possible. Basically you want the search words people would use to find what you offer throughout your site as much as possible.
  5. Have your own blog and use it to make announcements about new products, etc.  This helps fulfill the previous suggestion. And post to it regularly. Again using key words.  And make sure it links back to your store.
  6. Inbound links are invaluable, particularly from higher traffic sites. Post the link on facebook, twitter or anywhere you can. Try to get written up and linked in your local paper, citysearch, kudzu, places like that. Trade links with other sites where it makes sense, etc. Inbound links are the holy grail of high-ranking search results, and ultimately more site traffic.
  7. Work your networks, get people going there, linking to it etc.
  8. Use site analytics.  Make sure to enable some kind of site analytics (either from your hosting provider or Google Analytics or other) so you can monitor activity to your site over time; and track key words people used to find your site; and where they came from (search engines, inbound links, etc.).
  9. While it's harder and harder these days to get good domain names it really helps if the site name is something that makes sense, is easy to remember.  It is also really important for it to match the name of your business.
Again, be patient.  It takes time to build traffic, especially search traffic and to get ranked higher in search results. While no one knows exactly the algorithms that Google and other search engines use it is no doubt a combination of the things listed above (and certainly more).  Build your traffic organically using the customers already interacting with you.  Make sure your site is easy to navigate, looks good and has lots of content, particularly the key words you believe people might use to find products or services you offer.

If you're ever in the Charleston, SC area go to Islands Mercantile on both Seabrook and Kiawah islands for some great T-shirts, hats and other souvenirs.

Friday, July 29, 2011

Google Maps Gone Bad

Trying to find a Quiznos and according to Google Maps there are two a couple miles apart, however their addresses are several states apart...  WTF Google?

Sunday, July 17, 2011

How To Disable Google Instant

While I pretty much love (or at least strongly like) Google, there are a few features that I cannot stand.  Google Instant is one of them.  Google's autocomplete is a little annoying, albeit a bit entertaining at times; but Google Instant drives me crazy.  Every time I go to Google from a new computer (which is fairly regularly) I disable Google Instant.  Disabling it is easy, just go to Preferences (http://www.google.com/preferences), scroll down about half way and select Do not use Google Instant, then save your preferences.

Tuesday, July 12, 2011

How Digital Detectives Deciphered Stuxnet, the Most Menacing Malware in History

Stuxnet required an enormous amount of resources to produce, but its cost-benefit ratio is still in question. While it may have helped set Iran’s program back to a degree, it also altered the landscape of cyberattacks. Stuxnet’s authors mapped a new frontier that other attackers are bound to follow; and the next target for sabotage could easily be a nuclear facility in the United States.

Read entire article (a great read).

Thursday, July 7, 2011

How To Upgrade to Gingerbread After Rooting and Removing Crapware From Your Droid X

About 6 months ago I set out on a quest to root my Droid X (running FroYo) in order to remove/disable unwanted apps like CityID, BlockBuster, VZ Navigator, etc.  While that was very successful, it did impede my ability to update to the much desired Gingerbread.  While I consider myself smart and quite educated in the ways of technology (I've made a decent living in the IT field for 20 years) I have really struggled to figure this out & it's frustrated me greatly.  There are a number of forums which discuss what to do and how to do it, but they almost always throw out terms which the lay person (with respect to Android OS in particular) won't understand or instructions that are written in short hand.  While this may be fine for those "in the know," it's not fine for the rest of us.  So after pulling my hair out several evenings and weekends recently and reading a ton of stuff, I believed I finally stitched it all together enough to have upgraded my rooted Droid X to Gingerbread - but wait, there was a problem.....

I'll address that problem later (perhaps even in another post), but suffice it to say that although my Droid X reported it was on the latest and greatest Android OS, Gingerbread (AKA 4.5.596) it would often tell me there was an update available, and display the message, "Info.  Download of update failed."  This has finally gotten to me and I'm in the process of correcting it, writing this as I progress with correcting this.

Here are the basic steps, then I'll expound on each.
  • Backup data (and apps)
  • SBF back to stock FroYo
  • Verizon OTA update to Gingerbread
  • Restore data (and apps)
Important note: this will leave you with the stock version of Gingerbread from Verizon/Motorola which includes the undesired built-in apps like CityID, BlockBuster, VZ Navigator, etc. that I worked so hard to remove previously; and as of this writing there is no way to gain root access of this version of Gingerbread (although you could always install a rooted SBF of Gingerbread....).  On the bright side, at least you'll be running Gingerbread on your Droid X.....

NOTE: There are a few gotcha's and things to watch out for, so please read and follow these instructions carefully.  For example at various points your phone may not start or the battery won't charge, but these things are addressed in the instructions.

Step 1 - backup your data and apps
Ever since rooting my Droid I've been using Titanium Backup Pro to backup my stuff, and it's been great.  However, in my attempts to upgrade to Gingerbread, which was somewhat successful except that I lost root so I wasn't able to use Titanium Backup to do a current backup as it requires root.... If you use TB and still have root access use that to backup everything you desire and skip to step 2, otherwise keep reading.

Since I couldn't use TB after losing root I got a copy of MyBackup and backed up everything, particularly the data on my phone.

NOTE: make sure you do a backup and/or be prepared to lose all your data (SMS, call logs, etc.) as one of the following steps requires wiping your phone.

Step 2 - SBF back to stock FroYo
First, WTF is SBF? The .SBF file basically consists of the original software platform that your phone was released with. It doesn’t seem like anyone truly understand what SBF stands for...

Download and install Morotola's RSD Lite - as of this post the latest version is 4.9, which is the version I used for these instructions.  The best way to find it is to do a web search for "rsd lite 4.9 download" and download from one of the file sharing sites - I didn't include a link here because 1) it may be outdated either by being removed from the download site, or a newer version of the program may be available; and 2) I don't particularly like these sites and didn't want to endorse any with a link.

NOTE: I did see some references that people reported problems running RSD Lite on Windows 7 64-bit however, that's exactly what I'm using and this all worked just fine for me.

Download the (FroYo) Full 2.3.340 Official SBF (filename VRZ_MB810_2.3.34_1FF_01.sbf).  This thread has a link to the file I used.

NOTE: Make sure your battery is full or as close as possible before proceeding as it can take a while (30 minutes or more) and the battery doesn't charge during most of these steps.
  • Connect your Droid via USB cable.
  • Launch RSD Lite.
  • Reboot Droid into Boot Loader (pull battery, or use power button to turn off; hold volume down and camera buttons, and press & release power button - continue holding volume down and camera buttons until triangle with exclamation point icon appears).  Once Droid is in boot loader it should be listed as an available device in RSD Lite.  The Droid's bootloader screen looks something like this:
Bootloader
2C.5C

Battery OK
OK to Program
Transfer Mode:
USB
  • In RSD Lite select the device (Droid) and browse to the SBF file downloaded previously, then press Start.
  • Sit back and let RSD Lite do it's thing.

After RSD Lite is done the Droid will restart, however you will likely just get to the animated red Droid Eye, sit there for a couple minutes & reboot over and over again.  At this point you need to wipe the phone, and since you have a good backup it shouldn't be too painful... Right.!?  To wipe the phone power it off (have to pull the battery), then press and hold the home button and power button (you can let the power button go after a couple seconds, but must continue to hold the home button).  This will take you to the Android system recovery utility.  Next, press both up/down volume buttons at the same time to display the menu, then press the down volume button to select "wipe data/factory reset" and press the camera button.  You will be presented with at least one warning that you will lose all data, but since you have it backed up you should feel pretty good about proceeding.

NOTE: While in the Android system recovery utility you will also want to "wipe cache partition" as not doing so may cause your battery not to charge after completing these steps.

Finally, reboot the system.

 After the phone boots you will have to follow the prompts to activate the phone with Verizon.

Step 3 - Droid X OTA Update
This is perhaps the easiest part - doing a standard OTA update.  On the phone go to Setting, About Phone, System Updates and download the Gingerbread (4.5.596) update.  Once downloaded install it.


And, success....


Step 4 - Restore Data & Apps
Go to the Android Market and install your backup software (in my case it's MyBackup), then restore your data and apps.

NOTE: after the OTA update to Gingerbread my Droid wouldn't actually charge, although it said it was charging.  In an earlier step I addressed wiping the cache partition - which did the trick when I had this problem previously.  At this point I was a bit concerned, but a simple battery pull corrected the issue and it's working great now.

Happy Androiding with Gingerbread on your Droid X....  Oh, and stay tuned as I will definitely post detailed instructions on how to remove the crapware (CityID, Blockbuster, VZ Navigator, etc.) from Gingerbread soon as I figure it out.