4 Replies Latest reply: Mar 29, 2013 11:02 AM by 988801 RSS

    Raidz help

    988801
      Hi Guys,

      if you create a raidz and you want to give back a disk to storage how would you do it ?

      For example if you create a raidz pool called tank as follows

      zpool create tank raidz c1t0d0 c1t1d0 c1t2d0 c1t3d0 c1t4d0

      Then you said oh, I want to take back c1t4d0 from that pool, how will you do it?

      Thank you very much for your help.
        • 1. Re: Raidz help
          Bjoern Rost
          Unfortunately, you cannot shrink a zpool like that. You could replace the disk with another one (zpool replace) or you could take it offline (zpool offline) but you cannot remove a disk from a zpool.

          cheers
          bjoern
          • 2. Re: Raidz help
            Reidod
            Hi,

            You cannot use "zpool detach" on disk devices. it can be used only on cache,log,spare devices.

            you can destroy/create the pool

            zpool destroy tank
            zpool create tank raidz c1t0d0 c1t1d0 c1t2d0 c1t3d0

            Regards,
            Rei
            • 3. Re: Raidz help
              Cindys-Oracle
              Almost. You can use zpool detach on a mirrored pool. I have a 3-way mirrored root pool, like this:

              # zpool status
              pool: rpool
              state: ONLINE
              scan: resilvered 7.75G in 0h7m with 0 errors on Wed Mar 27 11:43:04 2013
              config:

              NAME STATE READ WRITE CKSUM
              rpool ONLINE 0 0 0
              mirror-0 ONLINE 0 0 0
              c1t2d0s0 ONLINE 0 0 0
              c1t0d0s0 ONLINE 0 0 0
              c1t1d0s0 ONLINE 0 0 0

              errors: No known data errors

              I can detach any of the devices in this pool:

              # zpool detach rpool c1t1d0s0
              # zpool status rpool
              pool: rpool
              state: ONLINE
              scan: resilvered 7.75G in 0h7m with 0 errors on Wed Mar 27 11:43:04 2013
              config:

              NAME STATE READ WRITE CKSUM
              rpool ONLINE 0 0 0
              mirror-0 ONLINE 0 0 0
              c1t2d0s0 ONLINE 0 0 0
              c1t0d0s0 ONLINE 0 0 0

              errors: No known data errors

              We are working on pool device removal, but in the meantime, mirrored pools are a bit more flexible in that you can offline/online, replace, attach and detach pool devices, or add another mirrored pair.

              With RAIDZ pools, you can offline/online, replace, and add a new RAIDZ vdev, but you can't attach or detach devices.

              These operations will also depend on existing redundancy to support the operation.

              Another workaround until device removal is available is to create smallish LUNs rather than large LUNs and then use the pools' autoexpand property to expand the pool size when the underlying LUN is expanded. This should help you manage pool space/LUN allocation.

              Thanks, Cindy
              • 4. Re: Raidz help
                988801
                Very helpful Cindy. Very very helpful.


                Thank you very much to everyone who posted a reply to my question.