From owner-freebsd-questions Sun Feb 9 12:40:59 2003 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BD62A37B401 for ; Sun, 9 Feb 2003 12:40:56 -0800 (PST) Received: from mailsrv.otenet.gr (mailsrv.otenet.gr [195.170.0.5]) by mx1.FreeBSD.org (Postfix) with ESMTP id 88B2D43FA3 for ; Sun, 9 Feb 2003 12:40:55 -0800 (PST) (envelope-from keramida@ceid.upatras.gr) Received: from gothmog.gr (patr530-b159.otenet.gr [212.205.244.167]) by mailsrv.otenet.gr (8.12.6/8.12.6) with ESMTP id h19KeqRX010794; Sun, 9 Feb 2003 22:40:53 +0200 (EET) Received: from gothmog.gr (gothmog [127.0.0.1]) by gothmog.gr (8.12.6/8.12.6) with ESMTP id h19KeZGV030355; Sun, 9 Feb 2003 22:40:51 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Received: (from giorgos@localhost) by gothmog.gr (8.12.6/8.12.6/Submit) id h19ItKY9044107; Sun, 9 Feb 2003 20:55:20 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Date: Sun, 9 Feb 2003 20:55:20 +0200 From: Giorgos Keramidas To: Ihsan Junaidi Ibrahim Cc: freebsd-questions@FreeBSD.org Subject: Re: Deleting /usr dedicated slice. Message-ID: <20030209185520.GA97688@gothmog.gr> References: <200302091632.27327.ihsan_junaidi@yahoo.com.sg> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200302091632.27327.ihsan_junaidi@yahoo.com.sg> Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On 2003-02-09 16:32, Ihsan Junaidi Ibrahim wrote: > I just bought an 80 GB drive and would like move /usr partition to > the new disk. I have a dedicated partition /da0s1f that is currently > dedicated to it. /var partition resides in da0s1e. > > How do delete the slice that is occupying /usr and use that free > space to extend /var? I read the man pages and growfs is the way but > how do I exactly do it? Since 80 GB of disk space is a lot, you could also use the second disk as a temp area, while joining /var and /usr of the first disk into a new /var. This could easily be done with: 1) Boot in single user mode. 2) Create & newfs a huge /usr on your second disk, that can accomodate both your current /var and /usr partitions (i.e., da1s1a). 3) Mount your new /usr partition under /mnt from da1s1a. 4) Use dump & restore to move things from your current /usr into /mnt. I't probably a good idea to copy /var into /mnt/var instead of deeper. 5) Move away (do not delete, yet) your exiting /var, and create a symlink /var -> /usr/var. 6) Update your /etc/fstab to make sure the old /var and /usr partitions are not used. 7) Boot your system and check for any problems. If all seems fine, you can remove the old /var and /usr partitions from da0, your first disk. Then, create a single partition that will eventually hold your /var partition which spans the space previously occupied by the original /var and /usr partitions, and move to the second part of the process: 1) Boot single user again. 2) Mount da1s1e which now has the space of your old /var and /usr under /mnt. 3) Use dump & restore to move stuff from /usr/var to /mnt. 4) Remove the symlink of /var -> /usr/var and create a directory /var (owned by root:wheel with permissions 0755). 5) Unmount /mnt and remount it at /var. 6) Exit single user mode. If all works fine, you can delete /usr/var. - Giorgos To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message