Date: Sun, 9 Feb 2003 20:55:20 +0200 From: Giorgos Keramidas <keramida@ceid.upatras.gr> To: Ihsan Junaidi Ibrahim <ihsan_junaidi@yahoo.com.sg> Cc: freebsd-questions@FreeBSD.org Subject: Re: Deleting /usr dedicated slice. Message-ID: <20030209185520.GA97688@gothmog.gr> In-Reply-To: <200302091632.27327.ihsan_junaidi@yahoo.com.sg> References: <200302091632.27327.ihsan_junaidi@yahoo.com.sg>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030209185520.GA97688>