The bootvinum Perl script in Appendix A makes life easier, but it may be necessary to manually perform some or all of the steps that it automates. This appendix describes how you would manually mimic the script.
Make a copy of /etc/fstab to be customized.
# cp /etc/fstab /etc/fstab.vinum
Edit /etc/fstab.vinum.
Change the device column of non-root partitions on the root spindle to /dev/vinum/mnt.
Change the pass column of non-root partitions on the root spindle to 2, 3, etc.
Delete any lines with mountpoint matching /NOFUTURE*.
Change the device column of /rootback from e to a.
Change the pass column of /rootback to 1.
Prepare disklabels for editing:
# cd /bootvinum # disklabel ad0s1 > disklabel.ad0s1 # cp disklabel.ad0s1 disklabel.ad0s1.b4vinum # disklabel ad2s1 > disklabel.ad2s1 # cp disklabel.ad2s1 disklabel.ad2s1.b4vinum
Edit /etc/disklabel.ad?s1.
On the root spindle:
Decrease the size of the b partition by 265 blocks.
Note the size and offset of the a and b partitions.
Note the smallest offset for partitions d-h.
Note the size and offset for all non-root, non-swap partitions (/home was probably on e and /usr was probably on f).
Delete partitions d-h.
Create a new h partition with offset 265 blocks less than the smallest offset for partitions d-h noted above. Set its size to the size of the c partition less the smallest offset for partitions d-h noted above + 265 blocks.
Note: Vinum can use any partition other than c. It is not strictly necessary to use h for all your Vinum partitions, but it is good practice to be consistent across all spindles.
Set the fstype of this new partition to vinum.
On the rootback spindle:
Move the e partition to a.
Verify that the size of the a and b partitions matches the root spindle.
Note the smallest offset for partitions d-h.
Delete partitions d-h.
Create a new h partition with offset 265 blocks less than the smallest offset noted above for partitions d-h. Set its size to the size of the c partition less the smallest offset for partitions d-h noted above + 265 blocks.
Set the fstype of this new partition to vinum.
Create a file named create.YouCrazy that contains:
drive YouCrazy device /dev/ad0s1h volume home plex name home.p0 org concat volume home sd name home.p0.s0 drive YouCrazy plex home.p0 len $hl driveoffset $ho volume usr plex name usr.p0 org concat volume usr sd name usr.p0.s0 drive YouCrazy plex usr.p0 len $ul driveoffset $uo
Where:
$hl is the length noted above for /home.
$ho is the offset noted above for /home less the smallest offset noted above + 265 blocks.
$ul is the length noted above for /usr.
$uo is the offset noted above for /usr less the smallest offset noted above + 265 blocks.
Create a file named create.UpWindow containing:
drive UpWindow device /dev/ad2s1h plex name home.p1 org concat volume home sd name home.p1.s0 drive UpWindow plex home.p1 len $hl driveoffset $ho plex name usr.p1 org concat volume usr sd name usr.p1.s0 drive UpWindow plex usr.p1 len $ul driveoffset $uo
Where $hl, $ho, $ul, and $uo are set as above.
This, and other documents, can be downloaded from ftp://ftp.FreeBSD.org/pub/FreeBSD/doc/.
For questions about FreeBSD, read the documentation before contacting <questions@FreeBSD.org>.
For questions about this documentation, e-mail <doc@FreeBSD.org>.