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.

Understanding behavior of btrfs file system on cache/pool for VM Image File backups?

Featured Replies

I have a Windows 11 VM with image files located on /mnt/newcache/domains/Windows11.

Screenshot 2026-01-04 162503.png

The VM primary (boot drive) vdisk image is 100G.

When I was debugging, I was frustrated that when I stopped the VM to copy the .img file to my array, it was unexpectedly slow. It took about 1 hour to copy 100 GB from newcache to array (made of Seagate IronWolf Pro drives). 100,000 MB / 3600 seconds = 28 MB / s. This was on an unloaded system, <10% total CPU use during the copy. When the array is operating I can see individual disk rates of 200 MB / s on sustained transfer on the Unraid Main tab. I have not solved that issue yet.

As an alternative, I explored keeping the backup images on the newcache drive. It is 1T in size, and only 150 GB was in use.

With the VM stopped, I ran the commands:
root@T440:/mnt/newcache/domains/Windows11# mkdir imgbackup
root@T440:/mnt/newcache/domains/Windows11# cp vdisk1.img imgbackup/

This command completed in about 1 second! I thought it didn't work, but the copy of the file was there.
I asked Gemini if this was something done internally by the DELLBOSS card, but it said it was a result of btrfs:

The 1 second "copy" is not trickery from your Dell BOSS card, but a brilliant feature of the BTRFS (or XFS) file system Unraid uses

for cache pools called Reflink (Reference Link).

1. The "Magic" of Reflink Copies

When you use cp on the same NVMe pool, the file system doesn't actually move the 100GB of data bits. Instead, it creates a new

"pointer" (metadata) that points to the exact same physical data blocks on the drive.

Space Savings: Currently, that 100GB copy is taking up zero extra bytes on your NVMe.

Instant Backup: It is 100% bit-perfect and safe.

Copy-on-Write (CoW): If you start the original VM and it changes a single block of data, the file system will only then write that

specific change to a new area of the drive. The backup in your working_img_0102 folder will remain unchanged, frozen at the

moment you made the copy.

Is this true? It seems to be, at least in terms of space, since I have created 4 "copies" of the 100G img file and the total space is only up to 268 G now.

Is there any performance overhead leaving several versions of the image file reflinked like that on the drive? Should I move them off to the Array once the VM is stable? Presumably I could copy the backup copies to the array while the VM is running?

  • Community Expert
42 minutes ago, timg11 said:

Is this true?

Yes.

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.