Chris Williams
2007-Nov-02 18:20 UTC
[zfs-discuss] What is the correct way to replace a good disk?
I have a 9-bay JBOD configured as a raidz2. One of the disks, which is on-line and fine, needs to be swapped out and replaced. I have been looking though the zfs admin guide and am confused on how I should go about swapping out. I though I could put the disk off-line, remove it, put a new disk in, and put on-line. Does this sound right? Any help would be great Thanks Chris This message posted from opensolaris.org
Cindy.Swearingen at Sun.COM
2007-Nov-02 18:49 UTC
[zfs-discuss] What is the correct way to replace a good disk?
Chris, You need to use the zpool replace command. I recently enhanced this section of the admin guide with more explicit instructions on page 68, here: http://opensolaris.org/os/community/zfs/docs/zfsadmin.pdf If these are hot-swappable disks, for example, c0t1d0, then use this syntax: # zpool replace pool-name c0t1d0 ZFS recognizes that this is a replacement disk in the same location. You don''t need to offline the disk to be replaced unless it is failing and making the pool unhappy. Chris Williams wrote:> I have a 9-bay JBOD configured as a raidz2. One of the disks, which is on-line and fine, needs to be swapped out and replaced. I have been looking though the zfs admin guide and am confused on how I should go about swapping out. I though I could put the disk off-line, remove it, put a new disk in, and put on-line. Does this sound right? > > Any help would be great > Thanks > Chris > > > This message posted from opensolaris.org > _______________________________________________ > zfs-discuss mailing list > zfs-discuss at opensolaris.org > http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
Bill Sommerfeld
2007-Nov-02 19:26 UTC
[zfs-discuss] What is the correct way to replace a good disk?
On Fri, 2007-11-02 at 11:20 -0700, Chris Williams wrote:> I have a 9-bay JBOD configured as a raidz2. One of the disks, which > is on-line and fine, needs to be swapped out and replaced. I have > been looking though the zfs admin guide and am confused on how I > should go about swapping out. I though I could put the disk off-line, > remove it, put a new disk in, and put on-line. Does this sound > right?That sounds right. You''ll have improved availability if you have a spare disk slot and can do "zpool replace $pool $old $new", but offline followed by a reconstruct-in-place via "zpool replace $pool $disk" also works. - Bill