X-Original-To: pgsql-admin-postgresql.org@postgresql.org Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id 08F599FB1EA for ; Fri, 15 Sep 2006 11:25:53 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 06308-03 for ; Fri, 15 Sep 2006 14:25:34 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey- Received: from smadev.internal.net (host3.dynacom.ondsl.gr [62.103.35.211]) by postgresql.org (Postfix) with ESMTP id 3B5B19FB1C0 for ; Fri, 15 Sep 2006 11:25:30 -0300 (ADT) Received: from smadev.internal.net (localhost [127.0.0.1]) by smadev.internal.net (8.13.6/8.13.6) with ESMTP id k8FEPPhR025210 for ; Fri, 15 Sep 2006 17:25:25 +0300 (EEST) (envelope-from achill@matrix.gatewaynet.com) Received: from localhost (localhost [[UNIX: localhost]]) by smadev.internal.net (8.13.6/8.13.6/Submit) id k8FEPPvR025209 for pgsql-admin@postgresql.org; Fri, 15 Sep 2006 17:25:25 +0300 (EEST) (envelope-from achill@matrix.gatewaynet.com) From: Achilleas Mantzios Organization: Dynacom Tankers Mgmt To: pgsql-admin@postgresql.org Subject: Re: Postgresql 7.4 migration to (partially) new disks Date: Fri, 15 Sep 2006 17:25:24 +0300 User-Agent: KMail/1.9.3 References: <200609151344.34058.achill@matrix.gatewaynet.com> In-Reply-To: <200609151344.34058.achill@matrix.gatewaynet.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200609151725.24976.achill@matrix.gatewaynet.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.135 tagged_above=0 required=5 tests=FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200609/154 X-Sequence-Number: 23068 =CE=A3=CF=84=CE=B9=CF=82 =CE=A0=CE=B1=CF=81=CE=B1=CF=83=CE=BA=CE=B5=CF=85= =CE=AE 15 =CE=A3=CE=B5=CF=80=CF=84=CE=AD=CE=BC=CE=B2=CF=81=CE=B9=CE=BF=CF= =82 2006 13:44, =CE=BF/=CE=B7 Achilleas Mantzios =CE=AD=CE=B3=CF=81=CE=B1= =CF=88=CE=B5: > Hi, > > Our main postgresql/jboss/lotus notes server is configured as follows. > > OS : Debian GNU linux 3.0 > PgSQL: 7.4.13 > > The FS structure of the system has as follows: > > > Filesystem 1k-blocks Used Available Use% Mounted on > /dev/sda1 9614116 6528132 2597612 72% / > /dev/sdf 10321208 5801628 3995292 60% /raid2 > /dev/sdg 6956424 4720060 1882988 72% /raidlog > > where /dev/sda1 is the boot SCSI disk, while > /dev/sdf and /dev/sdg reside on two external EMC logical disks connected > with qlogic interfaces. > > PgSQL is installed at the default location /usr/local/pgsql, > data is on the ~ of postgres user : /var/lib/pgsql/data > > My main DB's (dynacom) data are held in > $PGDATA2 location at > /raid2/var/lib/postgres-data > > also the commit log and transaction log directories are linked to: > pg_clog -> /raidlog/sma/var/lib/pgsql/data/pg_clog > and > pg_xlog -> /raidlog/sma/var/lib/pgsql/data/pg_xlog > > We have planned to do the following task on this Sunday: > Migrate from Debian GNU linux 3.0 to SUSE SLES 9 (thats just a wierd lotus > notes "requirement"), and the sysadms have decided to do that on the same > HW, EMC disk arrays, by only replacing the root (/) disk. > > The normal (safe) way to do that would be by following the normal > backup/install/configure/restore path. > > However (just with any upgrade, and with lotus notes things get really > scary at times), there is always the possibility that the whole upgrade > procedure holds untill monday morning, when there would be an order from > our boss to rollback to the old system, or maybe repeat the same procedure > every night of the next days of the week until we succeed in Lotus Notes > upgrade! > > In this scenario,If my new suse pgsql installation was some hours alive at > the meantime, > i would have to do the whole reverse backup/restore procedure again, > and this normally takes several minutes to comlete. > The DB is something about 2.5 Gbytes on .sql dump and 6 Gbytes on disk. > > So one thought passing thru was to keep the alive postgresql dirs without > dumps/restores. That is to just retain the whole pgsql > directory /var/lib/pgsql/data on both systems, by copying back and fourth, > while leaving data $PGDATA2 (/raid2/var/lib/postgres-data) on the same EMC > disks.=20 I guess (from the zero responses) that maybe i was not clear enuf, so i will try to set the question like this: What considerations should someone take if he is about to just cp -r /data . =2Ei.e. creating the PGDATA dir *not* following the standard initdb procedu= re Is there any implication having to do with timestamps? modification dates?= =20 ownerships? other? if i just do=20 cp -a /data . (-a implies -R) and then chown -R postgres:postgres ./data (new postgres user on the new SUSE might have a different uid/gid than the= =20 original Debian), then will i have a healthy data dir=20 for postgresql to reliably work? I'd suppose this might work on a test system, but should someone rely on it for a critical production system? Thanx > That is no backup restore at all.=20 > (Providing ofcourse that the /var/lib/pgsql/data owner/group are also to = be > setup correctly). > > Does any one have done anything similar with (long term success), > or does anyone sees any potential problems with the later approach? > > Thanx a lot for any thoughts. =2D-=20 Achilleas Mantzios