Re: bad block problem - Mailing list pgsql-admin

From Craig Ringer
Subject Re: bad block problem
Date
Msg-id 4EE00D71.6090705@ringerc.id.au
Whole thread Raw
In response to Re: bad block problem  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
List pgsql-admin
On 12/08/2011 07:41 AM, Kevin Grittner wrote:

> That sounds like your storage system is failing, quite independently
> from PostgreSQL.  Copy the entire data directory tree to some other
> medium immediately, and preserve this copy.  If you hit bad blocks,
> retry if possible.

If you find files you can't copy in their entirety, try using dd_rescue
to copy it with a hole for the bad block. dd_rescue is an _incredibly_
useful tool for this, as it'll do bad-block-tolerant copies quickly and
efficiently.

Once you have a complete copy of your datadir, stop working on the
faulty machine. Make your first copy read-only. Duplicate the copy and
work on the duplicate when trying to restore. I'd start with enabling
zero_damaged_pages to see if you can get a dump that way.

Do **NOT** enable zero_damaged_pages on the original. Do it on the
duplicate of the copied data.

--
Craig Ringer

pgsql-admin by date:

Previous
From: Craig Ringer
Date:
Subject: Re: bad block problem
Next
From: lst_hoe02@kwsoft.de
Date:
Subject: Re: Number of connections still limited on Windows 64-bit?