Hi all,
somewhat of a long time lurker here - happy with TrueNAS in general and never really had any issues with the system until now.
I’ve been running TrueNAS CORE v13.0-U6.1, did the upgrade/migration to SCALE v24.04.1 (using the update file) and later updated to SCALE v24.04.1.1 using the UI. Migration and updates went without any issues and the system has been running smoothly so far.
However, now a disk in one of my pools failed and I’m struggling with the replacement on SCALE. Replaced disks on CORE without issues before, though.
When attempting to replace the failed disk, I get the following error (doesn’t matter whether I use the ‘force’ flag or not if disk is empty):
Error: [EZFS_BADDEV] cannot replace 8525966784619120927 with /dev/disk/by-partuuid/127f08dc-c35c-4560-b8c0-aa5f13e5d33b: device is too small
I’ve been browsing the archived forums and stumbled upon the swap cache issue - however, setting the swap size for the pool to ‘0’ and attempting replacement again still yields the same error message (I set the swap back to 2GB afterwards - don’t want to fumble with the defaults unless I have to).
So I started digging through disk sizes and partitions and here is where I’m struggling to make sense of things.
This is the affected pool (has been created in an earlier version of CORE and all former disk replacements were done through the UI):
pool: Rusty
state: DEGRADED
status: One or more devices could not be used because the label is missing or
invalid. Sufficient replicas exist for the pool to continue
functioning in a degraded state.
action: Replace the device using 'zpool replace'.
see: https://openzfs.github.io/openzfs-docs/msg/ZFS-8000-4J
scan: scrub repaired 0B in 06:51:10 with 0 errors on Thu May 23 07:50:30 2024
config:
NAME STATE READ WRITE CKSUM
Rusty DEGRADED 0 0 0
raidz2-0 DEGRADED 0 0 0
sdn2 ONLINE 0 0 0
sdm2 ONLINE 0 0 0
sda2 ONLINE 0 0 0
sdc2 ONLINE 0 0 0
sdf2 ONLINE 0 0 0
sdg2 ONLINE 0 0 0
8525966784619120927 UNAVAIL 0 0 0 was /dev/sdj2
sde2 ONLINE 0 0 0
sdb2 ONLINE 0 0 0
sdd2 ONLINE 0 0 0
These are the corresponding disks and partitions (minues the broken one):
Disk /dev/sdn: 3.64 TiB, 4000787030016 bytes, 7814037168 sectors
Disk model: WDC WD40EFRX-68N
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: D2D4D3AC-31C0-11EC-9AA7-1831BFC83E68
Device Start End Sectors Size Type
/dev/sdn1 128 4194431 4194304 2G FreeBSD swap
/dev/sdn2 4194432 7814037127 7809842696 3.6T FreeBSD ZFS
Disk /dev/sdm: 3.64 TiB, 4000787030016 bytes, 7814037168 sectors
Disk model: WL4000GSA6454G
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: 42DB5D16-3FEA-11EB-9C96-1831BFC83E68
Device Start End Sectors Size Type
/dev/sdm1 128 4194431 4194304 2G FreeBSD swap
/dev/sdm2 4194432 7814037127 7809842696 3.6T FreeBSD ZFS
Disk /dev/sdc: 3.64 TiB, 4000787030016 bytes, 7814037168 sectors
Disk model: ST4000NM0053
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 9CB7AEA1-17A6-11EF-ADE0-1831BFC83E68
Device Start End Sectors Size Type
/dev/sdc1 128 4194431 4194304 2G FreeBSD swap
/dev/sdc2 4194432 7814037127 7809842696 3.6T FreeBSD ZFS
Disk /dev/sdf: 3.64 TiB, 4000787030016 bytes, 7814037168 sectors
Disk model: WDC WD40EFRX-68W
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: 43F6024C-3FEA-11EB-9C96-1831BFC83E68
Device Start End Sectors Size Type
/dev/sdf1 128 4194431 4194304 2G FreeBSD swap
/dev/sdf2 4194432 7814037127 7809842696 3.6T FreeBSD ZFS
Disk /dev/sdd: 3.64 TiB, 4000787030016 bytes, 7814037168 sectors
Disk model: WDC WD40EFRX-68W
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: 449365B8-3FEA-11EB-9C96-1831BFC83E68
Device Start End Sectors Size Type
/dev/sdd1 128 4194431 4194304 2G FreeBSD swap
/dev/sdd2 4194432 7814037127 7809842696 3.6T FreeBSD ZFS
Disk /dev/sdb: 3.64 TiB, 4000787030016 bytes, 7814037168 sectors
Disk model: WDC WD40EFRX-68W
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: 44455FDA-3FEA-11EB-9C96-1831BFC83E68
Device Start End Sectors Size Type
/dev/sdb1 128 4194431 4194304 2G FreeBSD swap
/dev/sdb2 4194432 7814037127 7809842696 3.6T FreeBSD ZFS
Disk /dev/sde: 3.64 TiB, 4000787030016 bytes, 7814037168 sectors
Disk model: WDC WD40EFRX-68W
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: 440DAE54-3FEA-11EB-9C96-1831BFC83E68
Device Start End Sectors Size Type
/dev/sde1 128 4194431 4194304 2G FreeBSD swap
/dev/sde2 4194432 7814037127 7809842696 3.6T FreeBSD ZFS
Disk /dev/sda: 3.64 TiB, 4000787030016 bytes, 7814037168 sectors
Disk model: WDC WD40EFRX-68W
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: 43DD9ACA-3FEA-11EB-9C96-1831BFC83E68
Device Start End Sectors Size Type
/dev/sda1 128 4194431 4194304 2G FreeBSD swap
/dev/sda2 4194432 7814037127 7809842696 3.6T FreeBSD ZFS
Disk /dev/sdg: 3.64 TiB, 4000787030016 bytes, 7814037168 sectors
Disk model: WDC WD40EFRX-68W
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: 44896AC8-3FEA-11EB-9C96-1831BFC83E68
Device Start End Sectors Size Type
/dev/sdg1 128 4194431 4194304 2G FreeBSD swap
/dev/sdg2 4194432 7814037127 7809842696 3.6T FreeBSD ZFS
And this is the disk I intend to use as replacement (when empty):
Disk /dev/sdk: 3.64 TiB, 4000787030016 bytes, 7814037168 sectors
Disk model: MB4000GFEMK
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
From what I can tell, size should not be an issue here, since bytes/sectors match disks already present in the pool?
Now, the strange thing is - after the replace fails in the UI, this is what I end up with on the replacement disk:
Disk /dev/sdk: 3.64 TiB, 4000787030016 bytes, 7814037168 sectors
Disk model: MB4000GFEMK
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: C11AFC81-0CBC-4AB4-90AB-30D6DB4241ED
Device Start End Sectors Size Type
/dev/sdk1 4096 435294208 435290113 207.6G Solaris /usr & Apple ZFS
Incidently, the partition size matches the one from my boot pool disks (however, swap partition is missing and partition type is off, so may just be coincidence):
Disk /dev/sdj: 223.57 GiB, 240057409536 bytes, 468862128 sectors
Disk model: ADATA SU630
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 388D3A21-0E7A-11EC-945F-1831BFC83E68
Device Start End Sectors Size Type
/dev/sdj1 40 1063 1024 512K BIOS boot
/dev/sdj2 33555496 468845607 435290112 207.6G FreeBSD ZFS
/dev/sdj3 1064 33555495 33554432 16G FreeBSD swap
Partition table entries are not in disk order.
Disk /dev/sdi: 223.57 GiB, 240057409536 bytes, 468862128 sectors
Disk model: ADATA SU630
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 38A3D7BB-0E7A-11EC-945F-1831BFC83E68
Device Start End Sectors Size Type
/dev/sdi1 40 1063 1024 512K BIOS boot
/dev/sdi2 33555496 468845607 435290112 207.6G FreeBSD ZFS
/dev/sdi3 1064 33555495 33554432 16G FreeBSD swap
To be sure this is not an issue with the disk hardware type, I’ve also tried using a disk identical to dev/sdc (ST4000NM0053) - with the same result.
I’m at a loss here, my best guess is that TrueNAS (for some reason) is looking at the boot-pool when doing the partitioning for the replacement disk and ends up with too small of a partition for my data pool.
I haven’t tried manual partitioning and replacement through the shell. I also haven’t tried the replace command on TrueNAS CLI since I was unable to find documentation for the exact parameters required.
Would some kind soul be able to point me in the right direction? Happy to provide further details of the system where required.
Many thanks!