Thread: Postgres 9.1 issues running data directory from VMware shared folder
On 08/26/2014 03:08 PM, Arze, Cesar wrote: > Hi, > > I’ve recently encountered an issue running Postgres (both 8.4 and 9.1) > on a VMware VM running Ubuntu 10.04 LTS as the guest OS with the data > directory running out of a VMware shared folder. Previously on 8.4 this > had worked out for me but after upgrading VMware and re-building my VM > I’ve started to encounter this issue. It seems like the problem occurs > when I run initdb, I get the following error: So what is the host OS? Where is the shared directory located, which OS? What file system is the directory located on? > > # sudo -u postgres /usr/lib/postgresql/9.1/bin/initdb --noclean -D > /mnt/pg_data/ > creating template1 database in /mnt/pg_data/base/1 ... FATAL: could not > open file "pg_xlog/000000010000000000000001" (log file 0, segment 1): No > such file or directory > > child process exited with exit code 1 > initdb: data directory "/mnt/pg_data" not removed at user's request > What is in /mnt/pg_data after the error? > Thanks for any help, > > Cesar > > > > -- Adrian Klaver adrian.klaver@aklaver.com
On Aug 26, 2014, at 3:08 PM, Arze, Cesar <CArze@som.umaryland.edu> wrote: > > I probably should be posting to the VMware mailing list with this question but I wanted to see if anyone had any insightor suggestions here. I’ve seen many similar issues but none of the solutions proposed there worked for me. This might not be what you're seeing, but there was a hideous bug in the shared folder (hgfs) driver for linux guest OSesthat'll silently corrupt your filesystem if it's accessed via more than one filehandle (e.g. multiple opens, multipleprocesses, ...). If you're using vmware tools bundled with workstation 10.0.1 or fusion 6.0.2, you have that bug and cannot safely use hgfsmounts for any files, let alone postgresql. (There was a different bug, with similar results, for earlier versions too,including at least fusion 5.0.1). VMWare claim it's fixed in the tools bundled with 10.0.2 / 6.0.3 (I've not tested it).If you're not running the very latest vmware, upgrade to it and install the latest tools (or avoid using hgfs). Cheers, Steve
So what is the host OS?
Where is the shared directory located, which OS?
What file system is the directory located on?
What is in /mnt/pg_data after the error?
drwx------ 1 postgres postgres 4096 2014-08-26 21:58 base
drwx------ 1 postgres postgres 4096 2014-08-26 21:58 global
drwx------ 1 postgres postgres 4096 2014-08-26 21:58 pg_clog
-rw------- 1 postgres postgres 4476 2014-08-26 21:58 pg_hba.conf
-rw------- 1 postgres postgres 1636 2014-08-26 21:58 pg_ident.conf
drwx------ 1 postgres postgres 4096 2014-08-26 21:58 pg_multixact
drwx------ 1 postgres postgres 4096 2014-08-26 21:58 pg_notify
drwx------ 1 postgres postgres 4096 2014-08-26 21:58 pg_serial
drwx------ 1 postgres postgres 4096 2014-08-26 21:58 pg_stat_tmp
drwx------ 1 postgres postgres 4096 2014-08-26 21:58 pg_subtrans
drwx------ 1 postgres postgres 4096 2014-08-26 21:58 pg_tblspc
drwx------ 1 postgres postgres 4096 2014-08-26 21:58 pg_twophase
-rw------- 1 postgres postgres 4 2014-08-26 21:58 PG_VERSION
drwx------ 1 postgres postgres 4096 2014-08-26 21:58 pg_xlog
-rw------- 1 postgres postgres 19169 2014-08-26 21:58 postgresql.conf
On August 26, 2014 at 7:30:41 PM, Adrian Klaver (adrian.klaver@aklaver.com) wrote:
On 08/26/2014 03:08 PM, Arze, Cesar wrote:
> Hi,
>
> I’ve recently encountered an issue running Postgres (both 8.4 and 9.1)
> on a VMware VM running Ubuntu 10.04 LTS as the guest OS with the data
> directory running out of a VMware shared folder. Previously on 8.4 this
> had worked out for me but after upgrading VMware and re-building my VM
> I’ve started to encounter this issue. It seems like the problem occurs
> when I run initdb, I get the following error:
So what is the host OS?
Where is the shared directory located, which OS?
What file system is the directory located on?
>
> # sudo -u postgres /usr/lib/postgresql/9.1/bin/initdb --noclean -D
> /mnt/pg_data/
> creating template1 database in /mnt/pg_data/base/1 ... FATAL: could not
> open file "pg_xlog/000000010000000000000001" (log file 0, segment 1): No
> such file or directory
>
> child process exited with exit code 1
> initdb: data directory "/mnt/pg_data" not removed at user's request
>
What is in /mnt/pg_data after the error?
> Thanks for any help,
>
> Cesar
>
>
>
>
--
Adrian Klaver
adrian.klaver@aklaver.com
On August 26, 2014 at 8:36:23 PM, Steve Atkins (steve@blighty.com) wrote:
On Aug 26, 2014, at 3:08 PM, Arze, Cesar <CArze@som.umaryland.edu> wrote:
>
> I probably should be posting to the VMware mailing list with this question but I wanted to see if anyone had any insight or suggestions here. I’ve seen many similar issues but none of the solutions proposed there worked for me.
This might not be what you're seeing, but there was a hideous bug in the shared folder (hgfs) driver for linux guest OSes that'll silently corrupt your filesystem if it's accessed via more than one filehandle (e.g. multiple opens, multiple processes, ...).
If you're using vmware tools bundled with workstation 10.0.1 or fusion 6.0.2, you have that bug and cannot safely use hgfs mounts for any files, let alone postgresql. (There was a different bug, with similar results, for earlier versions too, including at least fusion 5.0.1). VMWare claim it's fixed in the tools bundled with 10.0.2 / 6.0.3 (I've not tested it). If you're not running the very latest vmware, upgrade to it and install the latest tools (or avoid using hgfs).
Cheers,
Steve
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
On 8/26/2014 5:51 PM, Arze, Cesar wrote: > Thanks for the info, will look into what version of Workstation I am > running (think I have 9.0) and will see if I can’t get an upgraded > copy and see if it alleviates the issue. also, there's several years of patches since RHEL 5.4 was released, I think its up to 5.9. -- john r pierce 37N 122W somewhere on the middle of the left coast
On 8/26/2014 5:51 PM, Arze, Cesar wrote:
> Thanks for the info, will look into what version of Workstation I am
> running (think I have 9.0) and will see if I can’t get an upgraded
> copy and see if it alleviates the issue.
also, there's several years of patches since RHEL 5.4 was released, I
think its up to 5.9.
--
john r pierce 37N 122W
somewhere on the middle of the left coast
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
Re: Postgres 9.1 issues running data directory from VMware shared folder
"Arze, Cesar" <CArze@som.umaryland.edu> writes: > creating template1 database in /mnt/pg_data/base/1 ... FATAL: could > not open file "pg_xlog/000000010000000000000001" (log file 0, segment > 1): No such file or directory We've seen something slightly similar when running PostgreSQL in a Linux container. See this thread for more details: http://www.postgresql.org/message-id/spamdrop+87ha31kxrc.fsf@atom.bunk.cc We have not solved this problem yet, but currently I'm leaning towards blaming the container layer, so next time we experience problems I think we'll try to remove the virtualization. Best regards Jacob