Calculate Corrected Usable Hard Drive Size

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.


Advertisements

Windows – Mute Shortcut

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.

RDP: Force -Console Access Not Working

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…

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

ECC 6.1 Client Installation Options

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

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.

Unlock ECC Repository STSView Account

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