Enable Copy-On-Write


Recommended Posts

Can someone ELI5 what Enable Copy-On-Write: in the add-share screen does? I saw it get added to 6.X and I only partially understood what was going on. I for the life of me can't find those patch notes to read over it again. I'm adding a new share, first since this feature was added, and I'm not sure what to set it to...

Link to comment

Can someone ELI5 what Enable Copy-On-Write: in the add-share screen does? I saw it get added to 6.X and I only partially understood what was going on. I for the life of me can't find those patch notes to read over it again. I'm adding a new share, first since this feature was added, and I'm not sure what to set it to...

Enable this for shares that store virtual disks for VMs. It is actually only relevant for shares that span across a disk using the btrfs filesystem, if you have no btrfs devices in your system, the setting has no affect.

Link to comment
  • 1 year later...
On 1/12/2016 at 7:49 PM, jonp said:

Enable this for shares that store virtual disks for VMs. It is actually only relevant for shares that span across a disk using the btrfs filesystem, if you have no btrfs devices in your system, the setting has no affect.

 

Sorry to resurrect the thread, but can you clarify this? Web searches for CoW with VMs on unRAID lead to this as top result, and I think the way you word it probably steers people wrong. When you say "enable this for shares that store virtual disks for VMs", I think most people would interpret that as meaning you should set this to Auto (enabled) in the new share settings. Initially that is what I thought too, but everything else I've read seems to suggest it should be the other way, set to No. Even the default "domains" share for VMs on unRAID have it set to No by default.

 

Also, why should you do this? From what I've seen, using CoW would allow me to take snapshots of my vdisk img file using cp --reflink. That could be useful, so what are the pros and cons of enabling vs. disabling CoW? Would running qcow2 format be better (assuming unRAID supports that)? Does it make a difference either way if the share/VMs are on SSD?

Link to comment
  • 9 months later...

Another apology for bringing this thing back from the dead, but I've poked around a bit and still am not finding anything that sounds like a "definitive answer".

 

According to the UnRAID manual 6 section on "The Engine" it sounds like Copy-on-write being enabled (set to "Auto") is good for Docker containers because it lets them use the same base OS image until one of them needs to make a change to it, at which point a copy is made and the "customizing" container user the copy while all others continue to use the original

 

I suspect it's DISABLED (set to "no") for the "domains" share (which is for holding saved VM instances) because of the overhead associated with making copies of the VM file (or changed blocks of the file) every time the guest OS makes changes to the disk image.

 

But that's purely a guess.

Link to comment
  • 1 year later...

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...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.