Thursday, May 9, 2024
 Popular · Latest · Hot · Upcoming
0
rated 0 times [  0] [ 0]  / answers: 1 / hits: 1965  / 1 Year ago, thu, february 16, 2023, 8:05:47

My raidz is degraded after the change of my motherboard - a disk cannot be found. The missing disk used to be /dev/sdh but now it is named /dev/sdg - which is the cause of the problem.



In the degraded zpool I managed to offline the missing disk by using its uid (which I found using the zdb command). So now the degraded pool looks like this:



pool: Media
state: DEGRADED
status: One or more devices has been taken offline by the administrator.
Sufficient replicas exist for the pool to continue functioning in a
degraded state.
action: Online the device using 'zpool online' or replace the device with
'zpool replace'.
scrub: scrub completed after 2h10m with 0 errors on Thu May 1 14:02:43 2014
config:

NAME STATE READ WRITE CKSUM
Media DEGRADED 0 0 0
raidz1-0 ONLINE 0 0 0
disk/by-id/ata-WDC_WD2003FYYS-02W0B0_WD-WMAY00171958 ONLINE 0 0 0
disk/by-id/ata-WDC_WD2003FYYS-02W0B1_WD-WCAY00424060 ONLINE 0 0 0
disk/by-id/ata-WDC_WD2003FYYS-02W0B1_WD-WMAY04082675 ONLINE 0 0 0
raidz1-1 DEGRADED 0 0 0
sde ONLINE 0 0 0
sdf ONLINE 0 0 0
sdh OFFLINE 0 0 0


However, I do not succeed in replacing /dev/sdh by /dev/sdg:



zpool replace Media 3840188586753206212 /dev/disk/by-id/ata-WDC_WD20EZRX-00D8PB0_WD-WMC4M1843609 -f
invalid vdev specification
the following errors must be manually repaired:
/dev/disk/by-id/ata-WDC_WD20EZRX-00D8PB0_WD-WMC4M1843609 is part of active pool 'Media'


... how can I solve this problem?


More From » raid

 Answers
1

I solved it. Although not entirely sure how. At some point along the way (I think after exporting the pool and importing it again with a different name), the drives were not addressed by their traditional name "/dev/sd*" but by their ID. I did not do anything to force the ID addressing scheme - it just happened.



        NAME                                                      STATE     READ WRITE CKSUM
Media ONLINE 0 0 0
raidz1-0 ONLINE 0 0 0
disk/by-id/ata-WDC_WD2003FYYS-02W0B0_WD-WMAY00171958 ONLINE 0 0 0
disk/by-id/ata-WDC_WD2003FYYS-02W0B1_WD-WCAY00424060 ONLINE 0 0 0
disk/by-id/ata-WDC_WD2003FYYS-02W0B1_WD-WMAY04082675 ONLINE 0 0 0
raidz1-1 ONLINE 0 0 0
disk/by-id/ata-WDC_WD2003FYYS-02W0B1_WD-WCAY00788302 ONLINE 0 0 0
disk/by-id/ata-WDC_WD2003FYYS-02W0B1_WD-WCAY01088068 ONLINE 0 0 0
disk/by-id/ata-WDC_WD20EZRX-00D8PB0_WD-WMC4M1843609 OFFLINE 0 0 0


Whenever i then tried to replace the above mentioned faulty device with /dev/sdg, the computer returned a device /dev/sdg is busy error. It turned out that due to the change to ID addressing, the pool somewhat "healed" itself.



When i realized that the entry in the zpool was already pointing to the ID of the device /dev/sdg that I was trying to set, I just had to put the drive online with



zpool online Media /dev/disk/by-id/ata-WDC_WD20EZRX-00D8PB0_WD-WMC4M1843609 


and the pool started resilvering.



BTW.: I also tried a to wipe the data from the drive /dev/sdg to clear all labeling and make the drive forget that it is already part of an active pool. I do not think that it helped but maybe it had an effect that I am not aware of. The dd clearing is described in the above mentioned threads.



I hope this helps someone with a similar problem.
Thanks to everyone who took the time to read through my problem.


[#25468] Friday, February 17, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
lassrake

Total Points: 400
Total Questions: 103
Total Answers: 98

Location: Netherlands
Member since Mon, Jun 22, 2020
4 Years ago
;