Have a failed drive on a ZFS pool (three RAIDZ2 vdevs, one hot spare). The hot spare kicked in and all is well. Is it possible to just make that hot spare disk -- already silvered into the pool -- as a permanent part of the pool? We could then throw in a new disk and mark it as a spare and avoid what would seem to be an unnecessary resilver (twice, once when the spare is brought in and again when we replace the failed disk). This document[1] seems to make it sound like it can be done, but I''m not really seeing how... Can I "add" the spare disk to the pool when it''s already in use? Probably not... Note this is on Solaris 10 U9. Thanks, Ray [1] http://dlc.sun.com/osol/docs/content/ZFSADMIN/gayrd.html#gcvcw
Just detach the faulty disk, then the spare will become the "normal" disk once it''s finished resilvering. #zfs detach <pool> <fault_device_name> Then you need to the new spare : #zfs add <pool> <new_spare_device> There seems to be a new feature in illumos project to support a zpool property like "spare promotion", which would not require the manual "detach" operation. Tianhong -----Original Message----- From: zfs-discuss-bounces at opensolaris.org [mailto:zfs-discuss-bounces at opensolaris.org] On Behalf Of Ray Van Dolson Sent: Thursday, May 05, 2011 5:53 PM To: zfs-discuss at opensolaris.org Subject: [zfs-discuss] Permanently using hot spare? Have a failed drive on a ZFS pool (three RAIDZ2 vdevs, one hot spare). The hot spare kicked in and all is well. Is it possible to just make that hot spare disk -- already silvered into the pool -- as a permanent part of the pool? We could then throw in a new disk and mark it as a spare and avoid what would seem to be an unnecessary resilver (twice, once when the spare is brought in and again when we replace the failed disk). This document[1] seems to make it sound like it can be done, but I''m not really seeing how... Can I "add" the spare disk to the pool when it''s already in use? Probably not... Note this is on Solaris 10 U9. Thanks, Ray [1] http://dlc.sun.com/osol/docs/content/ZFSADMIN/gayrd.html#gcvcw _______________________________________________ zfs-discuss mailing list zfs-discuss at opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
On 05/ 6/11 09:53 AM, Ray Van Dolson wrote:> Have a failed drive on a ZFS pool (three RAIDZ2 vdevs, one hot spare). > The hot spare kicked in and all is well. > > Is it possible to just make that hot spare disk -- already silvered > into the pool -- as a permanent part of the pool? We could then throw > in a new disk and mark it as a spare and avoid what would seem to be an > unnecessary resilver (twice, once when the spare is brought in and > again when we replace the failed disk). >Yes, as Tianhong just posted, just detach the faulted device. What you describe is what I normally do, add the original drive back as a spare when it is replaced. -- Ian.
On Thu, May 05, 2011 at 03:13:06PM -0700, TianHong Zhao wrote:> Just detach the faulty disk, then the spare will become the "normal" > disk once it''s finished resilvering. > > #zfs detach <pool> <fault_device_name> > > Then you need to the new spare : > #zfs add <pool> <new_spare_device> > > There seems to be a new feature in illumos project to support a zpool > property like "spare promotion", > which would not require the manual "detach" operation. > > TianhongThanks! Great tip. Ray