complete clone/restore from a ZFS-based system replication stream
vas at mpeks.tomsk.su
Thu Sep 29 09:05:00 UTC 2016
Matthew Seaman wrote:
> On 29/09/2016 03:25, Victor Sudakov wrote:
> > 1. You attach a second disk, it becomes ada1. You create ada1p2 for
> > swap and ada1p3 for zfs.
> > 2. You create a zpool on ada1p3. "zpool status" shows ada1p3 as the physical
> > device.
> > 3. You move the disk to another system. It boots, and being unable to
> > find ada1p3, loader(?) becomes desperate and uses
> > /dev/diskid/BLA-BLA-BLAp3 as the physical device for the root pool.
> > 4. Once the diskid label is in use, there is no more ada1p3 or ada0p3
> > or whatever. It gets hidden.
> > 5. You curse aloud and use /dev/diskid/BLA-BLA-BLAp2 for swap because no
> > device nodes and no other labels are available and there is no way to
> > make them visible or create more human-friendly labels for partitions.
> But /dev/ada1p2 or /dev/ada0p2 will still be visible, so you can tell
> your system to swap there...
No, they will not be visible. If /dev/diskid/BLA-BLA-BLAp3 is in use
by the pool, you won't see /dev/ada0p2 or /dev/ada0p1 either. That's
the problem. Only /dev/ada0 will be there.
> Even better, if you use gpart labels, in which case you'll have a
> /dev/gpt/swap whoes name will remain constant irrespective of which of
> ada0 or ada1 the disk ends up as. This is the default setup created by
> the installer.
I dunno, the default setup (at least on 10.3) created by the installer puts
kern.geom.label.gptid.enable="0" into /boot/loader.conf
Victor Sudakov, VAS4-RIPE, VAS47-RIPN
sip:sudakov at sibptus.tomsk.ru
More information about the freebsd-questions