Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 28 Mar 1999 10:27:07 +0930
From:      Greg Lehey <grog@lemis.com>
To:        Dibyo Gahari <dibyo@bali.net>, freebsd-questions@FreeBSD.ORG
Subject:   Re: how to change a partition size
Message-ID:  <19990328102707.N53452@lemis.com>
In-Reply-To: <199903261725.AAA18333@server.jad.net>; from Dibyo Gahari on Sat, Mar 27, 1999 at 01:24:50AM %2B0800
References:  <199903261725.AAA18333@server.jad.net>

next in thread | previous in thread | raw e-mail | index | archive | help
[Format recovered--see http://www.lemis.com/email/email-format.html]

On Saturday, 27 March 1999 at  1:24:50 +0800, Dibyo Gahari wrote:
>
> hi,
>
> i need some information on how to change/add a partition size.
>
> for example, the result of my free bsd is :
>
> Filesystem 	1K-blocks 	Used 		Avail 		Capacity 	Mounted on
> /dev/sd0a	31775		27828 		1405 		95% 		/
> /dev/sd0s2f 	2076240 	283497 		1626644 	15% 		/usr
> /dev/sd0s2e 	29727 		15311 		12038 		56% 		/var
> procfs 	4		4		0		100% 		/proc
>
> i need to add the size of /var

Why?

> my questins are:
> 1. without adding a hard drive, i will add /var size by downsizing /usr
> size. is it possible ? 

Yes.

> if yes, how to do it ?

1.  Make complete, separate backup of the entire file systems /var and
    /usr.

2.  Reinstall the system (yes, this is one of the cases) and select
    new sizes for /var and /usr.

3.  Read in the backups, being careful not to replace
    /usr/lib/libc.so.*.

> 2. by adding a new hard drive, how can i move /var to the new hard
     drive ?

Just create a file system on the drive and call it /var.

I always recommend against having a /var file system at all.  The
situation you find yourself in now is the main reason: it's a real
pain to have to resize file systems, and there's no good reason for a
/var file system on the same disk as /usr in the first place.  I'd
recommend:

1.  For now, put subdirectories of /var on /usr and use symlinks to
    point there.

2.  In future, don't use /var at all.  Make a directory /usr/var and
    create a symlink from /var to /usr/var.

Greg
--
When replying to this message, please copy the original recipients.
For more information, see http://www.lemis.com/questions.html
See complete headers for address, home page and phone numbers
finger grog@lemis.com for PGP public key


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990328102707.N53452>