Pgsql troubleshooting & Iscsi

From: proj(at)free(dot)fr
To: iddekingej(at)lycos(dot)com
Cc: pgsql-general(at)postgresql(dot)org
Subject: Pgsql troubleshooting & Iscsi
Date: 2016-02-18 06:54:20
Message-ID: 554400846.146336953.1455778460592.JavaMail.root@spooler3-g27.priv.proxad.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I already mount with the netdev option.
The network service is started before postgresql but not lvm for.
I tried to start lvm service as dependency but no changes.

----- Mail d'origine -----
De: Jeroen van Iddekinge <iddekingej(at)lycos(dot)com>
À: proj(at)free(dot)fr, pgsql-general(at)postgresql(dot)org
Envoyé: Wed, 17 Feb 2016 18:51:42 +0100 (CET)
Objet: Re: [GENERAL] Pgsql troubleshooting & Iscsi

On 02/17/2016 06:07 PM, proj(at)free(dot)fr wrote:
> Hi everybody,
>
> I installed a postgresql database on Redhat 7.1 and I decided to move the database on an ISCSI device (LUN) inside a logical volume, mounted at starting of the machine (xfs formatted). The mounting point is /var/lib/pgsql
>
> At the boot of the server, postgresql.service is in failed status.
>
> In messages.log :
> systemd: mounting /var/lib/pgsql
> starting PostgreSQL database server
> kernel sdv: unknown partition table
> sd 2:0:0:0: [sdb] attached SCSI disk
> xfs (dm-4): Mounting V4 Filesystem
> postgresql-check-db-dir: "/var/lib/pgsql/data" is missing or empty
> postgresql.service: control process exited, code=exited status=1
> Failed to start PostgreSQL database server.
>
>
> When I'm logged on the server, if it try to start manually the database : systemctl start postgresql --> OK (and I don't lose any data, database is available)
>
> I think it's a problem of order in the boot process : network service must be started, then iscsi, then lvm etc... So I tried to force dependencies on the /usr/lib/systemd/system/postgresql.service adding "After=lvm-pgscan.service iscsi.service" etc... but the result is the same : failure in starting postgresql
>
>
>
> systemd: Starting Remote File Systems (Pre)
> systemd: Reached Remote File Systems (Pre)
> systemd: mounting /var/lib/pgsql
> systemd: starting PostgreSQL database server
> kernel sdb: unknown partition table
> postgresql-check-db-dir: "/var/lib/pgsql/data" is missing or empty
> kernel: xfs (dm-4): Mounting V4 Filesystem
> postgresql.service: control process exited, code=exited status=1
> Failed to start PostgreSQL database server.
> Unit postgresql.service entered failed state
> sd 2:0:0:0: [sdb] attached SCSI disk
> starting LVM2 PV scan on device 8:16
> kernel: xfs (dm-3): Ending clean mount
> systemd: Mounted /var/lib/pgsql
> Starting Remote File Systems
> Reached target Remote File Systems
>
> Any ideas ?
>
> regards,
> Magique
>
>
Put _netdev in the option field in fstab. This indicates that the
device must be mounted after network is available.

I have for example :

/dev/disk/by-path/ip-10.48.4.1:3260-iscsi-iqn.2004-04.com.qnap:ts-851:iscsi.lun0.e6ae62-lun-0-part1
/data3 btrfs _netdev 0 0

Regards
Jeroen

In response to

Browse pgsql-general by date

  From Date Subject
Next Message David Rowley 2016-02-18 07:14:21 Re: BRIN Usage
Previous Message Tom Smith 2016-02-18 05:32:11 BRIN Usage