Monday, 16 November 2015

VMware vMA thumbprint error

Yesterday I installed the version 6.0 of the vmware vMA.
While trying to use remote hosts as vifptarget for remote access, I kept getting thumbprint error
such as theses:

“Unable to verify the authenticity of the specified host. The SHA1 thumbprint of the cerificate is:
XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX
Do you wish to proceed with connecting anyway? Choose “Yes” if you trust the host. The above information will be remembered until the host is removed from the inventory. Choose “No” to abort connecting to the host at this time.”


I am going to describe the process I used to automate (as much as possible), how I added all my hosts thumbprints to vMA credential store.

  1. First, open PowerCLI and list your hosts
    1. Get-VMHost | Get-View | Format-Table -Property Name, Name
  2. Now, add theses in a file named "esxcli" in VMA:
    1. while read LINE; do vifp addserver $LINE --username root --password **root_password** ;done<esxi
  3.  Now, retrieve each SHA1 thumbprint, from every host, output this in a file called "out" (yes, I am quite original when it comes to file naming):
    1. while read SERVER; do  echo -n ${SERVER}, && echo -n | openssl s_client -connect ${SERVER}:443 2>/dev/null | openssl x509 -noout -fingerprint -sha1 | awk -F= '{print $2}';done<esxi >out
  4. Now paste this script in a file of your choice, run chmod +x on it, and run it:
    1. #!/bin/sh

      while read SERVER; do
              STR1=$(echo $SERVER | awk -F, '{print $1}')
              STR2=$(echo $SERVER | awk -F, '{print $2}')
              /usr/lib/vmware-vcli/apps/general/credstore_admin.pl add -s $STR1 -T $STR2
      done<out

And you are done ! I hope it help.

Tuesday, 19 May 2015

Avamar VMware stuck snapshots

  1. Log in as admin to the utility node
  2.  Disable the firewall
    • /usr/local/avamar/lib/admin/security/avfirewall stop
  3. Download proxycp.jar

Using proxycp.jar

To see a list of commands, run the following from the Avamar Utility Node:            
java -jar proxycp.jar


To view VM’s with hidden Snapshot Files, run this command:
java -jar proxycp.jar –listsnapshots 2>/dev/null | grep Snapshot

To remove original disk from the proxy that they were still mounted to, use this command.
java -jar proxycp.jar –listproxydisk –cleanup

Next clean up Avamar only snapshots with this command if any are present
java -jar proxycp.jar –listsnapshots –cleanup

Using the above list you may proceed using the command below to attempt to consolidate the vm’s that are failing.  Warning, proceed with caution.
java -jar proxycp.jar –consolidatesnapshots –vm REPLACEWITHVMNAME



** Thank you Hugh Griffin for the above content. I'm only duplicating content in case EMC decide it is too dangerous for our frail little hands. **

Wednesday, 19 November 2014

Avamar GEN4 Visio stencil

Looking for Gen4 hardware stencils ?
Just use DELL's stencils.
The utility node is a Dell R710 server , and the storage nodes are R510 servers.

Friday, 17 October 2014

Symmetrix V-Max head / track / cylinder conversion

Symmetrix V-Max
Enginuity Code: 5874
Includes EMC Symmetrix V-Max and various different configurations within this model.
GB = Cylinders * 15 * 128 * 512 / 1024 / 1024 / 1024
Eg: 262668 Cylinder device equates to 240.47 GB of usable data
262668 * 15 * 128 * 512 / 1024 / 1024 / 1024 = 240.47 GB

Cylinders = GB / 15 / 128 / 512 * 1024 * 1024 * 1024
15 = tracks per cylinder
128 = blocks per track
512 = bytes per block
8 bytes = 520-512 used for T10-DIF
1024 = conversions of bytes to kb to mb to gb
Drive format on a V-Max is 520 bytes, out of which 8 bytes are used for T10-DIF ( A post on DMX-4 and V-Max differences).


(Thank you storagenerve.com)

Wednesday, 24 September 2014

Avamar 7.0.1 - Disabled groups are being reported as failed

Since the last version of Avamar, any clients located within a disabled backup group are now
being reported as "Failed" in the daily  summary. This is good if for some reason you forgot to re-enable a group after a temporary exclusion, but very annoying if you have groups disabled for some good reasons.

This behavior can be change in the mcserver.xml file ( Please be careful ):



1. Make a backup of mcserver.xml just in case.
cp -p /usr/local/avamar/var/mc/server_data/prefs/mcserver.xml /usr/local/avamar/var/mc/server_data/prefs/x-mcserver.bak20140923

2. Edit the mcserver.xml file
vi /usr/local/avamar/var/mc/server_data/prefs/mcserver.xml

3. Change this key from true to false
<entry key="report_disabled_client_job_as_fail" value="false" />

4. Restart MCS and the backup scheduler
dpnctl stop mcs; dpnctl start mcs; dpnctl start sched




Friday, 18 July 2014

Avamar error - Error writing 32-byte header to cache file

You most likely have "avtar.exe" process stucks. This seem to be happenning the most often on MSSQL clients.

Kill them, and restarts Avamar services.

Thursday, 26 June 2014

Avamar - MCCLI - 1,22801,User login failure.

After running /usr/local/avamar/7.0.1-61/bin/avsetup_mccli for the first time, if you make an error in your setup, it will never go back and update files in your home ~/.avamardata/* correctly.


Fix:
  1. delete ~/.avamardata/* OR:
  2. manually update ~/.avamardata/7.0.1-61/var/mc/cli_data/prefs/mcclimcs.xml with the correct information.

Tuesday, 11 March 2014

How to suppress errors and backup exceptions in Avamar Activity and enterprise manager

So you don't want to know about a certain error, or the administrator of that system is not helping you solve this backup problem ?
No problem, just do the following so it will not appear in your "failed" list:

Go to the AVAMAR_INSTALL_PATH\avs\var directory 
Create a file named avtar.cmd

Append the following in it (replace 30901 with the error code you want to suppress):
--downgrade-error-codes="30901"

Thursday, 16 January 2014

Avamar Grabage collection troubleshooting

If your garbage collection stop working, you know you are in trouble. Your grid will eventually fill up, and die a slow and painfull death.
Use the following commands from the utility node to try and diagnose the problem:

dumpmaintlogs --types=gc --days=7
In case you see along the lines of "<4203> garbage collection skipped because backups in progres", please verify which nodes are allowed overtime, they are certainly creating problems.

Nodes that are allowed overtime can be seen with:
mccli client show --recursive=true --verbose=true | grep -v "No overtime allowed"


If you'd rather just have garbage collection kill the sessions preventing it from running, just type:
avmaint sched gc --ava --kill=300 --permanent

gc_report
less /usr/local/avamar/var/cron/gc.log


Monday, 13 January 2014

Avamar - How to retrieve all of your grid's serial numbers

Sometimes, EMC support will contact you because your equipment dialed in, and need a part replaced. They will mention a node serial number, so if you have multiples sites like me, here is a useful command to retrieve your grid's serials:

Log in to the utility node:

#> su - admin
#> ssh-agent bash
#> ssh-add ~/.ssh/dpnid
#> mapall --noerror --user=root --nodes=all+ --quiet 'echo `hostname -i`": "`/usr/bin/ipmitool fru print 0 | grep "Product Asset Tag" | sed "s/^.*:\s\(.*$\)/\1/"`'

This will get you the node serial number only.
To get more extensive information, you can try this as well:
#> mapall --noerror --user=root --nodes=all+ --quiet 'echo `hostname -i`": "`/usr/bin/ipmitool fru print 0 " grep "Product Asset Tag" " sed "s/^.*:\s\(.*$\)/\1/"`'

(see solution esg111183 on emc support website) 



Wednesday, 4 December 2013

Customizing the "Documents And Download" page

Suppose you have windows 2k clients, that needs an older version of the avamar client.

If your are like me and want to keep the file easily accessible, you can simple add them to the "Documents and Downloads" page accessible from http://utility_node_ip by uploading the client to the utility node.

Simple use "winscp" or any other tool to transfer the file, and upload them to:
/data01/avamar/src/downloads/


For example, if I want to add the client under Windows 32 bits, I'll place the executable here:
/data01/avamar/src/downloads/WIN32/AvamarClient-windows-x86-4.1.106-27.msi

That's it, simply reload the page and you will see the client appear.

Monday, 18 November 2013

Avamar - How to query the PostgreSQL MCS database

Here is how to connect to the DB if you need custom reports and want to create custom queries:

1.)  SSH to the Utility node


root@dpn:~/#: su - admin
admin@dpn:~/>: psql -p 5555 -U viewuser mcdb
Welcome to psql 8.2.3, the PostgreSQL interactive terminal.

mcdb=>

Note:  Please use "viewuser" (read only) account for your queries !


2.) Here is the example for a simple SQL query, but you can build your own queries and export it as plain text .

    SELECT * FROM "public"."v_clients";
    SELECT v_clients.cid, v_clients.client_name, v_clients.client_addr,v_clients.os_type FROM "public"."v_clients";


select client_name,status_code,domain FROM v_activities_2 WHERE (status_code=30901 or status_code=30915) and recorded_date_time > current_timestamp - interval '24 hours';

Wednesday, 13 November 2013

avagent Error 5320- The client named: client1 is not registered as CID: NO LOCATION - RECORD MAY BE CORRUPT



While I was trying to fix a corrupted install I got the following error:

2013-11-13 09:40:40 avagent Error <5320>: Received from MCS#103:The client named: client1 is not registered as CID: NO LOCATION - RECORD MAY BE CORRUPT
2013-11-13 09:40:40 avagent Error <6210>: Unable to register 'client1' with MCS at utilitynode_addr:28001



Fix:
 Delete de client ID file (cid.bin), and re-register.

Monday, 11 November 2013

Avamar - How to get around the 1 schedule repetition per hour maximum

I recently stumbled on the need to take SQL transactional backups every 15 minutes for a specific project (RAID protection on an active-active array was not enough it seem), I came up with a  solution using crontabinf the EMC community forums.




1. Create a Dataset such as SQL1hrinc
    a. Select the database to backup
    b. Choose incremental as backup type

2. Under Policy, create a New Group i.e., SQL1hrinc
    a. Add Dataset SQL1hrinc to the group
    b. Select Retention, client etc

3. Under Policy, click on Group and run backup to make sure group meets the requirements


Now, please login to Avamar utility node via Putty as root user

1. Create a batch file in the /usr/local/avamar/bin such as sqlinc and add the following:
/usr/local/avamar/bin/mccli client backup-group-dataset --xml --name=/DOMAIN_NAME/CLIENT_NAME --group-name=/SQL1hrinc

2. Save file and set the execute permissions i.e., chmod 755 sqlinc

3. Run the file and make sure that the backup is performed.

4. As root, type crontab -e and add the following:

*/60 7-19 * * 1-5 /usr/local/avamar/bin/sqlinc >/dev/null 2>&1

5. Save and exit

(As seen on the Avamar forums, thanks Sandeep Sinha)

Thursday, 17 October 2013

Avamar - How to verify your backup nodes connection speed

I recently suspected one of my storage node was not connected at 1 Gbps, this can be verified quickly from the utility node using the "mapall" and "ethtool" commands.
mappall send a command to all the storages nodes, and ethtool is a linux command.

Here you go :

su - admin
ssh-agent bash
ssh-add ~/.ssh/dpnid

mapall --noerror --user=root 'ethtool eth0' | grep "Speed"
mapall --noerror --user=root 'ethtool eth2' | grep "Speed"
These are the NICs that face your network


To check the internal NICs: 
mapall --noerror --user=root 'ethtool eth1' | grep "Speed"
mapall --noerror --user=root 'ethtool eth3' | grep "Speed"

Now you can verify that the "Speed" fields all say 1000Mb/s.
Mines did not:

(0.0) ssh  -x  -o GSSAPIAuthentication=no root@192.168.255.2 'ethtool eth2'
        Speed: 1000Mb/s
(0.1) ssh  -x  -o GSSAPIAuthentication=no root@192.168.255.3 'ethtool eth2'
        Speed: 100Mb/s
(0.2) ssh  -x  -o GSSAPIAuthentication=no root@192.168.255.4 'ethtool eth2'
        Speed: 100Mb/s
(0.3) ssh  -x  -o GSSAPIAuthentication=no root@192.168.255.5 'ethtool eth2'
        Speed: 1000Mb/s
(0.4) ssh  -x  -o GSSAPIAuthentication=no root@192.168.255.6 'ethtool eth2'
        Speed: 1000Mb/s
(0.5) ssh  -x  -o GSSAPIAuthentication=no root@192.168.255.7 'ethtool eth2'
        Speed: 1000Mb/s
(0.6) ssh  -x  -o GSSAPIAuthentication=no root@192.168.255.8 'ethtool eth2'
        Speed: 100Mb/s
(0.7) ssh  -x  -o GSSAPIAuthentication=no root@192.168.255.9 'ethtool eth2'
        Speed: 1000Mb/s
(0.8) ssh  -x  -o GSSAPIAuthentication=no root@192.168.255.10 'ethtool eth2'
        Speed: 1000Mb/s
(0.9) ssh  -x  -o GSSAPIAuthentication=no root@192.168.255.11 'ethtool eth2'
        Speed: 1000Mb/s



You can then work with support to solve the issue, or check your cables / switchs, etc.






 

Tuesday, 27 August 2013

Avamar and large dataset with multiples files

Here is a gem I found in the Avamar forums, from a "Ask the expert" session answered by Ian anderson concerning large file systems and Avamar. Please share your experiences if you have any.


lmorris99 wrote:

We have one server with 25 million files, scattered through directories six levels deep.
We'd like to throw it at our test Avamar grid; any tuning I should look at on the client (or server) side before we set it up for its first backup?

The most important thing to do on a client with so many files is to make sure that the file cache is sized appropriately. The file cache is responsible for the vast majority (>90%) of the performance of the Avamar client. If there's a file cache miss, the client has to go and thrash your disk for a while chunking up a file that may already be on the server.

So how to tune the file cache size?

The file cache starts at 22MB in size and doubles in size each time it grows. Each file on a client will use 44 bytes of space in the file cache (two SHA-1 hashes consuming 20 bytes each and 4 bytes of metadata). For 25 million files, the client will generate just over 1GB of cache data.

Doubling from 22MB, we get a minimum required cache size of:
22MB => 44MB => 88MB => 176MB => 352MB => 704MB => 1408MB

The naive approach would be to set the filecachemax in the dataset to 1500. However, unless you have an awful lot of memory, you probably don't want to do that since the file cache must stay loaded in memory for the entire run of the backup.

Fortunately there is a feature called "cache prefixing" that can be used to set up a unique pair of cache files for a specific dataset. Since there are so many files, you will likely want to work with support to set up cache prefixing for this client and break the dataset up into more manageable pieces.

One quick word of warning -- as the saying goes, if you have a hammer, everything starts to look like a nail. Cache prefixing is the right tool for this job because of the large dataset but it shouldn't be the first thing you reach for whenever there is client performance tuning to be done.

On to the initial backup.

If you plan to have this client run overtime during its initial, you will have to make sure that there is enough free capacity on the server to allow garbage collection to be skipped for a few days while the initial backup completes.

If there is not enough free space on the server, the client will have to be allowed to time out each day and create partials. Make sure the backup schedule associated with the client is configured to end no later than the start of the blackout window. If a running backup is killed by garbage collection, no partial will be created.

You will probably want to start with a small dataset (one that will complete within a few days) and gradually increase the size of the dataset (or add more datasets if using cache prefixing) to get more new data written to the server each day. The reason for this is that partial backups that will only be retained on the server for 7 days. Unless a backup completes successfully within 7 days of the first partial, any progress made by the backup will be lost when the first partial expires.

After the initial backup completes, typical filesystem backup performance for an Avamar client is about 1 million files per hour. You will likely have to do some tuning to get this client to complete on a regular basis, even doing incrementals. The speed of an incremental Avamar backup is generally limited by the disk performance of the client itself but it's important to run some performance testing to isolate the bottleneck before taking corrective action. If we're being limited by the network performance, obviously we don't want to try to tweak disk performance first.

The support team L2s from the client teams have a good deal of experience with performance tuning and can work with you to run some testing. The tests that are normally run are:
  • An iperf test to measure raw network throughput between client and server
  • A "randchunk" test, which generates a set of random chunks and sends them to the grid in order to test network backup performance
  • A "degenerate" test which, as I mentioned previously, processes the filesystem and discards the results in order to measure disk I/O performance
  • OS performance monitoring to ensure we are not being bottlenecked by system resource availability (CPU cycles, memory, etc.)
Edit -- 2013-08-06: The behaviour for partial backups changed in Avamar 6.1. More information in the following forums thread:
Re: Garbage collection does not reclaim expected amount of space

Friday, 26 July 2013

1,23996,CLI failed to connect to MCS

I tried to install a remote MCCLI instance as I do not like to work directly from the utility node, and I kept getting this error and could not find the problem.

Support told me running MCCLI from a remote host was not supported (of course it is).

When I finally looked up the config file "/root/.avamardata/6.1.1-87/var/mc/cli_data/prefs/mcclimcs.xml"
I noticed I had the "mcsaddr" filed wrong.

Make sure you don't have any configuration problems...

Symcli on Linux

Having problems making symcli work in a Server/Client (remote server) model ?

Try the following:
  1. Do a clean reinstall: rpm -ef symcli-data-V7.5.0-0.i386 symcli-master-V7.5.0-0.i386 symcli-symcli-V7.5.0-0.i386 symcli-thincore-V7.5.0-0.i386 symcli-64bit-V7.5.0-0.x86_64 symcli-cert-V7.5.0-0.i386 symcli-base-V7.5.0-0.i386 symcli-symrecover-V7.5.0-0.i386 symcli-master-V7.5.0-0.i386
  2. Resinstall: #> tar xvzf se7500-Linux-i386-ni.tar.gz
  3. Then you have to use the supplied install script: #> ./se7500_install.sh
  4. Make sure /usr/emc/API/symapi/config/netcnfg is properly configured
  5. Make sure the connection name defined in the above file is exported as an environment variable on your shell: #> export SYMCLI_CONNECT=SYMAPI_SERVER (in that case "SYMCLI_CONNECT" is the name of the first field in the netcfg file.
  6. Restart the daemon: #> stordaemon shutdown storsrvd && stordaemon start storsrvd
  7. Make sure it's running: #>  /opt/emc/SYMCLI/bin/symcfg list -service
  8. Check that the logs are clean:  #> /opt/emc/SYMCLI/bin/stordaemon showlog storsrvd
  9. Check the currentlly running deamons: #> /opt/emc/SYMCLI/bin/stordaemon list (storapid, storwatchd and stordrvd should be running)
  10. Export your path: #>export PATH=$PATH:/opt/emc/SYMCLI
  11. Test your config: #> symcfg list
  12. In last resort, read the following file found on powerlink (when all else fail read the instructions): "Solution Enabler 7.X installation guide)
Good luck !

Tuesday, 23 July 2013

VMAX Device types

TDAT:
TDAT, or thin data device, is an internal LUN which is assigned to a thin pool. Each TDAT LUN is comprised of multiple physical drives configured to provide a specific data protection type. An example of a TDAT device might be a Raid-5(3+P)LUN.
Another common example would be a Raid–1 mirrored LUN. Multiple TDAT devices are assigned to a pool.  When creating a thin pool LUNs for presentation to a host the data is striped across all of the TDAT devices in the pool. The pool can be enlarged by adding devices and rebalancing data placement (background operations with no impact to the host).

Thin Devices (TDEVs):
They consume no disk space. These are only pointers residing in memory. Allocation is done in 768 KB increment (12 tracks) when they are "bound". It  is a host accessible(redundantlypresented to an FA port) back-end LUN device that is “bound” to a thin device pool (TDATs) for its capacity needs.
As stated above, a TDEV is a host presentable device that is striped across the back end TDAT devices. The stripe size is 768K.
Each TDEV is presented to an FA port for host server allocation When utilizing thin provisioning, Thin Pool LUNs are employed. The utilization of TDEVs is required to use EMC ®Fully Automated Storage Tiering Virtual Provisioning (FAST/VP features.


Meta Devices (aka Meta Volumes:
They allow to increase the size of device presented to a host. Symmetrix Device size maximum is 240 GB,


Data devices:
Non adressable Symmetrix private device. (Cannot be mapped to a front end port)
Provide space to thin devices.
You "add" data devices to thin pool, but you "bind" thin devices to a thin pool.

Avamar support

Here is a list of commands Avamar support use to diagnose a problem on the utility node:

ssh to a storage node:
ssn 0.8

Using /usr/local/avamar/var/probe.xml
ssh -x admin@192.168.255.10  ''
su - admin
ssh-agent bash
ssh-add .ssh/dpnid

Send a command to each and every one of the storage nodes (mapall)
mapall --noerror 'grep -i "error" /var/log/messages*'

cd proactive_check/
head hc_results.txt
chmod +x proactive_check.pl
./proactive_check.pl
mccli event show --unack=true| grep Module
status.dpn


Bios version:
 mapall --noerror --all 'omreport system summary |grep -A4 BIOS'