IBM DS4500 – Automate Configuration Backup

January 12, 2010 scripthacks Leave a comment

As a precautionary measure it is prudent to backup the DS4500 configuration.  Automation of this task ensures a good copy of the arrays configuration is always available.

Pre-requisites

  • Windows/Unix/Linux server with IP connectivity to the storage array
  • SMCli.exe installed

This script was created to run on a windows server in the c:\Backup-FastT\ folder.  All configs are saved within the folder C:\FastT-Backup\Configs and are in the format config-<execution date>.cfg. I’ve also added a section which creates a mapping script which can be used to quickly restore host and mapping information to the array.

@ echo off
SETLOCAL
echo ###############################################
echo # DS4500 Configuration Backup Script
echo #
echo # Created by Chris Zurich
echo # Last Updated: Jan. 15th 2010
echo #################################################
:: Set Variables
set CDATE=%date:~4,2%-%date:~7,2%-%date:~10,4%
:: Set Definitions
:: Login to array
smcli <SP IP Address> -c "save storageSubsystem configuration file=\"c:\FastT-Backup\Configs\config-%CDATE%.cfg\" allConfig;"
echo // Create Hosts and host ports >> %CD%\configs\mapping-%CDATE%.script
findstr /c:"create host" %CD%\Configs\config-%CDATE%.cfg >> %CD%\configs\mapping-%CDATE%.script
echo. >> %CD%\configs\mapping-%CDATE%.script
echo // Create Host to LUN Mapping >> %CD%\configs\mapping-%CDATE%.script
findstr "Drive-to-LUN logicalUnitNumber" %CD%\Configs\config-%CDATE%.cfg >> %CD%\configs\mapping-%CDATE%.script
echo. >> %CD%\configs\mapping-%CDATE%.script
:: Delete log files older then 14 days
set LOGPATH=c:\FastT-Backup\Configs\
forfiles -p %LOGPATH% -m config-*.cfg -d -14 -c "cmd /c del /q @path"
forfiles -p %LOGPATH% -m mapping-*.script -d -14 -c "cmd /c del /q @path"
:: Done
ENDLOCAL
::exit

Gear – Logitech Harmony 880

December 28, 2009 scripthacks Leave a comment

I’ve had this remote for a couple years and figured it was time for me to post a review.  For those who don’t know the Logitech Harmony 880 is one of the best multifunction remotes on the market today.  Overall  I am really impressed with both the build quality of the remote and also the ease of use.  The ease of use falls into two categories, one being configuration and the second being seamless use of multiple devices with the remote.   With any number of peripherals this remote will with the touch of a button turn all required devices on, set them to the correct input and also ensure that volume levels are adjusted using the correct device.

Features worth mentioning:

Favorites with channel images ie. Food Network, BBC, CNN, etc. can be applied to a channel for quick navigation

Built in troubleshooting/Help.  If your devices are partially on simply press the Help button and the remote will step through asking you whether the expected devices are in the correct mode (On/Off or Input).

Simple web based configuration. I can’t stress how simple and easy it is to setup this remote.  It literally takes 5 minutes and then your configuration is saved on Logitechs site for future use down the road.

Rechargeable Batteries, this is a requirement for any and all gear that I purchase.  I have little patience for replacing batteries out of devices I use every day.

Durability: Believe it or not this thing can take a beating.  I’ve dropped it, kicked it, smashed it on wood floor… you name it this remote has come out unscathed.  This really proves that for the price they actually engineered it to handle the wrath of a 2 year old.

I rarely directly plug a product but figured with this remotes long term unblemished track record it deserved a free plug.

Categories: Gear Tags: , , ,

Calculate Corrected Usable Hard Drive Size

October 21, 2009 scripthacks 1 comment

Over the years there has been a  constant battle between storage engineers and  hard drive companies on whether or not advertised hard drive sizes  are misleading to consumers.  The advertised numbers are in fact misleading because they do not state the actual usable size of the hard drive being sold.  In order to find the corrected size of a hard drive you must account for the actual allocation size used by the hard drive manufacturer.

When a 300GB hard drive is sold the manufacturer is stating that the hard drive has a capacity which meets the following equation:

300GB = 300,000,000,000 bytes

With a 300GB hard drive the manufacturer would like you to think the above equation is true.  It in fact is not.  The reason why this value is false is because 1,000 bytes should be represented as 1,024 bytes.  So in order to find the true size of a  300GB hard drive you  must divide by 1024 three times to calculate its true size in Gigabytes.

300,000,000,000 bytes ÷ 1024 = 292,968,750 Kilobytes

292,968,750 kilobytes ÷ 1024 = 286,102.3 Megabytes

286,102.3 Megbytes ÷ 1024 = 279.3968 Gigabytes

The corrected size of an advertised 300GB drive is actually 279GB and change.

If hard drive manufacturers gave you the advertised capacity of 300GB the drive would have to be 322,122,547,200 Bytes in size. This can be calculated by multiplying 300GB x 1024 three times to find the required bytes.


Windows – Mute Shortcut

October 15, 2009 scripthacks Leave a comment

I listen to music a lot while I’m working.  This leads to situations where I need to quickly mute my music or pause it while either focusing on a problem or taking a call.  Since I’m lazy I went the mute shortcut route.

Mute Shortcut Creation (Windows XP)

1. Download nircmd
2. Extract it to a folder ex: c:\tools\nircmd
3. Create a new shortcut on your desktop
Target: C:\tools\nircmd.exe mutesysvolume 2

4. Update the icon and set it to %SystemRoot%\system32\sndrec32.exe

mute vol

For a complete list of commands which nircmd can interpret go here.

Categories: Uncategorized Tags: , , , , ,

RDP: Force -Console Access Not Working

October 13, 2009 scripthacks 1 comment

I wrote a post a while back which covered how to force console access on a Windows server.  The point of the post was to allow administrators to access a server which had exhausted its assigned number of terminal connections.  Recently I’ve noticed that the previous command shown bellow no longer works.

mstsc -v:<server name or ip address> /F -console

In Terminal Services 6.1 (mstsc version 6.0.6001.18000) and higher the -console option is no longer available.  In its place they now use the -admin option.  The new command is the same as the old with -admin being used in place of -console.

NEW force console access command:
mstsc -v:<server name or ip address> /F -admin

If you do not already have version 6.1 of terminal services it can be downloaded HERE!

Credit where credit is due… http://blogical.se/blogs/mikael_sand/archive/2009/07/28/console-and-admin-problems-in-remote-desktop-mstsc-from-window-2003-server.aspx

Free Fonts for all…

October 11, 2009 scripthacks Leave a comment

Sometimes you need a font which makes things more than ordinary. Sometimes you’re bored with the Times New Roman you’ve been peddling for the past 25+ years. If this is you then you may want to check out FontSpace which specializes in presenting thousands… yes thousands of FREE fonts. The piece that makes this site really shine is the fact that fonts are ranked, tagged, and sorted by design making it cake to find fonts to your liking. Here’s one which comes to mind…

fontspace

Categories: Uncategorized Tags: , , , ,

ECC 6.1 Client Installation Options

October 8, 2009 scripthacks Leave a comment

Post installation of EMC Control Center (ECC) 6.1 the first thing you’re going to want to do is patch it by downloading the latest patch set from EMCs Powerlink site.  After patching is completed you’ll want to install the ECC client on your workstation and also a server within your environment where you’ll manage ECC from.

The ECC Client can be manually copied from the ECC Repository server or remotely installed through the ECC remote install site.  The remote install site will always be found on the ECC Repository server.

ECC Web Install – Always found on ECC Repository Server
https://<DNS Name of ECC Repository Server>:30002/webinstall/

Web Install Pre-reqs

  • java jre installed
  • ECC Web Install site added to trusted sites list (Sometimes necessary if Java script execution is blocked)

ECC Client Folder & Executable Location
C:\ECC\Tomcat\webapps\webinstall\EGC610\eccclient.exe

ECC – Connect to Storage Scope API

October 8, 2009 scripthacks Leave a comment

EMC Control Center comes with an optional component called Storage Scope. Storage Scope allows you to log data which is collected by ECC and report on it. As an alternative to using the default Storage Scope interface you can also directly connect to its database using ECC’s published API.

Storage Scope Database API Details
DB SID: rambdb
Username: stsview
Password: sts (Note: ECC 6.1 and higher the ECC Admin can change this password)

Storage scope is pretty easy to use. The documentation while a bit long covers how to connect to Storage Scope using the API interface and also what you can expect in terms of tables and views.

Here is a breakdown of what you’ll need to connect using the Storage Scope API:

1. Oracle ODBC drivers installed

Download and install from here: Download Oracle JDBC Driver

2. Update the tnsnames.ora file with the following information. Search for the file and you’ll find it…

RAMBDB =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = <IP address of ECC RepositoryStorage Scope Server>)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = RAMBDB)
)
)

3. Create an ODBC connection within Start -> Control Panel -> Administrative Tools -> Data Sources (ODBC)

3.1 Click the “System DNS” tab and select ADD
3.2 Scroll down to “Oracle ODBC…” and click Finish
3.3 Fill in the following details.
Data Source Name: ECC STS Connection
Service Name: RAMBDB
UserID: stsview

All other values can be left as their defaults. Click OK.

4. Viewing Storage Scope tables… there are many applications which allow you to view Oracle databases. I use DBVisualizer but you can also use Microsoft Excel.

Launch Microsoft Excel.
Select Data -> Import External Data -> New Database Query
From the list select “ECC STS Connection” and click OK

At this point Excel will attempt to connect to the storage scope server. If it is successful you will be prompted for a password to login. The password as documented within the EMC documentation is “sts” with NO quotes.

If you’ve passed this point you have successfully connected and can now browse the Storage Scope tables.

Re-read the Storage Scope API guide and start digging into the data.

Troubleshooting Steps
If the database connection fails validate that the port is not being blocked.

Start -> run -> cmd
type in telnet <storage scope server IP> 1521

If you get a blank screen with a blinking cursor the port is open. If not it’s possibly blocked by a firewall.

Categories: Uncategorized Tags: , , , , , , ,

Unlock ECC Repository STSView Account

October 7, 2009 scripthacks Leave a comment

On EMC Control Center (ECC) servers sometimes the default API account used to directly connect to the ECC repository gets locked.  In this case you may see the following error shown when attempting to connect.

java.sql.SQLException: ORA-28000: the account is locked

There is a simple and easy fix for unlocking the stsview account.  EMC includes an unlock script which can be manually run from the ECC repository server.

D:\ECC\Repository\admin\Ramb_scripts\stsview_unlock.bat

Simply open a command prompt and change directories to the Ramb_scripts directory and run the stsview_unlock.bat script.  Attempt logging in after the script completes.

If you are still unable to connect to the ECC repository when using the default values (username = stsview, password = sts) then contact your ECC Administrator to ensure that the password has not been changed.  With ECC 6.1 and higher the ECC administrator can change the default stsview password.

Reference: ECC Repository Default API Connection
SID: rambdb
Port: 1521 (ECC 5.2 & ECC 6.0)
Port: 1575 (ECC 6.1 SSL Enabled)
Username: stsview
Password: sts

SQLplus Connect String
Note:You need to have the oracle client installed and rambdb defined within your tnsnames.ora file in order for this command to work)
sqlplus stsview/sts@rambdb

Fix – Locked Business Objects Administrator Account

August 27, 2009 scripthacks Leave a comment

I recently had to deal with the rather unpleasant task of reseting the Administrator password within my Business Objects environment.  The symptoms and fix are as follows.

Symptom: Administrator account locked or in password reset loop where a new password is not being accepted.
Fix Requirement: System account access to the Oracle database that the Business Objects database resides on.

Fix:

  1. Take a backup of your Oracle database.
  2. Note this is advised since the steps listed bellow can in some cases cause database corruption.

  3. Shut down the business objects Control Management Service (CMS).
  4. Launch an Oracle management utility.  I use DbVisualizer.
  5. Login to your database and find the table called CMS_INFOOBJECTS
  6. View the data found within the table and sort the Object ID column.
  7. Find the row with Object ID equal to 12.
  8. Delete the row with Object ID equal to 12.
  9. Save and apply the changes made to the database.
  10. Start the CMS service and attempt to login to your Business Objects server with the Administrator account.  Note that the account password is now blank.

Removal of the row with Object ID equal to 12 deletes the Administrator account from the BO database.  After this is done when CMS is started it recreates the Administrator account and assigns it the default password which is blank.