Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 12 Jul 2007 16:01:50 +0200
From:      Frank Wissmann <frank.wissmann41@web.de>
To:        irene.kelly@apn.co.nz
Cc:        questions@FreeBSD.org
Subject:   Re: Question re reducing a file system in FreeBSD 6.2
Message-ID:  <4696344E.2000504@web.de>
In-Reply-To: <OF3534F5D6.4B3A318E-ONCC257316.000EC672-CC257316.000F5C86@apn.co.nz>
References:  <OF3534F5D6.4B3A318E-ONCC257316.000EC672-CC257316.000F5C86@apn.co.nz>

next in thread | previous in thread | raw e-mail | index | archive | help
irene.kelly@apn.co.nz wrote:
> Hi,
> 
> I have a question re reducing a filesystem in FreeBSD 6.2 - I am new to 
> FreeBSD - I am use to AIX
> 
> We have FreeBSD installed on a dell 1950 - I would like to reduce the size 
> of /usr   in case I want to added the space to another file system.
> We currently have all our space allocated as follows.
> 
> Here is the set-up
> 
> $ df -h
> Filesystem       Size    Used   Avail Capacity  Mounted on
> /dev/mfid0s1a    1.9G     59M    1.7G     3%    /
> devfs            1.0K    1.0K      0B   100%    /dev
> /dev/mfid0s1d    1.9G     14K    1.8G     0%    /tmp
> /dev/mfid0s1f     58G    3.2G     50G     6%    /usr
> /dev/mfid0s1e    1.9G     58M    1.7G     3%    /var
> $ mount
> /dev/mfid0s1a on / (ufs, local)
> devfs on /dev (devfs, local)
> /dev/mfid0s1d on /tmp (ufs, local, soft-updates)
> /dev/mfid0s1f on /usr (ufs, local, soft-updates)
> /dev/mfid0s1e on /var (ufs, local, soft-updates)
> 
> In AIX I can reduce the filesystem on the fly - however I don't think I 
> can do that with FreeBSD from what I have seen and I am not sure how this
> would be done consdering it is /usr I would like to reduce.
> I am currently looking at google to see what I can find.
> 
> Any Suggestions you have would be helpful.
> 
> Thank you &
> Regards
> Irene
> ********************************************************************************

Hi!
As far as I do know there is only one way to do what you want:
1. Backup your partition to an external disk using the "dump" command.
2. Boot your computer from a Live-CD and delete that particular 
partition.
3. Make a smaller partition using "bsdlabel" and mount it.
4. Restore your data in the new and smaller partition using the named 
command "restore".
This seems to be a hard work, but AFAIK is the only way in FBSD to 
resize a partition to a smaller amount.

Greetings

Frank



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