Hi,
I encountered the same issue, I had a boot drive failure and tried to replace the disk.
1. Removed the faulty disk
2. Replaced with an identical one. Same size/type/vendor etc.
3. Quick wiped the new disk from disk menu
4. Navigated the boot pool status and I chose the replace disk option. Picked the new disk.
Error:
Code:
Error: [EFAULT] sgdisk -n4:0:+16777216K -t4:8200 /dev/sdi failed: Could not create partition 4 from 34 to 33554465 Could not change partition 4's type code to 8200! Error encountered; not saving changes.
So far what I tried:
Info after fresh wipe:
Code:
root@gs-truenas[~]# sgdisk -p /dev/disk/by-id/ata-ADATA_SU650_4M0223CFABF9
Warning: Partition table header claims that the size of partition table
entries is 0 bytes, but this program supports only 128-byte entries.
Adjusting accordingly, but partition table may be garbage.
Warning: Partition table header claims that the size of partition table
entries is 0 bytes, but this program supports only 128-byte entries.
Adjusting accordingly, but partition table may be garbage.
Creating new GPT entries in memory.
Disk /dev/disk/by-id/ata-ADATA_SU650_4M0223CFABF9: 234441648 sectors, 111.8 GiB
Sector size (logical/physical): 512/512 bytes
Disk identifier (GUID): FF8D3C28-9C77-47E8-B46D-F6C9C2D995D5
Partition table holds up to 128 entries
Main partition table begins at sector 2 and ends at sector 33
First usable sector is 34, last usable sector is 234441614
Partitions will be aligned on 2048-sector boundaries
Total free space is 234441581 sectors (111.8 GiB)
Number Start (sector) End (sector) Size Code Name
After the error:
Code:
root@gs-truenas[~]# sgdisk -p /dev/disk/by-id/ata-ADATA_SU650_4M0223CFABF9
Disk /dev/disk/by-id/ata-ADATA_SU650_4M0223CFABF9: 234441648 sectors, 111.8 GiB
Sector size (logical/physical): 512/512 bytes
Disk identifier (GUID): 2510F735-0C8D-4E00-B8BA-3DACD0035AB8
Partition table holds up to 128 entries
Main partition table begins at sector 2 and ends at sector 33
First usable sector is 34, last usable sector is 234441614
Partitions will be aligned on 8-sector boundaries
Total free space is 6 sectors (3.0 KiB)
Number Start (sector) End (sector) Size Code Name
1 40 2087 1024.0 KiB EF02
2 2088 1050663 512.0 MiB EF00
3 1050664 234441614 111.3 GiB BF01
root@gs-truenas[~]#
I did a quick wipe again and tried to execute the same command in shell what gives the error:
Code:
root@gs-truenas[~]# sgdisk -n4:0:+16777216K -t4:8200 /dev/sdi
Warning: Partition table header claims that the size of partition table
entries is 0 bytes, but this program supports only 128-byte entries.
Adjusting accordingly, but partition table may be garbage.
Warning: Partition table header claims that the size of partition table
entries is 0 bytes, but this program supports only 128-byte entries.
Adjusting accordingly, but partition table may be garbage.
Creating new GPT entries in memory.
The operation has completed successfully.
root@gs-truenas[~]#
Code:
root@gs-truenas[~]# sgdisk -p /dev/disk/by-id/ata-ADATA_SU650_4M0223CFABF9
Disk /dev/disk/by-id/ata-ADATA_SU650_4M0223CFABF9: 234441648 sectors, 111.8 GiB
Sector size (logical/physical): 512/512 bytes
Disk identifier (GUID): 04EF577B-CD62-481A-9B74-8CC9D681B20B
Partition table holds up to 128 entries
Main partition table begins at sector 2 and ends at sector 33
First usable sector is 34, last usable sector is 234441614
Partitions will be aligned on 2048-sector boundaries
Total free space is 200887149 sectors (95.8 GiB)
Number Start (sector) End (sector) Size Code Name
4 2048 33556479 16.0 GiB 8200
root@gs-truenas[~]#
After this, when I try to replace the disk same error happened same partition table created by the function, etc.
Any help appreciated
Version:
TrueNAS-SCALE-22.12.0