I currently have a two disk-zfs mirror which has been filling up recently. So I decided to buy anothet drive, but when I started thinking about it, I was unsure on how to actually make it usable. The issue is that I have ~11Tb on the existing pool (2 12 Tb drives (a,b)) and no spare drives of that size to copy over all my data to while creating the new 3-drive pool with the same drives and the additional new drive ©.

I saw there is a way to create a “broken” pool with just two drives (a,b), while keeping the data on the remaining drive ©, then copying the data over to the pool and ‘reparing’ it afterwards with the new drive ©.

As I only have 11 Tb of data which would theoretically fit one disk, would I be able to:

  • keep the old pool
  • initialize the new pool with just one drive and copy over the data
  • detach one drive from the old pool, add it to the new pool (if possible, would there allready be parity data generated on this drive at that point? Wold the parity be generated in a way that would allow me to lose the other drive in the pool and recover the data from the remaining pool (drive) alone?)
  • destroy old pool, add last drive to new pool

I would be able to back up my important data, but don’t have enogh space to also back up my media library which I’d like to not have to rebuild.

alternatively: anyone in Berlin wanna loan me a 12 Tb drive?

  • nixcamic@lemmy.world
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    22 hours ago

    So the broken pool is kinda stupid and you shouldn’t do it, you will be running without parity the whole time but if you want to risk it it does work.

    Or… If you have the drives and space, you can combine a bunch of smaller drives with mdadm (assuming Linux but freebsd has geom I think) and then use that as your third drive, then once everything is copied do a zpool replace. That way you keep full parity the whole time.

    Edit: latest version of zfs supports raidz expansion. So you could create a 2 drive raidz1 then copy everything over then expand it. You will still be running your source disk without parity but at least the destination would be safe.

    • needanke@feddit.orgOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      13 hours ago

      Sadly I don’t have 11 Tb worth of smaller empty drives around (and not even eniugh sata-Ports, so I’d also have to buy an expansion-card).

      Yeah, I don’t like the broken pool idea either, that’s why I was hoping there was a better method.