Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 7 Mar 2003 01:02:37 -0500
From:      "Matthew Emmerton" <matt@gsicomp.on.ca>
To:        "Murray Taylor" <murraytaylor@bytecraftsystems.com>, <freebsd-questions@FreeBSD.ORG>
Cc:        <carewm@bytecraft.au.com>
Subject:   Re: Growing / shrinking a file system
Message-ID:  <026001c2e46f$28529a00$1200a8c0@gsicomp.on.ca>
References:  <200303071654.41171.murraytaylor@bytecraftsystems.com>

next in thread | previous in thread | raw e-mail | index | archive | help

----- Original Message -----
From: "Murray Taylor" <murraytaylor@bytecraftsystems.com>
To: <freebsd-questions@FreeBSD.ORG>
Cc: <carewm@bytecraft.au.com>
Sent: Friday, March 07, 2003 12:54 AM
Subject: Growing / shrinking a file system


> I've found growfs and looked at tunefs--- is there a utility to shrink a
> partition so that I can give the space to another one

No.

> operator@redback(/sbin)ttyp1 > df -h
> Filesystem    Size   Used  Avail Capacity  Mounted on
> /dev/ad0s1a    97M    41M    48M    46%    /
> /dev/ad0s1f    17G   1.8G    14G    11%    /usr
> /dev/ad0s1e    19M   7.9M   9.9M    44%    /var
> procfs        4.0K   4.0K     0B   100%    /proc
>
> This is the current disk stats ... NB this disk was setup using auto
sizing
> from the install CD (poss miscalculation??)

Auto-sizing is not perfect for everyone, especially people running large
mail servers or database servers which require lots of space in /var.

> We need to reallocate space from ad0s1f and give it to ad0s1e
> preferably with out rebuilding the machine.
>
> I am thinking of paxing /var to /usr/var, then unmounting /var
> and symlinking /usr/var to /var as an interim step

What is your main consumer of space in /var?

One trick I've often done is create a /usr/var2 directory, move stuff from
/var into /usr/var2 (such as /var/log and /var/mail) and then symlink the
directories from /var over to /usr/var2.

> But I would like them to remain on separate better sized slices

Then your only choice is to backup, re-splice and restore.

--
Matt Emmerton


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?026001c2e46f$28529a00$1200a8c0>