Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 5 Aug 1998 09:04:23 -0400 (EDT)
From:      CyberPeasant <djv@bedford.net>
To:        plindqst@usa.net (Paul Lindquist)
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: File System
Message-ID:  <199808051304.JAA19696@lucy.bedford.net>
In-Reply-To: <01BDBFF1.2E3B3E60@pm3-24.ppp215.webzone.net> from Paul Lindquist at "Aug 4, 98 09:34:04 pm"

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

One thing to do first:  read the manual for the proxy server and see
if it has a switch or an environment variable to set where it expects
its "stuff", and use that instead of all this rigamarole, if not...

Paul Lindquist wrote:
> I have installed FreeBSD but made a mistake.  I installed the Proxy Server 
> (delegate) and it creates its cache file on the var file system, not the 
> /usr file system.  Is there any way I can alter the partition sizes to 
> allow me to have a larger var file system and a smaller var system without 
> reformatting or reinstalling the system?                ^^^ you meant /usr?

No, in general. 

Well, you don't have to really reinstall -- what you have to do is
save the partitions in question, (on tape or on a slice or device
you're not messing with), then run disklabel -e, repartition the
slice in question, then newfs and restore the partitions whose
offsets or sizes have changed. If you don't understand that, don't
try it.

Instead of that, try this:

Let's suppose it is writing to a file /var/stuff/foo.cache. You
would like it to be writing to /usr/stuff/foo.cache.

Step one: kill the software. If this is a busy machine, maybe
go to single user mode.

Step two: copy everything so that /usr/stuff/*  is just like
/var/stuff/*

	one way:
		cd /var
		tar cpf /tmp/stuff.tar stuff
		cd /usr
		tar xvpf /tmp/stuff.tar 
		rm /tmp/stuff.tar

[the tar can be simplified:
	(cd /var; tar cpf - stuff)|(cd /usr; tar xvpf - )]
Some men use cp -R, but I don't like innovation.


Step three: Whack the old directory
		rm -r /var/stuff
		(or, for the timid, mv /var/stuff /var/oldstuff)

Step four: Make symbolic link:

		cd /var
		ln -s /usr/stuff stuff

Step Five: restart the software.

Note: this doesn't need to be on /usr, necessarily.

Another method is to hack the source (possibly only a change in a Makefile),
rebuild and reinstall the software in question.

Dave
-- 
         Bedford County, PA -- 47,000 polite, friendly Appalachians,
                4,000 of whom have concealed-carry permits.

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?199808051304.JAA19696>