Re: Re: Database over multiple drives

From: Wm Brian McCane <bmccane(at)maxbaud(dot)net>
To: Andy Samuel <andysamuel(at)geocities(dot)com>, pgsql-admin(at)postgresql(dot)org
Subject: Re: Re: Database over multiple drives
Date: 2001-06-01 18:57:44
Message-ID: 000701c0eacc$be238240$0201a8c0@ahl.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Yes!!

I have done this very successfully. I have mounts:

/usr/local/pgsql/data 8Gig slice on Primary IDE-Slave
/usr/local/pgsql/data2 8Gig slice on Secondary IDE-Master
/usr/local/pgsql/data3 4Gig slice on Primary IDE-Master

Then I move files from data/base/<dbdir> to data2/base/<dbdir> and create a
symbolic link with the following.

$ pg_ctl stop
*NOTE* Make sure it really shut down, I have some long running tasks which
have bitten me during a moment of stupidity
$ cd /usr/local/pgsql/data/base/<dbdir>
$ mv <datafile> /usr/local/pgsql/data2/base/<dbdir>/<datafile>
$ ln -s /usr/local/pgsql/data2/base/<dbdir>/<datafile> .
$ pg_ctl start

I currently only have the pg_xlog directory on data3 because that drive is
also shared with the operating system. But just moving the pg_xlog
directory alone gave me a significant performance boost. By freeing up the
data drives from having to write those log files, I am less likely to have
to wait for the heads to move around after fsyncing a log file. You can
also move entire database directories using commands similar to those above.

- brian

----- Original Message -----
From: "Andy Samuel" <andysamuel(at)geocities(dot)com>
To: <pgsql-admin(at)postgresql(dot)org>
Sent: Thursday, May 31, 2001 11:55 PM
Subject: [ADMIN] Re: Database over multiple drives

> Has anybody *really* tried this solution ?
> Is it safe ?
>
> TIA
> Andy
>
> ----- Original Message -----
> From: "Ragnar Kjørstad" <postgres(at)ragnark(dot)vestdata(dot)no>
> To: "David Lizano" <david(dot)lizano(at)izanet(dot)com>
> Cc: <pgsql-admin(at)postgresql(dot)org>
> Sent: Thursday, May 31, 2001 4:33 PM
> Subject: Re: Database over multiple drives
>
>
> > On Thu, May 31, 2001 at 10:37:26AM +0200, David Lizano wrote:
> > > You can't do it with Postgres. To do it, Postgres must implement
> > > "tablespaces" to spread the database in different localizations (who
can
> be
> > > different physical localizations, of course). Then a table can be
> assigned
> > > to a tablespace.
> >
> > Sure you can.
> > You can move some files to a different drive, and put a symlink in the
> > original directory.
> >
> > Or, if you have an operatingsystem that has an logical volume manager,
> > you can concatenate several disks, use striping or whatever, to get a
> > logical device that spans several physical devices.
> >
> >
> > --
> > Ragnar Kjørstad
> > Big Storage
> >
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo(at)postgresql(dot)org
>

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Lee Kwok Shing 2001-06-02 02:33:36 Hang when doing insert/update
Previous Message Andy Samuel 2001-06-01 04:55:12 Re: Database over multiple drives