1

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?

Martur
  • 223

2 Answers2

0

issue the command

sudo blkid

you may find that you are attempting to repair raidz 1-1 with a member of or spare reserved for raidz 1-0. rgardless you should probably insure that you assemble your raid arrays in future by id rather than /dev/sdx

In response to the comment about disregarding membership. This is a dangerous course of action. Insure your backups are current and accessible. This is not my strongest suit but I did find:

This has been apparently asked and answered here Replacing a dead disk in a zpool

I also found information here which may or may not be relevent:

http://docs.oracle.com/cd/E19253-01/819-5461/gaypw/index.html

To remove a member of a zpool

zpool remove pool vdev

source:http://manpages.ubuntu.com/manpages/lucid/man1/zpool.1M.html

Elder Geek
  • 36,752
0

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.

Martur
  • 223