HOWTO: Replace a ZFS Drive

Posted on the July 9th, 2007 under HOWTOs,Sys Admin,Technology / Computing by jglemza

The setup previously described was using 2 SATA drives and 1 IDE drive to complete my RAID-Z pool. However, I’ve just obtained a new SATA drive that I want to use to replace the IDE drive. This can be accomplished very easily. The current pool status is as follows:
root@ufuk:~# zpool status shet
  pool: shet
 state: ONLINE
 scrub: none requested
config:

        NAME        STATE     READ WRITE CKSUM
        shet        ONLINE       0     0     0
          raidz1    ONLINE       0     0     0
            c1d0    ONLINE       0     0     0
            c2d0    ONLINE       0     0     0
            c4d0    ONLINE       0     0     0

errors: No known data errors
I need to replace c1d0 with c2d1. This is accomplished with the following command:
root@ufuk:~# zpool replace shet c1d0 c2d1
After a couple hours of resilvering, the new drive is up and running.
root@ufuk:~# zpool status shet
  pool: shet
 state: ONLINE
 scrub: scrub completed with 0 errors on Mon Jul  9 00:50:40 2007
config:

        NAME        STATE     READ WRITE CKSUM
        shet        ONLINE       0     0     0
          raidz1    ONLINE       0     0     0
            c2d1    ONLINE       0     0     0
            c2d0    ONLINE       0     0     0
            c4d0    ONLINE       0     0     0

errors: No known data errors
Once again, ZFS proves itself to be incredibly simple.
Bookmark and Share

Leave a Reply




XHTML::
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>