Friday, April 15, 2016

btrfs COW breaks Virtualbox

btrfs copy on write breaks VirtualBox so that starting a VM will often not complete due to spurious disk errors.

I'm trying out the chattr fix that turns off COW.

I've just done this:

cd ~/VirtualBox\ VMs

for f in `find . -name '*.vdi'`
do
  F=$f
  T=tmpfile
  touch $T
  chattr =C $T
  dd if=$F of=$T bs=1M
  rm $F
  mv $T $F
done

Here's hoping it all works :-).  It's faster than mkfs.ext4 and restore from backup :-).