[OpenIndiana-discuss] Migrating root zpool from old disks to, new one. only one system available
Hans J. Albertsson
hans.j.albertsson at branneriet.se
Tue Jun 12 15:18:21 UTC 2012
Actually I found the following blog quite illuminating.
http://www.big-bubbles.fluff.org/blogs/bubbles/blog/2012/02/04/placeholder-migrating-a-zfs-root-pool/
It would have to be worked thru for a number of specific cases. But it
is basically sound.
A bird's eye view might be: format the new disk to have a partition s0
starting from cyl 1 and a boot partition 8 on cyl 0
set up a zpool (using the hacked version with --blocksize if you'r not
certain the disk reports a truthful 4k block size) on s0
create a new BE on that zpool as a clone of your current BE. Add swap
and dump in the new zpool too
zfs send/recv using -R anything that wasn't brought over by the beadm
cloning
installgrub -R the new device, and edit vfstab and do a dumpadm to point
swap and dump as seen from the new environment to the new ones.
Name will be not rpool, and you can do another round as above if you care.
Read that blog while doing it: this bird's eye isn't anywhere near complete.
On 2012-06-12 09:00, openindiana-discuss-request at openindiana.org wrote:
> Message: 1
> Date: Tue, 12 Jun 2012 00:39:32 +0200
> From: "Hans J. Albertsson"<hans.j.albertsson at branneriet.se>
> To:openindiana-discuss at openindiana.org
> Subject: [OpenIndiana-discuss] Migrating root zpool from old disks to
> new one. only one system available
> Message-ID:<4FD673A4.5030604 at branneriet.se>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> Suppose:
>
> I have a system with but two disks. They're fairly small: 300GB, and use
> 512B sectors.
>
> These two disks are a mirror zpool, creqated from the entire disks.
>
> There are about 20 or so filesystems in there.
>
> The system has room for only two disks.
>
> I'd like to replace these two small disks with two 2TB disks using 4kB
> blocks.
>
> So:
>
> Is there a writeup on how to connect one of these new disks to the
> existing machine, using an external esata cabinet.
> set up a new zpool on this new disk, and transfer all the root pool data
> to the new single disk zpool.
> then set up the new zpool to be bootable.
> And last: taking the old disks out of the machine, place the new single
> disk, and another, empty, similar 2TB disk in the machine, and boot from
> the single new one as the new root zpool. And then add the second new
> disk as a mirror.. effectively running the old system exactly as it was
> w/o reinstalling anything significant, but with much roomier disks.
>
> Note: in this case there is no way to get another system to do it on.
> And a third disk can only be connected using an external cabinet and
> Esata or USB.
More information about the OpenIndiana-discuss
mailing list