Sugesstion on space scarcity

Lennart Sorensen lsorense-1wCw9BSqJbv44Nm34jS7GywD8/FfD2ys at public.gmane.org
Mon Dec 20 14:45:45 UTC 2004


On Mon, Dec 20, 2004 at 04:08:51PM +0800, JM wrote:
> Hi ALL,
> 
>   Does anyone know of a way to increase disk space capacity of a DB Server. Im 
> running postgres 7.3.4
>   
>   Since PG lacks tablespace as of the said version... ( they are working on in 
> it on ver 8.0 )  and I havent heard of anyone doing soft links on data files 
> for a production server.
> 
> 
>   My Disk Setup: RAID 1
> 
>   Im just wondering if its possible to replace the disk with a higher 
> capacity.  eventually the box will do a mirror on the new disk.  After the 
> mirror replace the other disk.... 

I have done something that crazy in the past.

-Replace disk 0 with larger disk 
-rebuild mirror

You now have the data on both drives but one disk is larger.

-Boot single user mode from disk 1 with raid disabled, using disk 1 raid
partition as normal drive, or boot from a live cd or rescue cd
-Delete partition used for raid on disk 0, create new partition with the
same start location, and set up a new raid in degraded mode with the new
partition, resize filesystem on new raid to fill space (creating a raid
does not wipe the drive)
-When all that is done, you should be able to boot from disk0, add a new
larger disk 1, and rebuild the mirror

This is of course very easy to screw up, so complete backups that you
know how to restore are handy, although I managed to pull it off myself
in the past without data loss.  I tend to be lucky that way. :)

Lennart Sorensen
--
The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml





More information about the Legacy mailing list