Deleting /usr dedicated slice.
Hello all, 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? __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-questions in the body of the message
Re: Deleting /usr dedicated slice.
In [EMAIL PROTECTED], Ihsan Junaidi Ibrahim [EMAIL PROTECTED] typed: Hello all, 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? Did you really put your partitions on separate slices? If so, you've made more work for yourself. Growfs just grows the file system in a partition to use extra space. You've got to add the space to the partition yourself. So this can only work if the spare partition immediately follows the partition that is going to grow. Normally, what you would have to do to do that is use the disklabel -e to remove the spare partition and change the size of the old partition to include the new one. If you've put your partitions on separate slices, you have to use fdisk to remove the spare slice and add the space to the slice that is going to grow before you use disklabel on the partitions. After you've done that step, or those two steps, you can use growfs on the partition to make it use the extra space. Be sure and back up /var before trying this. mike -- Mike Meyer [EMAIL PROTECTED] http://www.mired.org/consulting.html Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information. To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-questions in the body of the message
Re: Deleting /usr dedicated slice.
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