Question re reducing a file system in FreeBSD 6.2

Frank Wissmann frank.wissmann41 at web.de
Thu Jul 12 14:00:24 UTC 2007


irene.kelly at 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


More information about the freebsd-questions mailing list