ZFS Snapshot Questions

Discussion in 'SSDs & Data Storage' started by cls333, Aug 17, 2015.

  1. cls333

    cls333 n00b

    Messages:
    1
    Joined:
    Aug 17, 2015
    I recently lost 2 disks in my 5 disk ZFS RAID-Z array, resulting in an unrecoverable array. I do have a recent backup in the form of ZFS snapshots sent to an external USB drive on a regular basis, so my data loss was minimal.

    I have replaced the failed disks and am ready to set my 5 disk array back up. MY plan to restore from the backup drive is to take a fresh snapshot of the backup drive and send it to the newly rebuilt array, which will copy all of the data back onto the RAID-Z pool.

    At that point, I'm obviously going to want to re-implement my backup strategy... and this is where I get confused. Will I be able to send incremental snapshots of the RAID-Z pool directly to the backup drive based of that snapshot I used to restore the data? Or will I need to take a new snapshot of the RAID-Z pool, send that to the backup drive and then take incrementals from there?

    I have close to 4TB of data here, and copying that over is quite time consuming on this system, so I'm hoping ot minimize the amount of full snapshots I need.
     
  2. danswartz

    danswartz 2[H]4U

    Messages:
    3,618
    Joined:
    Feb 25, 2011
    Not sure I understand your setup. Were you sending the snapshots to the USB drive and saving them? Or sending them there and receiving them on the USB drive?
     
  3. Shockey

    Shockey [H]ard|Gawd

    Messages:
    1,994
    Joined:
    Nov 24, 2008
    Sounds like he was using the USB drive to send snapshot too. He used the snapshot to recover his array after the disk failure.

    Now wanting to take snapshot and send them to the backup drive again but he not sure if he has to take new snapshot of the new array.
     
  4. Aesma

    Aesma [H]ard|Gawd

    Messages:
    1,844
    Joined:
    Mar 24, 2010
    Theoretically it should work, but I have not tried it yet.
     
  5. brutalizer

    brutalizer [H]ard|Gawd

    Messages:
    1,593
    Joined:
    Oct 23, 2010
    Raidz2 or Raidz3 is what I use. I abandoned raidz2 in favour of raidz3, to be able to sustain loss of three disks.
     
  6. Phantum

    Phantum [H]ard|Gawd

    Messages:
    1,716
    Joined:
    Jul 25, 2001
    You should be able to use ZFS' send/receive feature for this. But check the docs to be sure.
     
  7. DaPayne

    DaPayne Limp Gawd

    Messages:
    180
    Joined:
    Jan 28, 2015
    I always use Raidz2. I haven't used Raidz3 yet, but a couple of times I have lost two drives. I use 6 drive vdevs with Raidz2 and join them all into a pool. If the system is super critical I will mirror the vdev's.

    One thing I would do with that much data is acquire another external USB drive to send the new backup to and there is no way in hell I would touch my original backup until I had the array back online and running for a week or two.
     
  8. _Gea

    _Gea 2[H]4U

    Messages:
    3,876
    Joined:
    Dec 5, 2010
    You can use USB disks, build a pool on them and zfs send filesystems to this pool.

    Three problems:
    - If your source pool is quite large, it may be complicated to backup to several disks
    - A backup should contain redundancy and versions
    - A backup should be always remote located or a problem can affect data and backup


    What I would do
    Buy a cheap backupserver like a HP G8 Microserver (in DE up from 180 Euro).
    With 4 disk bays you can build a backup z1 pool up to 18 TB. For critical data, you can use two disk sets.
    You should place the system on a different physical location.


    Beside that
    You can build a vdev from disks as an n-way mirror but you cannot mirror vdevs on ZFS.
    ZFS always stripe over vdevs in a raid-0 mannor
    - beside creating a zvol, share it via iSCSI, and build a mirror over the targets via an initiator.

    This will even work to mirror (or raid-z) over multiple storage/SAN servers using storage heads.
     
  9. DaPayne

    DaPayne Limp Gawd

    Messages:
    180
    Joined:
    Jan 28, 2015
    _Gea:

    1) I don't use USB in any way, that was the OP.

    2) I am tired up over 20 hours. You are right about the vdev, we do two sets of mirror's stripped.
     
  10. Phantum

    Phantum [H]ard|Gawd

    Messages:
    1,716
    Joined:
    Jul 25, 2001
    Mirrors will always have the upper hand in performance over raidz. And then striped mirrors and then raidz (levels 1, 2 and 3 in that order).
     
  11. danswartz

    danswartz 2[H]4U

    Messages:
    3,618
    Joined:
    Feb 25, 2011
    Not sure what you're saying here. You're not saying vanilla mirrors (raid1) perform better than striped mirrors (raid10), are you?
     
  12. Phantum

    Phantum [H]ard|Gawd

    Messages:
    1,716
    Joined:
    Jul 25, 2001
    Thank you, and no. What I meant was not what I wrote. Striped mirrors is faster than just a mirror.
     
  13. danswartz

    danswartz 2[H]4U

    Messages:
    3,618
    Joined:
    Feb 25, 2011
    Thank you. I didn't want to post anything insulting :)