Drive too small as replacement when removed and formatted

Removed a drive from zvol of eight the same drives in RAIDZ2 to format it but when tried to pull it back I get error message saying:

[EFAULT] Could not create a partition of 6001175088640 bytes on disk sdf because the disk is too small. If you are replacing a disk in a pool, please ensure that the new disk is not smaller than the disk being replaced. Could not create partition 1 from 2048 to 11721047141 Could not change partition 1’s type code to BF01! Error encountered; not saving changes.

I am confused as this drive was there before. Anyone can help?

Do you mean a VDEV or ZVOL?

Take a look at your current drives, in the troubled pool, and see what they are reporting for partition layouts. If all the old drives report the same, post back data from the ‘new’ drive and an ‘old’ one. If they vary, post back all the drives. Use Preformatted Text mode. </> on the tool bar and then paste it back to keep the formatting for the command results.

lsblk -bo NAME,MODEL,ROTA,PTTYPE,TYPE,START,SIZE,PARTTYPENAME,PARTUUID

I’ve had similar trouble. Old partitioning schemes allowed the first data partition to be much closer to the beginning of the disk. For example, my old 10TB backup disk has this:

Device     Start        End    Sectors  Size Type
/dev/sdd1    256 2440560895 2440560640  9.1T Solaris /usr & Apple ZFS

However, everything more recent uses 2048 for the Start sector:

Device         Start       End   Sectors   Size Type
/dev/nvme0n1p1  2048 996022271 996020224 474.9G Solaris /usr & Apple ZFS

Thus, if you made the original partitions with older software, they may have a larger partition size than partitions made with newer software, when using the same sized disks.

It may be needed to use Shell command to:

  • Manually make the partition to match the older disks.
  • Then manually replace the missing disk using Shell commands.

To be clear, this may make the GUI and TrueNAS Middleware mildly confused. Meaning the GUI may still think the disk needs replacing. A reboot after the resilver is complete will likely solve that problem.

I wasn’t sure whether this would be considered a bug that should be reported or not. I was hoping to see the results of what was reported. I know the ‘swap’ partition was origanlly there with TrueNAS Core and then it disappeared with a later Scale version and then a buffer partition was brought back to allow for a drive being slightly smaller on replacement.

I was thinking TrueNAS should be able to handle these replacements when the pools were created when there were no ‘swap’ or buffer partitions and it is the same, exact drive sizes. It seems it should just mirror the partition scheme from the current drive if it fails when attempting to create it under the new style, with the buffer.

That was the intention of the feature request. Maybe it wasn’t fully implemented in that only the buffer is being created, but no other logic is be used during disk replacement.

If it wasn’t fully implemented, then the worst-case scenario is that a disk that is “too small” can still be prepared and added via the command-line with parted and zpool.