PACS Databases

a. Databases @ MPE 12000 - 12699

b. Databases @KUL 12700 - 13399

c. EQM databases 13400 - 13409

d. IST - operation databases at ESOC 13410 - 13420

e. IST databases 13421 - 13430

f. Uplink preparation databases

g. Spare 13500 - 13999

Setting the Database IDs

I have the feeling that a given DB ID cannot be re-used also if the database has been removed. Need clarification...

dbid -r cusdefinitions -> show DBID
dbid -d cusdefinitions -> delete DBID
setdbid 12002 cusdefinitions -> set DBID
dbid -C 12002 cusdefinitions 

Creating a database with a specific ID

The following example uses two variables to store the

set id=12035
set name=pacs_fs_ilt_1
makedb $name
cp -v $HCSS_DIR/lib/herschel/versant/store/admin/profile.be $VERSANT_DB/$name
createdb $name
dbid -d $name
dbid -C $id $name
setdbid $id $name
db_admin -i $name@$HOST

Updating Database Engine

Schema evolution

Traps and Tricks

vbackup trap

Mail from Tilmann :

This bug is known to Versant as bug# 20945. It occurs when using 'vbackup' with the device name of an existing file. In that case, the backup will finish within second, creating a small file between 100KB and 1MB, claiming that the backup was successful. The resulting file cannot be restored to a database, but will cause 'vbackup -restore' to hang.

To avoid the problem, please do not use an existing file name as backup file.

Replication aware Datbase or not

Sometimes you get an error that the Database is Replication aware or not and does not match to your access

You have two options :

Hot Spot error for remote access

When a remote user (like Diego) start cusgui and he/she gets a java hotspot whatever error it might be caused by the user access rights !

A strange error for such a problem. Locally access you get a proper error message.

Do :

  dbuser -add -P <DBName>

Check whether there are open transactions

   dbtool -trans -info <DBName>

Hot Spot and Low Level Connection Error

Sometimes a user starting cus may get an JAVA Hotspot error like this :

comm/CVS> cus -f -import DMC_grat_scan_chop2_fast.txt
Jun 26, 2006 11:16:34 AM herschel.share.log.util.LogInitialiser init
INFO: Using default HCSS log settings
26-Jun-06 11:16:34.543 Configuration: Build number is 931
#
# An unexpected error has been detected by HotSpot Virtual Machine:
#
#  SIGSEGV (0xb) at pc=0x47cfb3bc, pid=7360, tid=1075185344
#
# Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode, sharing)
# Problematic frame:
# C  [liboscfe.so+0xa93bc]  se_beginSession+0x677
#
# An error report file with more information is saved as hs_err_pid7360.log
#
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp
#
/home/dcesarsk/pcss/lib/hcss/bin/cus: line 3:  7360 Aborted     java -Xmx512M -Dproperty.path="${HCSS_PROPS}" herschel.cus.gui.Cus "$@"

Then you may try on PACS1 the db2tty on that database. In case you get here a different error (Low Level connection error) you may need to restart the xinetd. Don´t ask me why.

/etc/init.d/xinetd restart

If it still not work , try a second time. At least I was successful with it...

Funny enough you may get also this HotSpot error in case the license.xml file is not at the right place !!

Another Hot Spot error

The reason for the following CUS error

cus -listdefs
Jun 13, 2008 1:43:08 PM herschel.share.log.util.LogInitialiser init
INFO: Using default HCSS log settings
13-Jun-08 13:43:08.486 Configuration: Build number is 1605
13-Jun-08 13:43:10.220 ReplStoreFactoryImpl: Creating ObjectStore: erw3@pacs1.mpe-garching.mpg.de
#
# An unexpected error has been detected by HotSpot Virtual Machine:
#
#  SIGSEGV (0xb) at pc=0x00002aaaae54e61f, pid=16912, tid=47002441797536
#
# Java VM: Java HotSpot(TM) 64-Bit Server VM (1.5.0_15-b04 mixed mode)
# Problematic frame:
# C  [liboscfe.so+0xd361f]  se_beginSession+0x710
#
# An error report file with more information is saved as hs_err_pid16912.log
#
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp
#
/home/erw/pcss/lib/hcss/bin/cus: line 3: 16912 Aborted                 java -Xmx512M -Dproperty.path="${HCSS_PROPS}" herschel.cus.gui.Cus "$@"

or the an error "7003, UT_DB_NO_ACCESS: No access rights to DB dir"

for Versant utilities was a database file system remounted as read-only.

Delivery of Databases to ESAC

Make a backup of the Database :

   vbackup -dev <name>_<version>.vbck -backup <name>

and put the backup on PACS1 /home/esac/databases

send an email to John Dowson <John.Dowson@sciops.esa.int> Larry O'Rourke <Laurence.O'Rourke@esa.int>

Offline DataFrame Generation into Database

Assumption: Database is backed up in case something goes wrong!!!!!!

* Log into PACS1 account oper

* type psetup

* Edit .pcss/props : Configure the TM ngestion process (see HCSS TM Ingestion User Manual - HERSCHEL-HCS-DOC-0231

* Start the EGSE router.

startRouter 9875

* Start dfgen

dfgen

This has the same properties as tmingest.

* Use rtaplay to retrieve telemetry packets from the database and pass them to the router

rtaplay

* Check progress

db2tty -d <database> | grep PacsDataFr

* In case of problems you may connect the TmPacketDumper to the Router and check :

Usage of 64 Bit Versant Beta Client in PCSS

You need to get the beta Version of Versant for 64Bit Linux from Tilmann Zaeschke <tzaeschk@rssd.esa.int>. Then your CLASSPATH and LD_LIBRARY_PATH need to point to the right libraries.

Example in csh (installation of Versant 64Bit beta under :/opt/vds7020Blinux64_opt_beta1) :

# 64 Bit Versant test
setenv LD_LIBRARY_PATH /opt/vds7020Blinux64_opt_beta1/lib:${LD_LIBRARY_PATH}

setenv CLASSPATH /opt/vds7020Blinux64_opt_beta1/lib/jvi7.0.2-jdk1.4.jar:${CLASSPATH}

On PACS4 done in : /etc/csh.cshrc.local and /user/pcss/psetup

Additionally we introduced in this file :

setenv VERSANT_SERVICE_PORT 5019
setenv VERSANT_ROOT /opt/vds7020Blinux64_opt_beta1
setenv PATH /opt/vds7020Blinux64_opt_beta1/bin:${PATH}

Usage of 64 Bit Versant Beta Server und Suse

Be careful. In the README of vds7020Blinux64_opt_beta1 the following oscssd file example is given :

service oscssd
{
socket_type = stream
protocol = tcp
wait = no
user = root
server = $VERSANT_ROOT/bin/ss.d
server_args = in.oscssd
disable = no
}

First of all the environment variables are not recognized. But even if you give the full name we get another error.

To solve this you need to use :

service oscssd
{
        socket_type             = stream
        protocol                = tcp
        wait                    = no
        user                    = root
        server                  = /opt/versant/vds7020Blinux64_opt_beta1/bin/ss.d
        disable                 = no
}

Indexing the Database

Make sure that you have enough space in the database left:

dbtool -space -volume -all <dbname>

Free space should be at least 20%.

java -Xmx512M herschel.access.db.CreateIndexes <dbname>

Alternatively, using the versant commands:

dbtool -index -create -btree herschel.versant.ccm.TmSourcePacketImpl _time <dbname>

Expand database volume

   check volume 
   > dbtool -F pacseqmimt1  # VERSANT 6
   > dbtool -space -volume -all pacseqmimt1 # VERSANT 7 -- man ! I neede quite some time to get this syntax change ...

Peer Zaal wrote : From the Friday talking, with John and Albrecht and Kevin, I learned that you always should include the "- i" option in order to pre-allocate disc space, i.e. you never run the risk that your database crashes because the disc space added is not available due to limited disc-resources. John mentioned that the "-i" also improves the performance of a versant (write) interaction with the database of interest. Furthermore Albrecht always add junks of about 2G, and increase as many volumes expected to be needed:

 > addvol -i -n volume1 -p volume1 -s 2000M database_name

Note, never add full path definitions in your addVol call as this will cause problems at the moment you do a backup/restore to another machine.

Backup the Database

There is a hidden keyword which speed on the backup process :

vbackup -nobuffering -dev <name of the Database>.vbck -backup <name of the Database>

Indexing the Database

Make sure that you have enough space in the database left:

dbtool -space -volume -all <dbname>

Free space should be at least 20%.

java -Xmx512M herschel.access.db.CreateIndexes <dbname>

Alternatively, using the versant commands:

dbtool -index -create -btree herschel.versant.ccm.TmSourcePacketImpl _time <dbname>

Improving Backup speed

vbackup works very slow (especially on PACS1 Database server (1.2 Ghz / 50G in 2.5 h). From Albrecht I learned a not documented keyword which improves the speed significant :

 vbackup -nobuffering -dev <dbname>.vbck -backup <dbname>

Database propagation with ESAC

HW and OS setup

For the network setup please see http://www.xray.mpe.mpg.de/~paul/netz/pacs.html

Currently following network addresses are used for PACS:

The host pacs6 is configured in a way that all packets for the network 195.74.188.80/28 are routed to the network interface eth2 which is connected to the ESA router in the basement.

Herschel: PACS/Database (last edited 2009-07-15 14:32:38 by localhost)