Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 12 Feb 2001 21:50:19 -0600 (CST)
From:      Nick Rogness <nick@rogness.net>
To:        Brad W <bradley_watts@hotmail.com>
Cc:        questions@FreeBSD.ORG
Subject:   Re: Transfer disk space form /usr to root partition
Message-ID:  <Pine.BSF.4.21.0102122127200.61398-100000@cody.jharris.com>
In-Reply-To: <F142W7MnO1AiDLAuh1w0000a669@hotmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 12 Feb 2001, Brad W wrote:

> First of all, is this possible? I have exceeded all available space on my 
> root partition.

	Yes, it is doable.

> 
> Filesystem    Size   Used  Avail Capacity  Mounted on
> /dev/ad0s2a    51M    51M  -4.0M   109%    /
> /dev/ad0s2f   4.6G   1.8G   2.4G    42%    /usr
> /dev/ad0s2e    20M   9.7M   9.0M    52%    /var
> procfs        4.1K   4.1K     0B   100%    /proc
> 
> 
> I should have made my root partition larger when I initially installed but, 
> ahh... too late now. Is there any valuable documentation on doing this and 
> if so where?

	1) Add a new disk to the system
	2) fdisk and disklabel it (via /stand/sysinstall or manually)
	3) mount the filesystem(s) on the new disk 
	(example: Where ad1 is the new disk)

		# mount /dev/ad1s1a /mnt
		# mount /dev/ad1s1f /mnt/usr
		# mount /dev/ad1s1e /mnt/var

	4) Dump the data and restore it.  This copies your existing
	filesystems to the new disk, example:

		# dump 0af - / |(cd /mnt;restore xf -)
		# dump 0af - /usr |(cd /mnt/usr;restore xf -)
		# dump 0af - /var |(cd /mnt/var;restore xf -)

	5) edit and change your /etc/fstab file to reflect the new
	changes, save it and reboot!

	Of course, you don't need to change all the filesystems if you
	don't want to.  I used all of your filesystems above but you could
	just as easily just change root and/or usr.

Nick Rogness <nick@rogness.net>
- Keep on routing in a Free World...  
  "FreeBSD: The Power to Serve!"




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?Pine.BSF.4.21.0102122127200.61398-100000>