Volpers, Hagen wrote on Fri, Mar 27, 2009 at 01:56:07AM +0100:

> But I think there is a misunderstanding. I was talking about, mmhh,
> let's say fdisk partitions. I want to create two absolut independent
> installations. My problem is, that disklabel always uses the whole
> disc (c:), I'm not able to switch between the fdisk-partitions (wd0 /
> rwd0c is always the same).

According to the disklabel(8) manual, the disklabel refers to the whole
disk.  I never heard that anybody tried to trick a disk into having one
disklabel for its first part and a second disklabel for its second part.
Also, i see no point in that.  That disklabel just cuts the disk into
slices to put filesystems in.  In any case, you will only mount those
filesystems that you want to work with right now.  It does no harm if
the disklabel contains some more slices you don't use.  Why would you
want to split the disklabel into two parts?  In my eyes, that would seem
to be an unnessessary complication and obfuscation.

> If I got you right you created something like this:
> 
> wd0a: /root1
> wd0b: "shared" swap
> wd0d: /root2
> [...]

Yes.

If you install once to wd0a and once to wd0d, these two installations
*are* completely independent - even if you share /tmp and /home.
Of course, pay attention not to share /usr (for obvious reasons)
or /var (think of /var/db/pkg!).

> That means that you only switch the mount-point during installation,
> keeping the partitions untouched, right?

Yes.

Of course, you must take care not to clobber the first installation
when doing the second one, that is, while running the install process
for the second one, you must not specify mount points for the partitions
used for the first installation, or new file systems will be created
there, erasing the first installation.  In case you want to access one
installation from the other, edit /etc/fstab *after* the installation,
when the new system has booted from disk.  Typically, you would mount
the root and /usr partitions of the other installation read-only
for additional safety, to avoid unadvertedly damaging one installation
while the other one is booted.

Again, when you are short on hardware and need to maintain several
servers running different -stable releases concurrently (can that
really happen at the same time?), that's probably a use case for a
build machine set up this way.  But still, picking one release and
sticking to that, and upgrading all machines one right after the
other when the time comes, will probably cause less work and be
less error-prone.

Reply via email to