One of the drives in my ZFS pool was degradaded and having too many errors, so I bought a brand new HDD to replace it.
I turned the node off, installed the new drive and ran `zpool replace pool-name old-drive new-drive`. Everything was fine and I went to do something else while it resilvered.
When I came back home, the new drive was showing REMOVED from the pool and in Proxmox VE's 'Disks' it had 'No' for GPT table. I tried running `gdisk` to rebuild the GPT and try replacing again and got this output:
Whenever I try to create a new GPT, it fails
If I try it through the 'Initialize disk with GPT' in the 'Disks' Menu, it also fails.
I started thinking I had a bad drive, but then I Plugged it via USB on my pc (Fedora 41) and the GPT was fine, the ZFS partitions were there. I then reset the GPT though Gparted and made a ext4 partition. It worked fine. I created some files, and it worked fine. I tried it in my laptop (Linux Mint) and it was recognized fine.
I tried plugging it though the same USB dongle in the proxmox node. Nothing, still couldn't recognize the GPT for the drive. I tried switching the SATA cables and ports on the motherboard, nothing.
I'm stumped. It looked fine when I first installed it and tried zpool replace, but after it failed only proxmox won't recognize the drive.
I turned the node off, installed the new drive and ran `zpool replace pool-name old-drive new-drive`. Everything was fine and I went to do something else while it resilvered.
When I came back home, the new drive was showing REMOVED from the pool and in Proxmox VE's 'Disks' it had 'No' for GPT table. I tried running `gdisk` to rebuild the GPT and try replacing again and got this output:
Code:
GPT fdisk (gdisk) version 1.0.9
Warning! Read error 5; strange behavior now likely!
Warning! Read error 5; strange behavior now likely!
Partition table scan:
MBR: not present
BSD: not present
APM: not present
GPT: not present
Creating new GPT entries in memory.
Whenever I try to create a new GPT, it fails
Code:
Command (? for help): x
Expert command (? for help): z
About to wipe out GPT on /dev/sdc. Proceed? (Y/N): y
Warning! GPT main header not overwritten! Error is 5
Warning: The kernel is still using the old partition table.
The new table will be used at the next reboot or after you
run partprobe(8) or kpartx(8)
GPT data structures destroyed! You may now partition the disk using fdisk or
other utilities.
If I try it through the 'Initialize disk with GPT' in the 'Disks' Menu, it also fails.
Code:
command '/sbin/sgdisk /dev/sdc -U R' failed: exit code 4
I started thinking I had a bad drive, but then I Plugged it via USB on my pc (Fedora 41) and the GPT was fine, the ZFS partitions were there. I then reset the GPT though Gparted and made a ext4 partition. It worked fine. I created some files, and it worked fine. I tried it in my laptop (Linux Mint) and it was recognized fine.
I tried plugging it though the same USB dongle in the proxmox node. Nothing, still couldn't recognize the GPT for the drive. I tried switching the SATA cables and ports on the motherboard, nothing.
I'm stumped. It looked fine when I first installed it and tried zpool replace, but after it failed only proxmox won't recognize the drive.