Fixing zpool disk references

danwestness

Dabbler
Joined
Apr 2, 2022
Messages
22
I have a zpool 'data' which has 4 disks.
Once upon a time one of them failed and I had never performed a disk replacement in ZFS, so I followed a guide which seemed to get me sorted out, however the guide i followed had me reference the replacement disk as /dev/sdd1 rather than by it's by-partuuid reference. So far it hasn't caused any functional issues, however now I am seeing some oddities I would like to get corrected. I'll try to go over it.

So, while everything functionally seems to be working ok as far as i can tell, the truenas UI is not registering any proper details around the pool and this disk now. See below for full details of what i mean.
I would ideally like to maintain the standard and update the member disk to utilize the proper by-partuuid pathing, but i have been trying every zpool command i can find by my google-fu to only come up with syntax errors, other blockers, cannot replace the disk, cannot detach the disk, cannot edit the member disk, etc... Not sure how to proceed.

In the console it is showing the disks as mixed capacity (They are all the exact same model drives)

1670306903797.png


Drilling in, I see the disk in question here referenced only by an ID number and no capacity listed
1670307001902.png


I see the disk in question here with the size, but does not show associated with any pool

1670307045359.png



This output appears to have all 4 disks listed in the pool however
root@truenas[~]# lsblk -f
NAME FSTYPE FSVER LABEL UUID FSAVAIL FSUSE% MOUNTPOINT
sdc
├─sdc1 zfs_member 5000 data 3192523321980519764
└─sdc9
sdd
├─sdd1 zfs_member 5000 data 3192523321980519764
└─sdd9
sdj
├─sdj1 zfs_member 5000 data 3192523321980519764
└─sdj9
sdk
├─sdk1 zfs_member 5000 data 3192523321980519764
└─sdk9

The Zpool status looks online and healthy:
root@truenas[~]# zpool status data
pool: data
state: ONLINE
scan: scrub repaired 0B in 1 days 04:52:01 with 0 errors on Mon Dec 5 04:52:03 2022
config:

NAME STATE READ WRITE CKSUM
data ONLINE 0 0 0
raidz1-0 ONLINE 0 0 0
sdd ONLINE 0 0 0
b7683a54-6aff-8b45-b68b-0e7fd4361d93 ONLINE 0 0 0
d8390cb5-0673-3742-a323-f8bd762ea8ec ONLINE 0 0 0
13178070-5ded-1a42-ab01-950485d986be ONLINE 0 0 0

root@truenas[~]# zpool status data -g
pool: data
state: ONLINE
scan: scrub repaired 0B in 1 days 04:52:01 with 0 errors on Mon Dec 5 04:52:03 2022
config:

NAME STATE READ WRITE CKSUM
data ONLINE 0 0 0
4488713238285342249 ONLINE 0 0 0
9312597968460590352 ONLINE 0 0 0
7490459599045556247 ONLINE 0 0 0
12983264771322495057 ONLINE 0 0 0
10119584468936359130 ONLINE 0 0 0
 

Attachments

  • 1670306942397.png
    1670306942397.png
    26.4 KB · Views: 94

danwestness

Dabbler
Joined
Apr 2, 2022
Messages
22
I may have made it worse perhaps.
I found that if i took the disk offline then it let me at least attempt to replace it with the proper uuid, but now i receive this error:
1670307940496.png



Checking the disks and they are all the same size so i'm not sure what would be the cause for this error:
Disk /dev/sdd: 5.46 TiB, 6001175126016 bytes, 11721045168 sectors
Disk /dev/sdk: 5.46 TiB, 6001175126016 bytes, 11721045168 sectors
Disk /dev/sdj: 5.46 TiB, 6001175126016 bytes, 11721045168 sectors
Disk /dev/sdc: 5.46 TiB, 6001175126016 bytes, 11721045168 sectors
 
Last edited:

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
I suspect you have a problem having not used a swap partition on the other disks somehow, so you need to set that off before adding the disk...
 

danwestness

Dabbler
Joined
Apr 2, 2022
Messages
22
@sretalla Thanks so much. After looking at the partitions on the disk after the attempt to add it to the pool I did see it was creating a 2GB swap partition on the drive.

Once i ran the command reference in the linked post to disable swap creation I was able to replace the disk:
midclt call system.advanced.update '{"swapondrive": 0}'
 
Top