Re: Postgres 9.6 fails to start on VMWare

From: George Neuner <gneuner2(at)comcast(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Postgres 9.6 fails to start on VMWare
Date: 2017-10-23 16:17:41
Message-ID: na4sucd0ag00bnbvdm6cibotp6s3i2d9m8@4ax.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, 23 Oct 2017 09:14:18 +0100, Martin Moore
<martin(dot)moore(at)avbrief(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Scott Marlowe 2017-10-23 17:19:05 Re: table corruption
Previous Message Martin Moore 2017-10-23 15:37:10 Re: Postgres 9.6 fails to start on VMWare