How could I resize an OpenBSD partition?
I have a /var partition of 20 GB and I want to have it of about 1 GB and I
don't know how to do it.
You cannot shrink partition, but you can create another one.
You can copy /var contents to another partition with enough free space
using cp:
cp -Rp /var /usr/var
or using tar:
cd /; tar cf - var|tar xpf - -C /usr
then in single user mode use disklabel -E wd0 to recreate /var
partition, make newfs on it, mount it in /var, mount /usr and restore data
using cp:
cp -Rp /usr/var /
or using tar:
cd /usr; tar cf - var|tar xpf - -C /)
Please correct me if I wrong.