Re: safelly erasing dirs/files - Mailing list pgsql-general

From John R Pierce
Subject Re: safelly erasing dirs/files
Date
Msg-id 4AFFAE19.7080803@hogranch.com
Whole thread Raw
In response to Re: safelly erasing dirs/files  (Greg Smith <greg@2ndquadrant.com>)
List pgsql-general
Greg Smith wrote:
>> how do I un-bloat the /var partition ? this is why I was considering
>> rm !!!!
>>
> I've gotten out of this situation before by finding other files in
> /var to delete, using something like this to figure out where the big
> stuff was at:

while sometimes /var/log or /var/spool data is the problem, far more
often, /var/lib/pgsql/data was the biggun on systems that didn't plan
for this...

my fix has been what I said earlier.  in more detail

1) (make available a new storage volume)
2)    # mkfs /dev/sd??
3)    # mount /dev/sd?? /u01
4)    # /etc/init.d/postgresql stop
5)    # mv /var/lib/pgsql /u01
7)    # ln -s /u01/pgsql /var/lib/pgsql
8)    # /etc/init.d/postgresql start

adjust directories and stop/start commands as appropriate for your
distribution.

if you can't come up with a new volume, but have an existing volume with
sufficient space, then...

1)    # mkdir /someplace/pgsql
2)    # /etc/init.d/postgresql stop
3)    # mv /var/lib/pgsql /someplace
4)    # ln -s /someplace/pgsql /var/lib/pgsql
5)    # /etc/init.d/postgresql start

Personally, I really like having my database data on dedicated RAID10
volumes for best performance.



pgsql-general by date:

Previous
From: Greg Smith
Date:
Subject: Re: safelly erasing dirs/files
Next
From: Andreas Kretschmer
Date:
Subject: Re: re-using RETURNING