Hi all,
I'm seeking advice on how to safely replace a disk that's currently part of a ZFS array. In particular, I don't recall exactly how I installed things in the first place (it was a while ago), so help reconstructing necessary gpart and zfs steps would be greatly appreciated.
As I understand it, the fix will involve:
I'm running 10.3:
Regarding the disk, ada0 is the target for replacement because SMART info looks less than good:
My ZFS setup is as follows:
Each of the four disks (ada[0-3]) is partitioned as follows:
More specifically:
Please let me know if I can provide any additional information, and thanks in advance!
I'm seeking advice on how to safely replace a disk that's currently part of a ZFS array. In particular, I don't recall exactly how I installed things in the first place (it was a while ago), so help reconstructing necessary gpart and zfs steps would be greatly appreciated.
As I understand it, the fix will involve:
- Backups (done)
- Removing the bad disk from the ZFS array.
- Identifying the physical disk to replace.
- Replacing the bad old disk with a new disk.
- Partitioning the new disk to match the partition scheme of the old disk.
- Adding the new, partitioned disk to the ZFS pool
- Rebuilding the array.
I'm running 10.3:
Code:
$ uname -a
FreeBSD thinkbsd.######.home 10.3-RELEASE FreeBSD 10.3-RELEASE #0 r297264: Fri Mar 25 02:10:02 UTC 2016 root@releng1.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64
Regarding the disk, ada0 is the target for replacement because SMART info looks less than good:
Code:
=== START OF INFORMATION SECTION ===
Model Family: Western Digital Red
Device Model: WDC WD20EFRX-68EUZN0
Serial Number: WD-WCC4M7DJNX7X
LU WWN Device Id: 5 0014ee 20c26406b
Firmware Version: 82.00A82
User Capacity: 2,000,398,934,016 bytes [2.00 TB]
Sector Sizes: 512 bytes logical, 4096 bytes physical
Rotation Rate: 5400 rpm
Device is: In smartctl database [for details use: -P show]
ATA Version is: ACS-2 (minor revision not indicated)
SATA Version is: SATA 3.0, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is: Thu Feb 8 20:59:30 2018 CST
SMART support is: Available - device has SMART capability.
SMART support is: Enabled
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 - 484
3 Spin_Up_Time 0x0027 178 172 021 Pre-fail Always - 4066
4 Start_Stop_Count 0x0032 100 100 000 Old_age Always - 32
5 Reallocated_Sector_Ct 0x0033 185 185 140 Pre-fail Always - 451
7 Seek_Error_Rate 0x002e 200 195 000 Old_age Always - 322
9 Power_On_Hours 0x0032 076 076 000 Old_age Always - 17532
10 Spin_Retry_Count 0x0032 100 253 000 Old_age Always - 0
11 Calibration_Retry_Count 0x0032 100 253 000 Old_age Always - 0
12 Power_Cycle_Count 0x0032 100 100 000 Old_age Always - 32
192 Power-Off_Retract_Count 0x0032 200 200 000 Old_age Always - 15
193 Load_Cycle_Count 0x0032 200 200 000 Old_age Always - 707
194 Temperature_Celsius 0x0022 120 111 000 Old_age Always - 27
196 Reallocated_Event_Count 0x0032 156 156 000 Old_age Always - 44
197 Current_Pending_Sector 0x0032 001 001 000 Old_age Always - 65471
198 Offline_Uncorrectable 0x0030 100 253 000 Old_age Offline - 0
199 UDMA_CRC_Error_Count 0x0032 200 200 000 Old_age Always - 0
200 Multi_Zone_Error_Rate 0x0008 100 253 000 Old_age Offline - 0
My ZFS setup is as follows:
Code:
$ zpool status
pool: system
state: ONLINE
scan: scrub canceled on Mon Feb 5 01:00:55 2018
config:
NAME STATE READ WRITE CKSUM
system ONLINE 0 0 0
mirror-0 ONLINE 0 0 0
gpt/system0 ONLINE 0 0 0
gpt/system1 ONLINE 0 0 0
mirror-1 ONLINE 0 0 0
gpt/system2 ONLINE 0 0 0
gpt/system3 ONLINE 0 0 0
Each of the four disks (ada[0-3]) is partitioned as follows:
Code:
$ sudo gpart show ada0
Password:
=> 34 3907029101 ada0 GPT (1.8T)
34 6 - free - (3.0K)
40 1024 1 freebsd-boot (512K)
1064 4194304 2 freebsd-swap (2.0G)
4195368 3902833760 3 freebsd-zfs (1.8T)
3907029128 7 - free - (3.5K)
More specifically:
Code:
$ sudo diskinfo -v /dev/gpt/boot0
/dev/gpt/boot0
512 # sectorsize
524288 # mediasize in bytes (512K)
1024 # mediasize in sectors
4096 # stripesize
0 # stripeoffset
1 # Cylinders according to firmware.
16 # Heads according to firmware.
63 # Sectors according to firmware.
WD-WCC4M7DJNX7Xs0 # Disk ident.
$ sudo diskinfo -v /dev/gpt/swap0
/dev/gpt/swap0
512 # sectorsize
2147483648 # mediasize in bytes (2.0G)
4194304 # mediasize in sectors
4096 # stripesize
0 # stripeoffset
4161 # Cylinders according to firmware.
16 # Heads according to firmware.
63 # Sectors according to firmware.
WD-WCC4M7DJNX7Xs0 # Disk ident.
$ sudo diskinfo -v /dev/gpt/system0
/dev/gpt/system0
512 # sectorsize
1998250885120 # mediasize in bytes (1.8T)
3902833760 # mediasize in sectors
4096 # stripesize
0 # stripeoffset
3871858 # Cylinders according to firmware.
16 # Heads according to firmware.
63 # Sectors according to firmware.
WD-WCC4M7DJNX7Xs0 # Disk ident.
Please let me know if I can provide any additional information, and thanks in advance!