KC <conrad.francois.ar...@googlemail.com> schrieb: > I followed your advice on NOCOW for virtualbox images and torrents like > so: chattr -v /home/juha/VirtualBox\ VMs/ > chattr -RC /home/juha/Downloads/torrent/#unfinished > > As you can see, i used the recursive flag. However, I do not know > whether this will automatically apply to files that will be created in > the future in subfolders that do not yet exist. > > Also, how can I confirm whether a file/folder has a NOCOW attribute set > on it?
The C attribute is also inherited by newly created directories. But keep in mind that, at the time applied, it only has effects on existing files if they are empty (read: never written to yet). Newly created files will inherit the attribute from its directory and then behave as expected. You can use lsattr to confirm the C attribute was set. But again keep in mind: it does not reflect the file is actually nocow because of the above caveat. So in your use-case you may want to be sure by doing this (quit all VirtualBox instances beforehand): # mkdir "VirtualBox VMs.new" # chattr +C "VirtualBox VMs.new" # rsync -aSv "VirtualBox VMs"/. "VirtualBox VMs.new"/. # mv "VirtualBox VMs" "VirtualBox VMs.bak" # mv "VirtualBox VMs.new" "VirtualBox VMs" Then ensure everything is working, you can use lsattr to see the C attribute has been inherited. You should immediatly notice the effects of this by seeing better performing IO in VirtualBox (at least this was what I noticed). If everything was copied correctly, you can delete the backups. You could compare md5sums to be sure, of course before running a VM. ;-) -- Replies to list only preferred. -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html