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 [EMAIL PROTECTED] with "unsubscribe freebsd-questions" in the body of the message