Create Partition For New Disk

dpsw12

Member
Dec 5, 2019
25
0
6
33
Hello guys i install zfs on 1 disk and i want to add new disk for mirroring zfs, how to partition the new disk same as existing disk?

Code:
lsblk

NAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT

sda      8:0    0  2.2T  0 disk

├─sda1   8:1    0 1007K  0 part

├─sda2   8:2    0  512M  0 part

└─sda3   8:3    0  2.2T  0 part

sdb      8:16   0  2.2T  0 disk



fdisk -l

Disk /dev/sda: 2.18 TiB, 2400476553216 bytes, 4688430768 sectors

Disk model: EG002400JWJNT

Units: sectors of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 4096 bytes

I/O size (minimum/optimal): 4096 bytes / 4096 bytes

Disklabel type: gpt

Disk identifier: 14177CE2-9463-47C7-8B15-53AAF204C1A7



Device       Start        End    Sectors  Size Type

/dev/sda1       34       2047       2014 1007K BIOS boot

/dev/sda2     2048    1050623    1048576  512M EFI System

/dev/sda3  1050624 4688430734 4687380111  2.2T Solaris /usr & Apple ZFS



Partition 1 does not start on physical sector boundary.





Disk /dev/sdb: 2.18 TiB, 2400476553216 bytes, 4688430768 sectors

Disk model: EG002400JWJNT

Units: sectors of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 4096 bytes

I/O size (minimum/optimal): 4096 bytes / 4096 bytes
 
The same steps as the replacement of a failed disk, as described here, the only difference is the zpool replace command, you need to change that:

Code:
zpool attach rpool sda3 sdb3
yes that command will attach my second disk to pool and create mirror, but the partition it's not like the first we install proxmox with zfs, the partition divided into three part, bios boot, efi system and solaris. i want to create the same
 
Have you read the linked article from the official documentation? Therein are the commands to copy the partition scheme to the new disk, so exactly what you want.
yes i read it and didn't find to copy the partition scheme to the new disk
 
yes i read it and didn't find to copy the partition scheme to the new disk
Thats this part:
The first steps of copying the partition table, reissuing GUIDs and replacing the ZFS partition are the same. To make the system bootable from the new disk, different steps are needed which depend on the bootloader in use.
sgdisk <healthy bootable device> -R <new device>
sgdisk -G <new device>
With proxmox-boot-tool:
proxmox-boot-tool format <new disk's ESP>
proxmox-boot-tool init <new disk's ESP>
With plain grub:
grub-install <new disk>
 

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!