Mixed capacity but the same drives?

I have been using two older drives for my TrueNAS but recently I have noticed that it is giving an alert that the drives have a mixed capacity. This is somewhat strange since it are two of the same Western Digital RED 4TB drives. So I think one of the drives is probably failing.

On the dashboard there is however no indication that one the drives is failing. Maybe one of the drives already had this issue when I installed it, and I overlooked it?

The TrueNAS GUI does not give a clear indication what drive is faulty, the smart tests came back successful and the drive info does not give enough detail about the size or details about the smart data. So lets have a look at the CLI to check the drives.

You can use the web console, but I prefer to enable SSH access when I need to something like that. There are a few linux commands that can make clear what disk is the root cause. With fdisk or lsblk I will check the size of the disks and smartctl should make clear what drive is failing.

Lets run lsblk first to see what the size difference is, I will include the option to display the drive model for reference.

admin@truenas[~]$ lsblk -b -o +MODEL /dev/sda /dev/sdb
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS MODEL
sda 8:0 0 4000785948160 0 disk WDC WD40EFRX-68N32N0
├─sda1 8:1 0 2147484160 0 part
│ └─md127 9:127 0 2144337920 0 raid1
│ └─md127 253:0 0 2144337920 0 crypt [SWAP]
└─sda2 8:2 0 3998635524608 0 part
sdb 8:16 0 4000787030016 0 disk WDC WD40EFRX-68N32N0
├─sdb1 8:17 0 2147484160 0 part
│ └─md127 9:127 0 2144337920 0 raid1
│ └─md127 253:0 0 2144337920 0 crypt [SWAP]
└─sdb2 8:18 0 3998636573184 0 part

As you can see, there is difference in byte size between the two drives. A quick google did not reveal what the correct size should be, so lets check the smart data of the drives with smartctl

admin@truenas[~]$ sudo smartctl -a /dev/sda
smartctl 7.3 2022-02-28 r5338 [x86_64-linux-6.1.63-production+truenas]
Copyright (C) 2002-22, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family: Western Digital Red
Device Model: WDC WD40EFRX-68N32N0
Serial Number: WD-WCC7K3KZAX07
LU WWN Device Id: 5 0014ee 20ee71794
Firmware Version: 82.00A82
User Capacity: 4,000,785,948,160 bytes [4.00 TB]
Sector Sizes: 512 bytes logical, 4096 bytes physical
Rotation Rate: 5400 rpm
Form Factor: 3.5 inches
Device is: In smartctl database 7.3/5319
ATA Version is: ACS-3 T13/2161-D revision 5
SATA Version is: SATA 3.1, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is: Tue Apr 9 11:40:53 2024 CEST
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED

General SMART Values:
SMART Attributes Data Structure revision number: 16
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
1 Raw_Read_Error_Rate 0x002f 200 200 051 Pre-fail Always
3 Spin_Up_Time 0x0027 166 164 021 Pre-fail Always
4 Start_Stop_Count 0x0032 087 087 000 Old_age Always
5 Reallocated_Sector_Ct 0x0033 200 200 140 Pre-fail Always
7 Seek_Error_Rate 0x002e 200 200 000 Old_age Always
9 Power_On_Hours 0x0032 053 053 000 Old_age Always
10 Spin_Retry_Count 0x0032 100 100 000 Old_age Always
11 Calibration_Retry_Count 0x0032 100 100 000 Old_age Always
12 Power_Cycle_Count 0x0032 090 090 000 Old_age Always
192 Power-Off_Retract_Count 0x0032 200 200 000 Old_age Always
193 Load_Cycle_Count 0x0032 196 196 000 Old_age Always
194 Temperature_Celsius 0x0022 123 093 000 Old_age Always
196 Reallocated_Event_Count 0x0032 200 200 000 Old_age Always
197 Current_Pending_Sector 0x0032 200 200 000 Old_age Always
198 Offline_Uncorrectable 0x0030 200 200 000 Old_age Offline
199 UDMA_CRC_Error_Count 0x0032 200 200 000 Old_age Always
200 Multi_Zone_Error_Rate 0x0008 200 200 000 Old_age Offline

admin@truenas[~]$ sudo smartctl -a /dev/sdb
smartctl 7.3 2022-02-28 r5338 [x86_64-linux-6.1.63-production+truenas]
Copyright (C) 2002-22, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family: Western Digital Red
Device Model: WDC WD40EFRX-68N32N0
Serial Number: WD-WCC7K0EV1RNS
LU WWN Device Id: 5 0014ee 2643c85d3
Firmware Version: 82.00A82
User Capacity: 4,000,787,030,016 bytes [4.00 TB]
Sector Sizes: 512 bytes logical, 4096 bytes physical
Rotation Rate: 5400 rpm
Form Factor: 3.5 inches
Device is: In smartctl database 7.3/5319
ATA Version is: ACS-3 T13/2161-D revision 5
SATA Version is: SATA 3.1, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is: Tue Apr 9 11:40:57 2024 CEST
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED

General SMART Values:
SMART Attributes Data Structure revision number: 16
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED
1 Raw_Read_Error_Rate 0x002f 200 200 051 Pre-fail Always
3 Spin_Up_Time 0x0027 161 160 021 Pre-fail Always
4 Start_Stop_Count 0x0032 085 085 000 Old_age Always
5 Reallocated_Sector_Ct 0x0033 200 200 140 Pre-fail Always
7 Seek_Error_Rate 0x002e 200 200 000 Old_age Always
9 Power_On_Hours 0x0032 054 054 000 Old_age Always
10 Spin_Retry_Count 0x0032 100 100 000 Old_age Always
11 Calibration_Retry_Count 0x0032 100 100 000 Old_age Always
12 Power_Cycle_Count 0x0032 090 090 000 Old_age Always
192 Power-Off_Retract_Count 0x0032 200 200 000 Old_age Always
193 Load_Cycle_Count 0x0032 195 195 000 Old_age Always
194 Temperature_Celsius 0x0022 121 096 000 Old_age Always
196 Reallocated_Event_Count 0x0032 200 200 000 Old_age Always
197 Current_Pending_Sector 0x0032 200 200 000 Old_age Always
198 Offline_Uncorrectable 0x0030 200 200 000 Old_age Offline
199 UDMA_CRC_Error_Count 0x0032 200 200 000 Old_age Always
200 Multi_Zone_Error_Rate 0x0008 200 200 000 Old_age Offline

I have redacted the output a bit to make it fit and a bit more readable, but smartctl confirms that both drives are reporting a different user capacity. We can also be sure that both drives are in a pre-failed state and not suitable for production use anymore.

The data on those drives is not very important, but still I will plan to replaced these drives in the near future. Drives in this state can in my opinion still be used in a desktop for storing games or something like that, but I would avoid storing any important files on them.