View Single Post
  #6   (View Single Post)  
Old 4th December 2022
lattimro lattimro is offline
Port Guard
 
Join Date: Jun 2021
Posts: 15
Default

Quote:
Originally Posted by jggimi View Post
Hello, and welcome!

Your /usr/local partition is currently surrounded by two other partitions: /usr/X11R6 and /usr/src. So you will not be able to use growfs(8) to increase its size without eliminating or moving /usr/src. However, you could move and resize the /usr/local partition into unused space. Here, then, is a completely untested "How to" -- written from memory (and having done similar tasks in the past myself). As with any guidance you get from an unofficial source, please use with caution.

1. Either boot into single-user mode (use "-s" at the boot> prompt) or drop from multi-user to single-user mode (# kill 1).

2. If you booted into single-user mode, mount all file systems (# mount -a). If you dropped into single-user mode, filesystems are already mounted.

3. Use disklabel(8) to create a new filesystem "l". Use the -E option to use the built-in disklabel editor. You will need to use the "b" command to reset the size of the OpenBSD-usable area, because the MBR on this larger drive has not been altered and the A6 MBR partition is still the old size of the drive. Read the disklabel(8) man page. Then, read it again.

4. Mount the new filesystem (# mount -o async,noatime /dev/wd0l /mnt)

5. Replicate the /usr/local filesystem. This example uses dump(8) and restore(8). Review their man pages.

# cd /mnt
# dump -0af - /usr/local | restore -rf -
# rm restoresymtable

6. Edit /etc/fstab, replacing your "h" partition with your "l" partition.

7. reboot.

Once you confirm everything is working properly, you may delete the "h" partition with disklabel(8).
jggimi is not clear: where wd0i is mounted? After step 8 /usr/local is now on /mnt right? Is there another step? 5b?
Reply With Quote