2010-06-14

Data Protector on Ubuntu LTS 10.04

We use Data Protector for backup at our organization. To be quite honest, HP is not among the best, regarding packaging for Linux distributions.

For earlier versions of Ubuntu, the provided omnisetup.sh has been able to install the software, if we did some prerequisites:

  1. Install rpm: apt-get install rpm
  2. Install xinetd: apt-get install xinetd
  3. Uncomment rplay from /etc/services
  4. Allow TCP port 5555 from cell server to the host
When we tried to do this on Ubuntu LTS 10.04, we ran into the new "--force-debian" switch for RPM that breaks the install. We did some trial and error checking, and ended up extracting the RPMs from the distributed files from HP. If you just want to continue to use omnisetup.sh, the quick fix is to backup /usr/bin/rpm and replace it with a script:


# mv /usr/bin/rpm /usr/bin/rpm.old
# cat > /usr/bin/rpm
#!/bin/sh
/usr/bin/rpm-old --force-debian $@
^D


We located a file called DP_A0611_UXia64_IS.sd_depot, this file is in fact a tar archive:


# file DP_A0611_UXia64_IS.sd_depot
DP_A0611_UXia64_IS.sd_depot: POSIX tar archive


Unpack this file (I did this in /tmp):


/tmp# tar xvf /local/dataprotector/hpux_ia/DP_DEPOT/DP_A0611_UXia64_IS.sd_depot


You will find an unpacked directory called DATA-PROTECTOR

On our clients, we need three packages: core, da (disk agent) and ma (media agent). These packages are located in the OMNI-CORE-IS (core) and OMNI-OTHUX-P (da and ma) in the DATA-PROTECTOR directory:


OMNI-CORE-IS/opt/omni/databases/vendor/omnicf/gpl/i386/linux-x86/A.06.11/packet.Z
OMNI-CORE-IS/opt/omni/databases/vendor/omnicf/gpl/x86_64/linux-x86-64/A.06.11/packet.Z
OMNI-OTHUX-P/opt/omni/databases/vendor/da/gpl/i386/linux-x86/A.06.11/packet.Z
OMNI-OTHUX-P/opt/omni/databases/vendor/da/gpl/x86_64/linux-x86-64/A.06.11/packet.Z
OMNI-OTHUX-P/opt/omni/databases/vendor/ma/gpl/i386/linux-x86/A.06.11/packet.Z
OMNI-OTHUX-P/opt/omni/databases/vendor/ma/gpl/x86_64/linux-x86-64/A.06.11/packet.Z


You only need to uncompress and rename these to RPM files

To speed up this, you can use a script:

#/bin/sh

VERSION="A.06.11";

for PACKAGE_DIR in OMNI-CORE-IS/opt/omni/databases/vendor/omnicf/gpl OMNI-OTHUX-P/opt/omni/databases/vendor/da/gpl OMNI-OTHUX-P/opt/omni/databases/vendor/ma/gpl
do
for ARCH in i386/linux-x86 x86_64/linux-x86-64
do
uncompress $PACKAGE_DIR/$ARCH/$VERSION/packet.Z
RPM=$(file $PACKAGE_DIR/$ARCH/$VERSION/packet | cut -d: -f2- | cut -d\ -f6-)
if [ $ARCH = "i386/linux-x86" ]; then
RPM="${RPM}.i386.rpm"
else
RPM="${RPM}.x86_64.rpm"
fi
cp -v $PACKAGE_DIR/$ARCH/$VERSION/packet ../$RPM
done
done


I converted these RPMs to .deb packages using alien. You will have to convert the x86_64 packages on a 64 bit distro, and the i386 packages on a 32 bit.


for RPM in *.rpm; do alien -c -k -d --fixperms $RPM; done

If you want to use either the RPMs or the DEBs, install the core package first. To configure your cell server, just add the FQDN or IP in the file /etc/opt/omni/client/cell_server (it is not installed by the packages):


# echo "my.cell.server.tld" > /etc/opt/omni/client/cell_server


We installed these deb-packages, and everything seemed ok, but the client never returned any partitions to the cell manager. We found the solution, and the problems were due to the use of ext4, which Data Protector do not know about.

To fix this, you will have to add "-t ext4" to the file /opt/omni/lbin/.util. I have made a patch you can download and apply from /:

/# patch -p0 < /tmp/util.patch


To simplify the install process on Ubuntu, I made an install script. This script installs all needed packages, fixes rplay in /etc/services, adds a rule to shorewall (if found), installs core, ma and da and applies the patch.

To use this, copy your deb packages, the util.patch and the install.sh script to the same folder:

/dataprotector/DEBS# ls
install.sh ob2-da_A.06.11-1_i386.deb
ob2-core_A.06.11-1_amd64.deb ob2-ma_A.06.11-1_amd64.deb
ob2-core_A.06.11-1_i386.deb ob2-ma_A.06.11-1_i386.deb
ob2-da_A.06.11-1_amd64.deb util.patch


We share the dataprotector director using NFS:

# cat /etc/exports
/local/dataprotector *(ro,sync,no_subtree_check)


The process of installing Data Protector on an Ubuntu is the quite easy:
user@host:~$ sudo -s
[sudo] password for user:
root@host:~# mount -t nfs server:/local/dataprotector /mnt
root@host:~# cd /mnt/DEBS/
root@host:/mnt/DEBS# ./install.sh
Removing rplay from /etc/services
Installing depending package xinetd
Installing depending package ksh
Shorewall detected... checking for port 5555... missing... adding rule...
Restarting "Shorewall firewall": done.
Installing ob2-core_A.06.11-1_amd64.deb
Installing ob2-da_A.06.11-1_amd64.deb
Installing ob2-ma_A.06.11-1_amd64.deb
Post-configuring client to use my.cell.server.tld
Detected ext4... patching /opt/omni/lbin/.util
patching file /opt/omni/lbin/.util
* Stopping internet superserver xinetd [ OK ]
* Starting internet superserver xinetd [ OK ]
Finished!
root@host:/mnt/DEBS# cd
root@host:~# unmount /mnt
root@host:~# exit

16 comments:

  1. Thanks for it. I will try your solution and give you the result.

    ReplyDelete
  2. I can't convert my .rpm packages with alien.

    I have this message :

    sh: rpm: Permission denied
    Error executing "LANG=C rpm -qp --queryformat %{NAME} OB2-CORE-A.06.10-1.i386.rpm": at /usr/share/perl5/Alien/Package.pm line 482.
    root@cci-grr:~/Documents/DATA-PROTECTOR#

    ReplyDelete
  3. I get this same message!
    sh: rpm: Permission denied
    Error executing "LANG=C rpm -qp --queryformat %{NAME} OB2-CORE-A.06.10-1.i386.rpm": at /usr/share/perl5/Alien/Package.pm line 482.
    root@cci-grr:~/Documents/DATA-PROTECTOR#

    ReplyDelete
  4. Rune, thanks for this. I had Data Protector client running fine on 8.04. After upgrading to 10.04 the Data Protector server could not connect to my machine.

    To fix the problem, I had to add this line to the end of /etc/services:
    omni 5555/tcp # DATA-PROTECTOR

    ReplyDelete
  5. Hi all, What about this error:
    "sh: rpm: Permission denied
    Error executing "LANG=C rpm -qp --queryformat %{NAME} OB2-CORE-A.06.10-1.i386.rpm": at /usr/share/perl5/Alien/Package.pm line 482."

    Could you fix it?

    ReplyDelete
  6. Sorry for taking so long time to respond.

    I really do not know what causes alien/rpm to display that error. My guess is that you are trying to convert it directly on a CD/DVD or inside a directory without appropriate write permissions.

    ReplyDelete
  7. @Bjarke: If you allowed the release upgrade from 8.04 to 10.04 to install the package version of /etc/services, your previous omni entry would be overwritten and therefore you had to add it once more (or there might be some other magic involved in upgrade of the netbase package)

    ReplyDelete
  8. Thumbs up for this nice post.
    I've been trying to pull myself together the last couple of months to do the exact same - and here you are doing all the work. Thank you.

    Regards
    www.annoying.dk

    ReplyDelete
  9. I also ran into the following error.

    Installing OB2-CORE-A.06.11-1.x86_64.rpm from /DP611_SOL_LINUX/linux_x86_64/DP_DEPOT/DP_A0611_GPLx86_64_IS.rpm
    error: Failed dependencies:
    /bin/sh is needed by OB2-CORE-A.06.11-1.x86_64

    Setup cannot continue, Installation of Data Protector Core packet failed.

    Adding --nodeps to /usr/bin/rpm-old --force-debian $@
    (/usr/bin/rpm-old --nodeps --force-debian $@)
    is a dirty fix since rebuilding the rpm db didnt work for me - but this did.

    www.annoying.dk

    ReplyDelete
  10. hi Rune, thanks for sharing. I have installed DP 5.5 DA on hardy, jaunty, luci with no problems, but have a hardy server with a scsi ultrium tape, and (installed MA) cannot set its scsi tape as backup device on the (win) cell manager... do you have any tip or experience on this aspect?
    (see http://ubuntuforums.org/showthread.php?p=10427296)

    Thx, Marco

    ReplyDelete
  11. @m.ardito: I've never used MA on Linux, and have no idea what that might be.

    My guess is that it is related to device permissions.

    ReplyDelete
  12. @super: I think I remeber I had to do some kind of --nodeps trick, but as we converted all the packages to .debs at the time I wrote this blog post, I haven't touched the RPMs since then.

    ReplyDelete
  13. To fix the error
    sh: rpm: Permission denied
    Error executing "LANG=C rpm -qp --queryformat %{NAME} OB2-CORE-A.06.11-1.i386.rpm": at /usr/share/perl5/Alien/Package.pm line 482.

    when converting rpm to debs

    restore de rpm binary
    #mv /usr/bin/rpm /usr/bin/rpm.new
    #cp /usr/bin/rpm.old /usr/bin/rpm

    ReplyDelete
  14. Gold star and a big "thanks" for this article. I needed the 32-bit linux (RHEL 6) RPMs to load the client and your article helped me bust them out. Thanks much!

    ReplyDelete
  15. I don't suppose you have happened to ever do this for Data Protector 6.2?
    I am looking and they have changed the directory structure - now I cannot find the core and da files.

    ReplyDelete
  16. i also had a same issue while installing the HP data protector client on HPUX server however i got the solution to fix this issue here:

    http://expertisenpuru.com/setup-cannot-continue-installation-of-data-protector-core-packet-failed/

    please check i hope this will fix your problem too.

    ReplyDelete