Loss of SDB(2) and how to handle (ZFS)

cpzengel

Renowned Member
Nov 12, 2015
218
24
83
Aschaffenburg, Germany
zfs.rocks
Hi,

we have a Raid10 running on rpool

pve-manager/4.1-1/2f9650d4 (running kernel: 4.2.6-1-pve)

Obviously Bootsector is found on sda1 and sdb1.
All other HDDs like sdc,d,e,f... are without a Partition

So whats the best way to replace the Drive to keep boot capability!

cheers

chriz
 
yesterday wie repartitioned a new drive
set gpt
first partition type boot size 2048
secondary partition with the rest of it
then dd if=/dev/sda1 of=/dev/sdb1 bs=1m

then we did a zpool replace rpool sdb2 sdb2

we tried to boot the new hdd and it worked fine

is this the way to do or other?

chriz
 
The "dd" step was unnecessary. However, you do want to be sure to install grub on the new disk too.

I notice that on the disks partitioned by proxmox install, the first partition is not aligned on 2048 boundary, so using advanced mode of gdisk you can make that partition. it goes from sector 32 to 2047. Then from 2048-(end - 16385) sectors for the second partition, then the remainder of approximately 8MB as partition 9. I have not a clue why they leave 8MB at the end there. Also I had to set the partition types to match.

Install grub with
Code:
grub-install /dev/sdb

Once you do the zpool replace, it re-silvers the data and you're good to go. Check the zpool status on it.
 
i did

sgdisk -R /dev/sdb /dev/sdc (sdc is source, sdb ist target)
sgdisk -G /dev/sdb

grub-install /dev/sdb

but grub isnstall responds with


---
root@pve-35:~# grub-install /dev/sdb
Installing for i386-pc platform.
grub-install: error: unknown filesystem.

---
table looks that way

Number Start (sector) End (sector) Size Code Name

1 34 2047 1007.0 KiB EF02

2 2048 1953508749 931.5 GiB BF01 zfs

9 1953508750 1953525134 8.0 MiB BF07
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!