ZFS bad hdd replacement

Hello!

On one my servers I have one completely died HDD, I'm even can't seen them in system, just this:
Code:
   pool: tank
  state: DEGRADED
 status: One or more devices could not be opened.  Sufficient replicas exist for
         the pool to continue functioning in a degraded state.
 action: Attach the missing device and online it using 'zpool online'.
    see: http://www.sun.com/msg/ZFS-8000-2Q
  scrub: none requested
 config:

         NAME        STATE     READ WRITE CKSUM
         tank        DEGRADED     0     0     0
           mirror    DEGRADED     0     0     0
             ad4p3   UNAVAIL      0     0     0  cannot open
             ad6p3   ONLINE       0     0     0

 errors: No known data errors

 atacontrol list
 ATA channel 2:
     Master:      no device present
     Slave:       no device present
 ATA channel 3:
     Master:  ad6 <ST3000DM001-9YN166/CC4C> SATA revision 2.x
     Slave:       no device present

And I just detach bad drive, and after reboot I add new drive to pool. Here it is:

Code:
  pool: tank
 state: ONLINE
 scrub: none requested
config:

        NAME        STATE     READ WRITE CKSUM
        tank        ONLINE       0     0     0
          ad6p3     ONLINE       0     0     0
          ad4       ONLINE       0     0     0

errors: No known data errors

But I think that this is does not right...can you tell me what is the right way? Thanx!
 
You were using zpool add instead of zpool attach. In order to fix it, you will have to backup all the data and recreate the pool. :(

I'd recommend using gpt labels in the future and partitions with a proper alignment for your 4K disks (keywords: gpart add -b 2048 ..., gnop, ashift=12).
 
Back
Top