Re: [GENERAL] Postgres 9.6 fails to start on VMWare - Mailing list pgsql-general

From George Neuner
Subject Re: [GENERAL] Postgres 9.6 fails to start on VMWare
Date
Msg-id na4sucd0ag00bnbvdm6cibotp6s3i2d9m8@4ax.com
Whole thread Raw
In response to [GENERAL] Postgres 9.6 fails to start on VMWare  (Martin Moore <martin.moore@avbrief.com>)
Responses Re: [GENERAL] Postgres 9.6 fails to start on VMWare  (Martin Moore <martin.moore@avbrief.com>)
List pgsql-general
On Mon, 23 Oct 2017 09:14:18 +0100, Martin Moore
<martin.moore@avbrief.com> wrote:

>Same server. I tried a few times.
>
>I didn’t move the db separately, but did a ‘dd’ to copy the disk
>to an imagefile which was converted and loaded into VMWare.

If you copied the boot device that way while the system was running,
then you are lucky it even starts in the new environment.

What you did is only [really] safe to do with a data volume ... and
the volume should be mounted R/O while it is being copied.

Doesn't GCloud provide a way to export drive images?
[He asks naively, never having used it.]

>I ‘believed’ that this should keep the low level disk structure the
>same, but if this has corrupted the files I can drop, dump and
>restore, in which case how do I ‘drop’ the DB without postgres
>running?

Move/rename the PG data directory, then use initdb to create a new
cluster.  You'll have to reload your databases from backups.

But I would be concerned that the disk structure is damaged.  I would
run e2fsck on it - and if there are lots of errors found I wouldn't
use it.

George



-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

pgsql-general by date:

Previous
From: Martin Moore
Date:
Subject: Re: [GENERAL] Postgres 9.6 fails to start on VMWare
Next
From: Scott Marlowe
Date:
Subject: Re: [GENERAL] table corruption