Replacing a defective disc in a ZFS pool

    • OMV 4.x

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • Replacing a defective disc in a ZFS pool

      First and foremost, all of my discs are fine :)

      However, I was curious as to what the procedure is to replace a faulty disc. Do I simply remove the disc, replace with a fresh one? (Assuming there is no procedure to follow before removing the defective disc) How do I go about transferring the data onto the new disc?

      Also when acquiring a new disc, do only the capacity and rpm have to match what is in the current pool? The pool is a raidz2 if that helps. Thanks! :)
      Case: U-NAS NSC-810
      Motherboard: ASRock - C236 WSI Mini ITX
      CPU: Core i7-6700
      Memory: 32GB Crucial DDR4-2133
    • elastic wrote:

      How do I go about transferring the data onto the new disc?
      As soon as you online the new disk a resilver will start automatically in the background. Below the 'usual procedure' I had to do every other week the last months when disks got kicked out of a RAIDz3 array:

      Source Code

      1. zpool offline riesenpool ata-ST6000NM0115-1YZ110_ZAD299HG
      2. zpool clear riesenpool ata-ST6000NM0115-1YZ110_ZAD299HG
      3. zpool online riesenpool ata-ST6000NM0115-1YZ110_ZAD299HG
      (when I created the array I chose to reference all disks from /dev/disk/by-id/ so their serial number is part of the device name which makes identifying them easier). Your most important tool is zpool status since this will list your pools health/status and in case problems occur also where to look for a procedure online.

      In case the disk is neither FAULTED nor UNAVAILbut already OFFLINE you only need to execute the last command above. Again zpool status will inform you about the resilver progress but when you set up notifications (highly recommended) you get an email at the end anyway reporting how long it took (resilvered 33.6G in 1h11m with 0 errors on Thu Feb 14 18:09:54 2019 or something like this).

      elastic wrote:

      when acquiring a new disc, do only the capacity and rpm have to match what is in the current pool?
      RPM are totally irrelevant since drives implement parallelisms and one with the same RPM but more platters can access more data in the same amount of time. Wrt capacity you need a disk of same size or larger. Since you're using RAIDz the only way to increase your array's capacity is to replace all disks with ones with higher capacity so once your first disk fails I would then decide on which capacity you will set from then on.

      If you're running now with 3TB disks for example and your first disk fails in 2 years most probably +6TB disks will then have an optimal price/capacity ratio. So if you decide to go with 6TB then after replacing all your 3TB disks with 6TB ones your pool's capacity will be doubled.