Hi,
I just replaced both disks of a zroot mirror (da2 and da10). As far as I can tell I did everything right. But evidently something went wrong, since the server won't boot. All I get is a black screen, with a blinking cursor. On the bright side, this is an old decommissioned server, I'm just using to mess around and try out some new stuff. Mainly getting the hang of bhyve. I also still have the original disks. So, worst case scenario, nothing bad happens anyway. But I still like to fix this, in case I come to face this scenario in a more dire and serious situation.
Here is what I did:
First, I added a new disk in the empty HDD-slot. FreeBSD (11.2) named it da11. Then I ran the following commands:
I then removed da2 and added the second HDD to this slot.FreeBSD named it da2. Then I ran the following commands:
Kind regards,
Marinus ten Napel
I just replaced both disks of a zroot mirror (da2 and da10). As far as I can tell I did everything right. But evidently something went wrong, since the server won't boot. All I get is a black screen, with a blinking cursor. On the bright side, this is an old decommissioned server, I'm just using to mess around and try out some new stuff. Mainly getting the hang of bhyve. I also still have the original disks. So, worst case scenario, nothing bad happens anyway. But I still like to fix this, in case I come to face this scenario in a more dire and serious situation.
Here is what I did:
First, I added a new disk in the empty HDD-slot. FreeBSD (11.2) named it da11. Then I ran the following commands:
Code:
gpart show da2 (get the layout of the original disk)
gpart destroy -F da11
gpart create -s GPT da11
gpart add -b 40 -s 200M -t efi da11
gpart add -b 409640 -s 512k -t freebsd-boot da11
gpart add -b 410664 -s 2G -t freebsd-swap da11
gpart add -t freebsd-zfs da11
gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 da11
dd if=/dev/da2p1 of=/dev/da11p1
gpart show da11 (all seems fine)
zpool attach zroot /dev/da2p4 /dev/da11p4
zpool detach zroot /dev/da2p4
I then removed da2 and added the second HDD to this slot.FreeBSD named it da2. Then I ran the following commands:
Code:
gpart show da10 (get the layout of the original disk)
gpart destroy -F /dev/da2
gpart create -s GPT da2
gpart add -b 40 -s 200M -t efi da2
gpart add -b 409640 -s 512k -t freebsd-boot da2
gpart add -b 410664 -s 2G -t freebsd-swap da2
gpart add -t freebsd-zfs da2
gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 da2
dd if=/dev/da10p1 of=/dev/da2p1
gpart show da2 (all seems fine)
zpool attach zroot /dev/da10p4 /dev/da2p4
zpool detach zroot /dev/da10p4
zpool status -v
showed that everything was fine, so I decided to reboot. And this resulted in an unbootable server. So, my question is, is this fixable? I so, how? And, what went wrong?Kind regards,
Marinus ten Napel