Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

ZFS snapshots of docker.img, libvirt.img and vdisks

Featured Replies

Long-time satisfied Unraid user here. I am planning on migrating my two SSD brtfs cache pool to ZFS based on the excellent and informative videos by SpaceinvaderOne. In the videos, he explains how to setup appdata snapshots. However, I am wondering whether ZFS snapshots can be utilized also for docker.img, libvirt.img and vdisk images. That is, is it safe to take uncorrupted ZFS snapshots on them while VMs and docker containers are running?

Solved by JorgeB

  • Community Expert
  • Solution

Any btrfs/zfs snapshot taken of a running VM will be crash consistent, it's better than nothing but ideally would also create some snapshots with the VMs off/hibernated, I for example take automatic live snapshots everyday but once a week hibernate the VMs and take a manual snapshot.

 

Libvirt should not be a problem having the service running, dockers also not as much, but it may depend on the containers.

  • 5 months later...
On 9/6/2023 at 5:39 AM, JorgeB said:

Any btrfs/zfs snapshot taken of a running VM will be crash consistent, it's better than nothing but ideally would also create some snapshots with the VMs off/hibernated, I for example take automatic live snapshots everyday but once a week hibernate the VMs and take a manual snapshot.

 

Libvirt should not be a problem having the service running, dockers also not as much, but it may depend on the containers.

I'm starting my new build (new to unraid) and been researching about the best file system to use for the cache pool with my use case.  Either BTRFS or ZFS, I will only be using 2 x 2TB SSDs on Raid1/Mirror.  This will be my forever cache pool 2TB (total size) as it is more than enough for my needs, frankly an overkill.

 

I also bought another 2TB ssd and initially planned to format that to ZFS and will be used for replication of the 2TB mirrored ZFS SSD.

 

Which brings me to my concern and question and since I stumbled on this reply, maybe you can help or suggest on this.

 

I will have two VMs (Windows VM and Home Assistant HAOS) and probably 3-4 dockers and that is it.  If I will add more in the future, it will only be docker containers and no more VMs.

 

I've been doing some research and was told that VM snapshot in ZFS is only good for data at rest.  The VMs I plan to install don't fall on that "data at rest" category. 

 

This became a real concern of mine as VM snapshot restore is essential to me because it had saved me multiple times in the past. I currently use VMWare Workstation on a Windows Server but want to ditch it in favor of unraid.

 

However, I do have the luxury of shutting them both down before doing a snapshot (via script or automation) like you mentioned it being ideal.  I won't even entertain the idea of doing Live snapshots as to me each snapshot created should be valid and restore-able if needed. 

 

My Home Assistant VM will probably do 2x a week snapshot and the Windows VM probably once every 2 weeks (right before patch Tuesday).

 

Will I get better results of a VM snapshot in ZFS when they are both turned off before doing so?

 

Should I just ditch ZFS and go with BTRFS instead for a more reliable VM Snapshot restore?

 

Thanks!

Edited by war_pig
spelling

  • Community Expert
1 hour ago, war_pig said:

Will I get better results of a VM snapshot in ZFS when they are both turned off before doing so?

Like mentioned above snapshots with the VMs off is better since they won't be in a crash consistent state.

 

1 hour ago, war_pig said:

Should I just ditch ZFS and go with BTRFS instead for a more reliable VM Snapshot restore?

They are both the same regarding this issue.

 

38 minutes ago, JorgeB said:

Like mentioned above snapshots with the VMs off is better since they won't be in a crash consistent state.

 

They are both the same regarding this issue.

 

Great Thanks!  Ill go with ZFS then.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.