[HN Gopher] Migrating a ZFS Pool from RAIDZ1 to RAIDZ2
       ___________________________________________________________________
        
       Migrating a ZFS Pool from RAIDZ1 to RAIDZ2
        
       Author : mtlynch
       Score  : 17 points
       Date   : 2025-07-23 14:33 UTC (8 hours ago)
        
 (HTM) web link (mtlynch.io)
 (TXT) w3m dump (mtlynch.io)
        
       | mtlynch wrote:
       | Author here. Happy to take any questions or feedback about this
       | post.
        
       | xmodem wrote:
       | > The neat part is that I did it with only three additional 8 TB
       | disks and never transferred my data to external storage.
       | 
       | That's neat! I didn't know there was a way to do this while
       | maintaining data redundancy.
       | 
       | > Step 1: Borrow one disk to create a RAIDZ2 pool
       | 
       | > To begin, I remove one disk from my original RAIDZ1 pool,
       | leaving it in a degraded state.
       | 
       | Oh, there isn't. :facepalm:
        
         | mtlynch wrote:
         | What's the issue?
         | 
         | I have backups, so I was prepared for data loss if the pool
         | failed.
         | 
         | Is this any riskier than recovering from a single disk failure
         | on a RAIDZ1 pool?
        
           | SirMaster wrote:
           | Then why go through all this trouble at all?
           | 
           | 1. Build new RAIDZ2 pool with all your disks that you plan to
           | use. 2. Restore backup to the new pool.
           | 
           | I keep a backup too and so this is how I move to a new larger
           | ZPOOL with a new layout.
           | 
           | Either you have to do this because you don't have a backup,
           | and so this is risky. Or you don't need to do this because
           | you have a backup and can just build your new pool and
           | restore your data from the backup.
        
             | mtlynch wrote:
             | I address this in the post: https://mtlynch.io/raidz1-to-
             | raidz2/#step-2-backing-up-my-da...
        
           | xmodem wrote:
           | No issue. Just that the introduction to your post got me
           | excited that I was going to learn how to do something I
           | didn't previously think was possible.
        
       | SirMaster wrote:
       | Just buy 1 extra disk and use that, and then keep it as a spare
       | for your next failure IMO.
        
         | mtlynch wrote:
         | Why is that better? Don't you end up in the same state as my
         | solution except you bought an extraneous 18 TB disk?
        
           | SirMaster wrote:
           | It would be better because then you wouldn't have to degrade
           | your RAIDZ1 and run with 0 redundancy that could fail at any
           | moment.
        
             | mtlynch wrote:
             | The extra drive would also have zero redundancy. I know
             | it's risk of 1 drive failing vs. any of 3 drives failing,
             | but disk failures follow a bathtub curb, so I'm more
             | worried about a brand new drive failing than 3 healthy
             | drives that have been running successfully for months.
             | 
             | With your extra drive solution, I still have to recreate
             | all my datasets and shares, whereas in my solution, they
             | migrated intact, and I still had backups in case of pool
             | failure. I could zfs send into a giant file on the 18 TB
             | drive, but I'd be reticent to do that because it's just an
             | opaque file that I can't verify will successfully restore.
             | Whereas with my solution, I had the two pools running side
             | by side and could verify everything restored successfully
             | onto the new pool before blowing away the old pool.
        
               | SirMaster wrote:
               | You seem to be fundamentally misunderstanding me I guess
               | because nothing you are writing here makes sense for what
               | I am proposing.
               | 
               | Why did you pull a drive from your RAIDZ1 to purposefully
               | degrade it?
               | 
               | I am not sure why you keep saying 18TB. Your drives are
               | 8TB. I am suggesting that you should have simply bought
               | another 8TB disk so you wouldn't have to degrade your
               | RAIDZ1.
        
               | mtlynch wrote:
               | Oh, I see. I thought you meant I should buy an 18 TB
               | drive, move my data there, blow up my pool, create a
               | RAIDZ2 pool, then move my data back.
               | 
               | Yes, I agree I could have reduced the risk of pool
               | failure if I bought an extra 8 TB disk and not degraded
               | the pool.
               | 
               | So, it came down to do I for sure spend an extra $120 on
               | an extra drive or do I just take the <1% chance that one
               | of my three other disks fails in a 6-hour window while
               | I'm migrating data. I took the chance, but I also had my
               | data backed up in cloud storage at the file level in case
               | there was a pool failure.
               | 
               | In other words, it wasn't worth $120 to me to avoid a <1%
               | risk that I'd have 8ish hours of hassle of recovering
               | from cloud backup after a pool failure.
        
               | fn-mote wrote:
               | Really enjoyed the write up.
               | 
               | I have to point out that the surprise risk of the $300
               | bill from Wasabi dwarfs the cost of the 8TB extra disk.
               | 
               | In retrospect, I would have paid the money for the
               | lowered risk, but everybody has a different tolerance for
               | that.
               | 
               | Again, great work and very detailed.
        
         | toast0 wrote:
         | I found this (and the subsequent discussion) super confusing,
         | so let me restate your plan, and see if this is what you meant?
         | 
         | OP described going from 4x disks, add 3x, end up with a 7x
         | raidz2 pool. The steps are
         | 
         | 4/4 (steal disk, set up new pool) -> 3/4 + 4/5 (copy and
         | destroy old pool)-> 4/5 (add missing disk) -> 5/5 -> 7/7.
         | 
         | Your suggestion is to add 4x disks, so you can do
         | 
         | 4/4 (set up new pool) -> 4/4 + 4/5 (copy and destroy old pool)
         | -> 4/5 (add missing disk from old pool) -> 5/5 -> 7/7 + spare
         | (hot or cold?).
        
       ___________________________________________________________________
       (page generated 2025-07-23 23:01 UTC)