I had only one hard drive (/dev/sda) when I installed Proxmox 5.0 and I chose ZFS for storage.
Now I've bought and added another identical drive (/dev/sdb) and want to turn rpool into a mirror and make both drives bootable so the machine can survive a drive failure.
Here's how /dev/sda looks now:
I would like some help with the steps to be taken in order to achieve this. What I'm thinking of is this:
1. Initialize /dev/sdb with a gpt partition table and create partitions identical to what's on /dev/sda now.
2. Add /dev/sdb2 to rpool as a mirror of /dev/sda2
Can/should I use UUID instead of /dev/sdb2, to make it resistant to drives being initialized in a different order, or cable swaps?
3. Fix boot loader. I need help with this. I'd like it to be able to boot in case either drive dies.
4. What do I need to do about the third partition? I see it's only 8 MB big. What is it used for?
Now I've bought and added another identical drive (/dev/sdb) and want to turn rpool into a mirror and make both drives bootable so the machine can survive a drive failure.
Here's how /dev/sda looks now:
Code:
root@pve:/dev# gdisk /dev/sda
GPT fdisk (gdisk) version 1.0.1
Partition table scan:
MBR: protective
BSD: not present
APM: not present
GPT: present
Found valid GPT with protective MBR; using GPT.
Command (? for help): p
Disk /dev/sda: 1465149168 sectors, 698.6 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 2FF979EB-653C-48FB-92B3-51898EBE979C
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 1465149134
Partitions will be aligned on 8-sector boundaries
Total free space is 0 sectors (0 bytes)
Number Start (sector) End (sector) Size Code Name
1 34 2047 1007.0 KiB EF02
2 2048 1465132749 698.6 GiB BF01 zfs
9 1465132750 1465149134 8.0 MiB BF07
I would like some help with the steps to be taken in order to achieve this. What I'm thinking of is this:
1. Initialize /dev/sdb with a gpt partition table and create partitions identical to what's on /dev/sda now.
Code:
sgdisk /dev/sda -R /dev/sdb
sgdisk -G /dev/sdb
2. Add /dev/sdb2 to rpool as a mirror of /dev/sda2
Code:
zpool attach rpool /dev/sda2 /dev/sdb2
3. Fix boot loader. I need help with this. I'd like it to be able to boot in case either drive dies.
4. What do I need to do about the third partition? I see it's only 8 MB big. What is it used for?