On Sun, Aug 09, 2015 at 12:01:30AM -0400, Quartz wrote: > >The disklabel(8) tool is used to delete and create partitions. > > So part of the reason I started this thread is that I want to be clear since > OpenBSD has two different kinds of "partitions". For what I'm doing, on an > i386 platform, I don't need to mess with fdisk at all... Is that correct?
Correct. On the half-dozen architectures which use MBRs, they're for boot procedures and/or define the sectors where the OS may scribble on the drive. For the dozen or so other architectures, they're not used at all. > growfs is like other partition expanders in that can only expand "forward" > and not "backward", right? As in, I couldn't nuke src and obj and then use > growfs to expand home into that space. Correct. > Assuming that's right, I'm probably going to make a new /var partition > rather than expand an existing one. Recall one of my examples: deleting the partitions for /usr/obj and /usr/src, replacing those 2GB with a new /var partition. > >The best practice for > >moving of FFS filesystems is through the use of dump(8)/restore(8). > > I'm not sure that's what I want to be doing in my case. Especially when > collapsing the /usr/* stuff down into just /usr, a simple cp or tar would be > better, no? I recommend dump/restore because it eliminates problems with linked files and eliminates problems with file path byte length. You may have trouble with both, using other methods. The result will be files that are not copied, and links that are broken. Don't fear dump/restore. They're easy to use. Here's a quick "howto", though the man pages should be reviewed. Never blindly copy/paste instructions you read from me -- especially when they are from memory, as in this example. 1. Mount a freshly formatted partition. 2. cd to the mount point. 3. Dump the old partition, piping the output to restore. The old partition does not need to be mounted. Assuming the contents of partition "f" of drive "sd0" is to be moved to the working directory: # dump -0af - /dev/sd0f | restore -rf - 4. Since you aren't using incremental dumps, you can then delete the "restoresymtable" file created by restore(8). 5. Edit your fstab(5) to point to the new partition.