Thanks Lionel
OK we have
1. stoped pnfs
2. destroyed the old database (installed and configured by yaim),
3. recreated the database with the same name,
4. successfully deployed the dump file (without errors) and
5. restarted the pnfs (no error messages).
Now when "ls /pnfs/site/data/" it hangs :(
Any ideas?
Sergey
On 06/03/2008, Lionel Schwarz <[log in to unmask]> wrote:
> Sergey,
> I think when you install pnfs it creates root directories in admin
> database. So when you restore the dump it gives this "duplicate key" error.
> I would:
> - stop pnfs server
> - delete all lines in admin and data1 database
> - restore the dump
> - restart pnfs server
>
> But I haven't tried so dcache experts could comment.
>
>
> Lionel
>
>
> Sergey wrote:
> > Dear dCache guru
> >
> > We got a problem with transferring postgres pnf data base from the old
> > dcache 1.7 instance to a new 1.8 one. Freshly installed dCache on the
> > test head node:
> > dcache-server-1.8.0-12p6
> > glite-SE_dcache_admin_postgres-3.1.2-0
> > postgresql-libs-8.2.6-1PGDG.rhel4
> > compat-postgresql-libs-4-2PGDG.rhel4
> > postgresql-server-8.2.6-1PGDG.rhel4
> > glite-SE_dcache_admin_postgres-3.1.2-0
> > postgresql-8.2.6-1PGDG.rhel4
> > pnfs-postgresql-3.1.10-7
> >
> > has empty data base for the gridpp VO and non-empty on the old one, where we had
> > dcache-server-1.7.0-35
> > pnfs-postgresql-3.1.10-3
> > postgresql-server-8.1.4-1
> > postgresql-libs-8.1.4-1PGDG
> >
> > To dump db we use simple command like:
> > sudo -u postgres /usr/bin/pg_dump gridpp > postgres.dcache02.gridpp.dump.sql
> > and then to restore it on the new head node:
> >
> > [root@bohr3213 ~]# sudo -u postgres /usr/bin/psql gridpp <
> > postgres.dcache02.gridpp.dump.sql
> > could not change directory to "/root"
> > SET
> > SET
> > SET
> > COMMENT
> > SET
> > SET
> > SET
> > ERROR: relation "pnfs" already exists
> > ALTER TABLE
> > ERROR: duplicate key violates unique constraint "pnfs_pkey"
> > CONTEXT: COPY pnfs, line 146:
> > "\\000\\000\\000\\000\\000\\000\\000\\000\\000\\001\\000\\000
> > \\000\\000\\000\\000\\000\\000\\000\\00..."
> > ERROR: multiple primary keys for table "pnfs" are not allowed
> > REVOKE
> > REVOKE
> > GRANT
> > GRANT
> >
> > It looks like the new database already contains some data hence the
> > duplicate keys error. What is the workaround to make this procedure in
> > correct way?
> >
>
>
--
--
Sergey Dolgobrodov
Department of Physics & Astronomy
University of Manchester
Manchester M13 9PL
Tel: +44 (0)161 6608472
Mobile: +44 (0)790 4587534
Skype: sergeygd
|