Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 27 Nov 2002 16:03:06 +0000
From:      Matthew Seaman <m.seaman@infracaninophile.co.uk>
To:        freebsd-questions@FreeBSD.ORG
Subject:   Re: increasing the size of a file system
Message-ID:  <20021127160306.GA35873@happy-idiot-talk.infracaninophi>
In-Reply-To: <200211221834.20396.tconnolly@electrosoftsolutions.com>
References:  <200211221834.20396.tconnolly@electrosoftsolutions.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Nov 22, 2002 at 06:38:31PM -0700, Thomas Connolly wrote:
> Hello all.  I am having a problem installing a very large program.  It wants 
> to extract itself to the /tmp directory but there is not enough space.  I 
> have a 30 Gb hard drive that is only 20% full so there is plenty of free 
> space to work with.  I've tried increasing the size of the file system as 
> follows:
> 
> umount -f /dev/ad0s1f
> growfs -s 4194304 /dev/ad0s1f
> 
> I get an error similar to the following:
> file system not grown (137xxxx -> 137xxxx)  [not sure of the exact values]

You can't growfs(8) a filesystem unless there's spare space in the
partition.  To increase the size of the partition on a plain disk
drive usually requires a lot of fiddling about with disklabel(8) and
probably backup and restore of large chunks of the disk.
 
> Can someone tell me what I am doing wrong or is there another work around such 
> as making the program think that /tmp is really somewhere else with more 
> space?

OK.  Two work-arounds.

   i) Find a partition with plenty of spare space (use df(1)).  Lets
      assume that partition is mounted at /foo.  Now create /foo/tmp
      and change the permissions etc. so it can be used as a temporary
      directory:

        # mkdir /foo/tmp
        # chown root:wheel /foo/tmp
        # chmod 1777 /foo/tmp

      Now set the TMPDIR environment variable to point to /foo/tmp:

        # setenv TMPDIR /foo/tmp   (tcsh, csh etc.)

      -or-

        # TMPDIR=/tmp/foo ; export TMPDIR  (sh, bash etc.)

     and try doing your install again.  Chances are it will honour the
     TMPDIR variable.  If it doesn't, move aside your existing /tmp
     directory and create a symlink to the new one:

        # cd /
        # mv tmp tmp.old
        ln -s foo/tmp tmp

     You should delete the link and move the old /tmp directory back
     into place when you're done, as a number of programs tend to keep
     unix domain sockets under /tmp, and various things will
     mysteriously not work properly until you do.  Either that, or
     reboot.

 ii) If you have plenty of swap space mount a mfs on /tmp:

        # mount_mfs -o rw /dev/ad0s1b /tmp

     Same caveats about unmounting after use

	Cheers,

	Matthew

-- 
Dr Matthew J Seaman MA, D.Phil.                       26 The Paddocks
                                                      Savill Way
                                                      Marlow
Tel: +44 1628 476614                                  Bucks., SL7 1TH UK

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?20021127160306.GA35873>