Subject: Re: disk full on i386 1.6.1 !
To: None <richard.ploix@fr.adp.com>
From: Jeremy C. Reed <reed@reedmedia.net>
List: tech-net
Date: 10/23/2003 09:38:40
On Thu, 23 Oct 2003 richard.ploix@fr.adp.com wrote:

> - /dev/wd0e /usr
>
> Questions :
> 1 - I want to use the dos-partition 3 for my NetBSD box, howto do ?

Use disklabel to create a new BSD partition, like named wd0f.

mbrlabel can do this for you. Have a look at the mbrlabel man page.

Then use newfs to create a filesystem on the newly created partition.

> 2 - I want to move /usr from dos-partition2 to dos-partition 3, howto do ?

You may want to do this in single user mode.

Mount the new partition, such as:
 mount /dev/wd0f /mnt

Then copy all of /usr/ (but not "usr" directory name itself) to it. You
can use tar, pax, cpio, cp (-Rp), or other tools to copy everything over.

Unmount partitions:
 umount /mnt
 umount /usr

(Old /dev/wd0e will still contain original copy of /usr.)

Mount new partition as /usr:
 mount /dev/wd0f /usr

Check to see if it works.

Edit /usr entry in your /etc/fstab file, like:
/dev/wd0f /usr ffs rw 1 2

> 3 - I want to give the free area (from /usr) to / , howto do ?

You could use disklabel to edit the size of the wd0a partition. But,
I don't think there are any tools to grow the filesystem. So you would
have to backup all of wd0a to another location, disklabel it, newfs
(reformat and lose all data), mount it, and copy everything back.

Maybe it will be easier to just use your wd0e for /var or /home or
whatever you need the space for. (Use basically same steps showed above,
finishing with editing the fstab file.)

Have fun,

   Jeremy C. Reed
   http://bsd.reedmedia.net/

p.s. I set the reply-to, so you won't reply to tech-net or port-i386.
Usually only post to one list.