release notes | Book: 1.9.5, 1.9.12 (opt, FHS), 2.11 (FHS), 2.12 (FHS), 2.13 (FHS), 2.14 (FHS), | Wiki | Q&A black_bg
Web: Multi-page, Single page | PDF: A4-size, Letter-size | eBook: epub black_bg

Checking the GDBM Database Files

In the following, we will assume that the old pnfs server software is installed below /opt/pnfs.3.1.10/pnfs/ and the pnfs databases are stored in /opt/pnfsdb/pnfs/databases/. These are the standard locations. However, they can be freely configured in /usr/etc/pnfsSetup. The actual locations of the database files can be found as follows

[root] # . /usr/etc/pnfsSetup
[root] # cat ${database}/D-* | cut -f 5 -d ':'

Shut down the pnfs server (after shutting down dCache):

[root] # /opt/pnfs.3.1.10/pnfs/bin/pnfs stop

This would be a good time to perform a backup of the database files in /opt/pnfsdb/pnfs/databases/.

Check the integrity of these GDBM database files as follows. First prepare the environment for the pnfs tools as usual:

[root] # . /usr/etc/pnfsSetup
[root] # PATH=${pnfs}/tools:$PATH

Choose a suitable temporary directory <tempDirOld> where the output of the scan commands is stored and create it

[root] # mkdir <tempDirOld>/

Perform the following three commands for each of the database files in /opt/pnfsdb/pnfs/databases/ (or whereever you found them as described above):

[root] # md3tool scan /opt/pnfsdb/pnfs/databases/<dbName> > <tempDirOld>/<dbName>.scan 2>&1
[root] # md3tool scandir /opt/pnfsdb/pnfs/databases/<dbName> > <tempDirOld>/<dbName>.scandir 2>&1
[root] # md3tool scandirs /opt/pnfsdb/pnfs/databases/<dbName> > <tempDirOld>/<dbName>.scandirs 2>&1

Have a look at the output. It should contain no error messages. You can do that with

[root] # grep -v "^ ID" <tempDirOld>/<dbName>.scan
[root] # grep -v "^Scan" <tempDirOld>/<dbName>.scandir
[root] # grep -v "^Dir" <tempDirOld>/<dbName>.scandirs

The output of these three commands should look like

 Total Objects : 48
 Directories
   inode  : 5
   data   : 18
   hash   : 10
 Files
   inode  : 5
   data   : 5
   hash   : 0
 Links
   inode  : 0
   data   : 0
   hash   : 0
 Tags
   inode  : 4
   data   : 0
   hash   : 0
 Scanning DB id : 1
   External Reference at 0 : 000400000000000000001060 for d2
   External Reference at 0 : 000800000000000000001060 for d6
   External Reference at 0 : 000B00000000000000001060 for d9
   External Reference at 0 : 000700000000000000001060 for d5
   External Reference at 0 : 000200000000000000001060 for d0
   External Reference at 0 : 000500000000000000001060 for d3
   External Reference at 0 : 000900000000000000001060 for d7
   External Reference at 0 : 000300000000000000001060 for d1
   External Reference at 0 : 000A00000000000000001060 for d8
   External Reference at 0 : 000600000000000000001060 for d4
 Scanning DB id : 1

It should not contain any error messages. The lines starting with External Reference should contain the pnfs IDs and names of the directories which are the root of a new database created as described in the section called “The Databases of pnfs.

Only if there are no errors or unusual output for all of the database files of the pnfs server you can continue with the conversion to the PostgreSQL version of pnfs. In the case of errors the conversion will most likely result in loss of data. In this case, stay with the old version of the pnfs server. Even though some parts of the database files are broken - as the scan reveals - the system will continue to run fine. Restart the server with

[root] # /opt/pnfs.3.1.10/pnfs/bin/pnfs start

since the conversion as described below will not work porperly. In this case contact for guidance in converting to PostgreSQL and remember to attach the output of the grep commands given above.