[OpenIndiana-discuss] problem replacing a disk by a bigger one
Toomas Soome
tsoome at me.com
Mon Jun 27 07:32:04 UTC 2022
hi!
Ok, first of all, there is no reason to copy zfs pool with dd. It may or may not work. For single disk migration, it is better to use either zpool mirror + zpool split, or zfs send, as zfs send or beadm create -p poolname beName. please note that beadm create does not mirror everything over - only BE related datasets, so you would need to recreate swap/dump and copy over rpool/export and whatever else you have there.
Now, you got error about error on reading MOS. This means, you have gptzfsboot running in memory, but it is in trouble - MOS is like ufs superblock - if you can not read it, the whole pool is not accessible.
Why this does happen? In general, there could be 2 reasons - either we can not read the sectors with MOS (physical IO, checksum errors, LBA too large for bios), or there is some sort of error and we get wrong pointer from uberblock in pool label.
Wrong pointer *may* happen when pool label copies have different updates and most recent update is in last 2 copies of the label (should not happen with clean shutdown), and we fail to access those 2 last copies (they are stored at the end of the pool).
Please note, zfs mirror and dd only can work with same sector size disks (apparently your old disk has 512B). The BIOS boot only does support 512B sector size, for 4kn you need UEFI boot and zfs send/beadm create, as you need to create new pool.
I guess this is pretty much all I can add based on the information below.
thope this helps,
toomas
> On 27. Jun 2022, at 10:00, Guenther Alka <gea at napp-it.org> wrote:
>
> If you want to replace the bootdisk the easiest disaster recovery method is to zfs send the current BE to your datapool, then do a clean install of OI to a new disk, send the BE back, activate then boot into the old BE.
>
> For a non boot disk (with rpool) do a zpool replace poolname olddisk newdisk.
>
> With an ongoing sync of the BE via incremental zfs send you always have an up to date BE copy for recovery.
>
>
> Gea
>
> Am 26.06.2022 um 23:52 schrieb Judah Richardson:
>> IIRC dd doesn't work reliably for ZFS.
>>
>> I tried (& failed, possibly due to a bad source disk) to do this
>> previously, but I think you have to ZFS send all the datasets in the source
>> disk to the destination & then possibly do some beadm stuff on the target
>> disk.
>>
>> Or do a default installation on the new disk, then ZFS send the
>> non-bootloader datasets from the old disk to the new.
>>
>>
>> On Sun, Jun 26, 2022, 16:46 Marc Lobelle <marc.lobelle at uclouvain.be> wrote:
>>
>>> Hello
>>>
>>> In tried to replace the ssd of my notebook running openindiana (120G) by
>>> a bigger one (1T).
>>>
>>> I first copied the small ssd on the big one: I connected the big disk on
>>> a usb adapter, ran format to identify the two devices then
>>>
>>> dd if=/dev/rdsk/c6t0d0p0 of=/dev/rdsk/c4t0d0p0 bs=2048K
>>>
>>> then I replaced the small internal disk by the big one.
>>>
>>> However, when booting, I got the following message
>>>
>>> ZFS:i/o error - all block copies unavailable
>>>
>>> ZFS: Can't read MOS of pool rpool
>>>
>>> Can't find /boot/loader
>>>
>>> Can't find /boot/zfsloader
>>>
>>> illumos/x86 boot
>>>
>>> Default: /boot/loader
>>>
>>> boot:
>>>
>>> if I type <enter>, I get
>>>
>>> Can't find /boot/loader
>>>
>>> illumos/x86 boot
>>>
>>> Default: /boot/loader
>>>
>>> boot:
>>>
>>> How can I fix this ? (without reinstalling everything if possible;-)
>>> (after that I plan of course to grow the fs to the whole disk)
>>>
>
>
> _______________________________________________
> openindiana-discuss mailing list
> openindiana-discuss at openindiana.org
> https://openindiana.org/mailman/listinfo/openindiana-discuss
More information about the openindiana-discuss
mailing list