It's easier by far not to muck about trying to resize partitions.

If you can mount each drive (old and new) in an operating system
that isn't using them then that's your best bet and that's not so
hard to arrange. Mount the old partition structure in /old, create
new larger partitions on the new drive mounted on /new and rsync
-a /old/ /new/ (note the trailing /). After that you will need to
install the boot code if the drive is used for booting which it
probably is. I can't remember how to do that but it's no doubt
performed in https://cvsweb.openbsd.org/src/distrib/miniroot/install.sub
or its machine-dependent counterpart install.md (location varies).

It's also in the manpages. installboot(8) looks promising. Sorry
but I'm not going to provide instructions to do something I don't
remember how to do and haven't tested.

If you want to set up RAID or don't want to figure out how to install
the boot blocks, install anew on the new larger possibly-RAIDed
drives, install the same set of packages and copy /home and a few
files from /etc to get a practically-identical installation.

Matthew

Reply via email to