Search This Blog

Tuesday 28 October 2014

VMware, Changed Block Tracking, disk expansion and silent backup corruption

VMware have released this Knowledge Base article.

http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2090639

If you have Change Block Tracking turned on (which is a sensible thing to do) and then you expand a virtual disk to be larger than 128GB, the data provided to the backup provider is wrong.

I haven't verified this with Data Protector, but I can't see any reason why DP wouldn't be affected in the same way as (say) Veeam, which uses the same mechanism.

Solution: turn off change block tracking, run a backup, and then turn change block tracking on again.

Greg Baker is an independent consultant who happens to do a lot of work on HP DataProtector. He is the author of the only published book on HP Data Protector (http://x.ifost.org.au/dp-book). He works with HP and HP partner companies to solve the hardest big-data problems (especially around backup). See more at IFOST's DataProtector pages at http://www.ifost.org.au/dataprotector

Monday 27 October 2014

Unknown error 1053 starting hpdp-as

As I mentioned in my post about 1053 error for hpdp-idp-cp ( http://blog.ifost.org.au/2014/06/unknown-error-1053-starting-hpdp-idp-cp.html ), error code 1053 on Linux doesn't have any particular meaning. It's just a catch-all to say "something went wrong during service startup".

I've experienced this twice now, and both times it was for different reasons.

Here's the output from omnisv status...

    ProcName      Status  [PID]    
===============================
    crs         : Active  [26506]
    mmd         : Active  [26504]
    kms         : Active  [26505]
    hpdp-idb    : Active  [26466]
    hpdp-idb-cp : Active  [26499]
    hpdp-as     : Down
    omnitrig    : Active
    Sending of traps disabled.
===============================


With a bit of inspired guessing, hpdp-as is supposed to be started by /etc/rc.d/init.d/hpdp-as. Despite what it looks like, this isn't actually used as SYSV init runscript -- it is invoked by /opt/omni/sbin/omnisv start. This in turn is invoked by /etc/rc.d/init.d/omni, which actually is a SYSV init runscript.

/etc/rc.d/init.d/hpdp-as isn't part of any RPM file; neither are any of the other Data Protector start up scripts.


  • /etc/init.d/omni is installed by the OB2-CS post-install scriptlet.
  • /etc/init.d/hpdp-as is created by the IDBsetup.sh script when it calls an internally-defined updateServices function

The first time I encounted "Unknown error 1053", it was simply because something had gone wrong during installation, and /etc/init.d/hpdp-as wasn't created. I just took the code from IDBsetup.sh (search for hpdp-as and you'll find an init script inside a heredoc) and recreated it. Then I checked that the appropriate /etc/services entry had been created ( "hpdp-idb-as 7116/tcp"  )

If this happens to you, here's a handy /etc/init.d/hpdp-as for reference. Just change lnx.ifost.org.au to whatever your cell manager's hostname is:


#!/bin/sh
# chkconfig: 35 99 08
# description: HP Data Protector Application Server.
# processname: hpdp-as

### BEGIN INIT INFO
# Provides: hpdp-as
# Required-Start: $local_fs $remote_fs $network $syslog
# Required-Stop: $local_fs $remote_fs $network $syslog
# Default-Start: 3 5
# Default-Stop: 0 1 2 4 6
# Short-Description: HP Data Protector Application Server
### END INIT INFO

#Defining AS_HOME
AS_HOME=/opt/omni/AppServer

case "$1" in
start)
echo "Starting the HP Data Protector Application Server..."
nohup su - hpdp -c "${AS_HOME}/bin/standalone.sh -b lnx.ifost.org.au &"
;;
quick)
nohup su - hpdp -c "${AS_HOME}/bin/standalone.sh -b lnx.ifost.org.au > /dev/null &"
;;
stop)
echo "Stopping the HP Data Protector Application Server..."
su - hpdp -c "${AS_HOME}/bin/jboss-cli.sh --connect command=:shutdown"
;;
log)
echo "Showing server.log..."
tail -1000f /var/opt/omni/log/AppServer/server.log
;;
*)
echo "Usage: /etc/init.d/hpdp-as {start|stop|log}"
exit 1
;; esac
exit 0



The second time I encountered this (which was today), /etc/init.d/hpdp-as was present. A bit of digging into it revealed that it calls /opt/omni/AppServer/bin/standalone.sh -b cell-manager-hostname as the user hpdp (or whatever you are running Data Protector as). Helpfully, standard output is redirected to /dev/null, so whatever errors you might encounter are not reported anywhere.

When I ran that manually I saw (buried in the standard output which would otherwise have been discarded):

15:35:14,505 ERROR [org.jboss.msc.service.fail] MSC00001: Failed to start service jboss.logging.handler.FILE: org.jboss.msc.service.StartException in service jboss.logging.handler.FILE: java.io.FileNotFoundException: /var/opt/omni/log/AppServer/server.log (Permission denied)

And indeed, /var/opt/omni/log/AppServer is owned by root, and unwritable by hpdp-as.

[hpdp@cellmgr AppServer]$ ls -ld /var/opt/omni/log/AppServer
drwxr-xr-x. 2 root root 21 Sep 16 22:40 /var/opt/omni/log/AppServer

Various other problems crop up, all to do with permissions. As far as I can tell, the following chown command will fix all of them. 
sudo chown hpdp \
  /var/opt/omni/log/AppServer \
  /var/opt/omni/server/AppServer  \
  /opt/omni/AppServer/standalone/deployments  \ 
  /etc/opt/omni/server/AppServer

sudo /opt/omni/sbin/omnisv start


Greg Baker is an independent consultant who happens to do a lot of work on HP DataProtector. He is the author of the only published book on HP Data Protector (http://x.ifost.org.au/dp-book). He works with HP and HP partner companies to solve the hardest big-data problems (especially around backup). See more at IFOST's DataProtector pages at http://www.ifost.org.au/dataprotector

Tuesday 21 October 2014

Auskey on Yosemite (dealing with the Australian Taxation Office using a MacOS 10.10 system)

The Australian Taxation Office has a very fragile website called the Business Portal. When it works, it's fine, but the challenge is that if you modify anything on your computer at all, you are bound to cause BP to break.

So, if you have upgraded to Yosemite (MacOS 10.10), you can of course expect Business Portal to stop working, as it does after every upgrade. Usually there's a Whirlpool forum on how to get it working again, but I couldn't find one.

I took me a few hours tonight to figure it out. Fortunately my GST report isn't due until next week.

Step 1. Don't go to www.java.com, because Java 7 isn't supported on Yosemite.

Step 2. Don't install Java 8 from the Oracle download site either, because the business portal doesn't seem to work with Java 8.

The ECI client requires Java 6, for example.

Step 3. If you've done either of these, uninstall that version of Java, and remove the Java plug-in from your browser. Since Chrome doesn't do Java at all on MacOS this means Firefox and Safari.

Step 4. Download Java 6 from here: http://support.apple.com/kb/dl1572

Step 5. Follow the procedure here: http://support.apple.com/kb/ht5559 in order to activate the plug in.

Step 6. Go to http://bp.ato.gov.au/


Update: the business portal does work with Java 8, thanks to Paul Martin....
After tearing my hair out, installing, reinstalling, failing... a tech support fellow had the solution:(I'm running Firefox 33.0.1 with Java 8u25 on Yosemite 10.10)- Go to Java Control Panel- Select Advanced- Scroll down to 'Advanced Security Settings' and DESELECT 'Use TLS 1.2'- Restart browser and login to the Business Portal

If you are reading this at the end of a long hard day wrestling with software bugs stopping you from filing your tax (which you probably didn't want to do either), why not settle down with a really fun book of nerd-geek poems? Guaranteed to lighten your day, has poems about everything from nuclear physics to time travel and helps pay for the cost of this blog:  When Medusa Went on Chatroulette

Sunday 19 October 2014

Resources for start-ups in Sydney

This was my answer to a Quora question about a USA-based entrepreneur setting up a local presence in Australia.

Sydney is definitely the right city if your company is a medtech or financial tech startup.  Melbourne does biotech better, but even then there are successful biotech companies in Sydney. Canberra would only be appropriate for a startup doing government or military technology. 

I'm not an immigration lawyer and it's not legal for anyone without approval from the department of immigration to give immigration advice. The right person to talk to is an immigration lawyer.


The equivalent of a USA LLC is a "Pty Ltd" company. These are registered with the Australian Securities and Investment Commission (ASIC) using form 201:http://www.asic.gov.au/asic/asic... or you get your accountant or lawyer to do it for you. There are also companies that process shelf companies and assign it to you; this is the quickest and least painful, but the most expensive (usually a couple of hundred dollars).

Your company needs to have at least one director appointed who is a resident. This can cause a chicken-and-egg problem for an entrepreneur coming to Australia as the first and only employee, because they won't be able to start the company to nominate them as an employee. The solution is to get someone already resident in Australia to be a director initially, and then once here and set-up to fill in the form with ASIC to replace your local contact director with yourself.

Australian businesses need to register for an Australian Business Number with the taxation office. https://abr.gov.au/for-business,... Most startups will be lodging a monthly report to the tax office to say how much was paid to employees that month, a quarterly report to the tax office on how much GST (goods and services tax) the company collected and paid, and an annual report to the tax office on the company profits. The tax office are not as onerous as the IRS and the people they employ generally nicer. They try to help startups to some extent. For example you get a window of time after the company starts where they won't penalise late tax paperwork. Also, if there is a some genuine reason for not being able to lodge your tax on time (e.g. a family emergency) you can request an extension. I haven't had to do it very often, but I've never had an extension request denied yet in 15 years.

I recommend using  http://www.saasu.com/ for managing the Australian entity's accounts as this does everything right for Australian business automatically. It has a report that tells you exactly what to put in what field for your monthly and quarterly reports. 

It is important to get proper tax advice on the company structure before doing anything in Australia that might give the company a value. For example, it's very tax-inefficient for the USA-based company to own the Australian entity. It might work out better if the USA-entity's owners can own the Australian entity directly.

There are government programs for helping start ups as well. The one that is really worthwhile is the R&D Tax Incentive which can give a better-than-100% tax deduction on research and development. http://www.business.gov.au/grant...

It is compulsory to have workers' compensation insurance if a company employs anyone (even the owner). It's not very expensive, and it's not hard to set up. I use an insurance company called QBE, but there are plenty of others: http://www.qbe.com.au/Workers-Co...

For other insurances I've generally directed budding entrepreneurs to a broker (for the last three generations my family have used these folks: http://www.jmdross.com.au/). 

All of the above is true for starting up a company of any kind in Australia. There are a couple of resources worth mentioning for start-ups:

  • http://sydstart.com is the main start-up event for startups in Sydney. Normally it happens twice a year, but in 2014 there was just one big event.
  • http://fishburners.org  is the largest tech co-working space in Australia. If you need a community to be among, this is probably a good place to start.
  • http://atp-innovations.com.au/ is one of Australia's (and one of the world's) leading incubators.

There are some down-sides to setting up a start-up in Australia:
  • There are problems with venture capital and angel investment in Australia. 99.8% of all start-ups never get any external investment. (That's even though 30+% of all start-ups describe themselves as high-tech startups).
  • It's very difficult to offer share schemes to employees as they get hit by the "geek tax" (people are trying to get it fixed).

That said, Sydney is one of the best places in the world to run a business. 


Here's a quote from the Atlantic:  http://www.theatlantic.com/business/archive/2011/05/the-worlds-26-best-cities-for-business-life-and-innovation/238436/#slide22

Sydney is the only city in the survey to finish in the top five in ease of doing business, livability, health and safety. More than sun and surf, it's consistently called the best place to start a business by international surveys. 

The only bad thing that they could come up with was the cost of public transport. (Which is true. You'll need to get an Opal cardhttp://www.opal.com.au/ and even then many people end up paying >$100 per month to get around.)

There are no problem getting hold of brilliant developers in Sydney. Ads are generally on Seek (http://www.seek.com.au/) . There is a reason that the world's major companies do large amounts of development here: Google Maps, Canon Research Labs, Cochlear, Atlassian, and many others. Start hiring: you'll quickly discover why.

Thursday 2 October 2014

Data Protector 8.13 released

The list of fixes is very long, including a lot of VMware issues. If you have a support contract, you can download it from the following links:



Greg Baker is an independent consultant who happens to do a lot of work on HP DataProtector. He is the author of the only published books on HP Data Protector (http://x.ifost.org.au/dp-book). He works with HP and HP partner companies to solve the hardest big-data problems (especially around backup). See more at IFOST's DataProtector pages at http://www.ifost.org.au/dataprotector

Wednesday 1 October 2014

Sydney Schools Wet Weather Line (now on iphone)

Just in time for the final term of the year, I've now finished writing the iphone version of the school sports wet weather app.

The fundamental challenge is that even the most technophobic of parents have better access to technology than the head of sports at most schools.

There are three reasons for this:

  • There's a technology curve: first the scientists dream it up; then the military want it; then businesses find commercial uses for it; then consumers ask for it; then it becomes a toy for children; finally, years later, it becomes available to schools.
  • The kind of fit-and-rugged outdoors kind of person that wants to spend their life helping kids play sport is not the sort of person fascinated by the latest gadgets. Even if 
  • A muddy field in the middle of nowhere at dawn is not a place where technology reigns. Voice is often the only good option, SMS is possible. Updating a web page is a challenge.


The parents want messages pushed to them. But the school often has a lot invested (in time, money and often face) in whatever solution is currently being used to distribute sport status, even if the school is aware that it doesn't scale well and has issues.

So I've implemented the only solution that really works: 
  • If the school doesn't mind changing their wet weather phone number, the head of sport can call a number, leave a message and have that instantly pushed out to all parents who use the app. Other parents can call in.
  • If the school can't change their wet weather phone number, then I've also written a centralised dialler that regularly calls the school's existing wet weather line, and pushes any new messages out to parents' phones as soon as it finds out.
I've also had a number of requests to get this push function include into the school's own custom app as well.

Here's the iphone version:

On average, I'm getting more than one new school per week asking to come on board. It's nice to have a start-up project with such quick traction!

Linux iptables firewalling rules for use with Data Protector

Every client (and the cell manager) needs port 5555 open, unless you've changed the default port for the omniinet service.

Do you have a special "backup" network? If it's accessible on (say) eth1, then
iptables -I INPUT -p tcp -i eth1 --dport 5555 -j ACCEPT
Or, if you want to restrict a client so that it only receives connections from the cell manager (if the cell manager has an IP address of 192.168.200.100:
iptables -I INPUT -p tcp -s 192.168.200.100 --dport 5555 -j ACCEPT
You could get the same effect by adding an only_from parameter in /etc/xinetd.d/omni or by turning on cell security.

If the client also has tape drives (or the robotic control for a tape library) attached then you will need to open up a range of port numbers. Here I've allowed 10 concurrent connections, which would be appropriate for a 9-drive tape library with a robotic controller:

test -e /opt/omni/.omnirc || cp /opt/omni/.omnirc.TMPL /opt/omni/.omnirc
echo OB2PORTRANGESPEC=xMA-NET:18000-18009 >> /opt/omni/.omnirc
for port in 18000 18001 18002 18003 18004 18005 18006 18007 18008 18009
do
  iptables -I INPUT -p tcp --dport $port -j ACCEPT
done

And if you are running the StoreOnce software component on this Linux machine, then you will need ports 9387 and 9388 (unless you have changed them).

iptables -I INPUT -p tcp --dport 9387 -j ACCEPT
iptables -I INPUT -p tcp --dport 9388 -j ACCEPT
Finally, save it for the next reboot:

service iptables save

Greg Baker is an independent consultant who happens to do a lot of work on HP DataProtector. He is the author of the only published books on HP Data Protector (http://x.ifost.org.au/dp-book). He works with HP and HP partner companies to solve the hardest big-data problems (especially around backup). See more at IFOST's DataProtector pages at http://www.ifost.org.au/dataprotector