Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cache=none disks are ignored #68

Closed
Tatsu-Kishi opened this issue Aug 5, 2020 · 5 comments
Closed

cache=none disks are ignored #68

Tatsu-Kishi opened this issue Aug 5, 2020 · 5 comments

Comments

@Tatsu-Kishi
Copy link

If a VM's disk has cache=none it's getting ignored by backup. By the looks of it it's the filter for cdrom in get_disks_from_config():

grep -v -P 'cdrom|none'

which matches either cdrom or none, and thus also matches cache=none. Not sure if it's supposed to only filter empty cdrom entries ("none,medium=cdrom") or is just redundant terming.

@franklupo
Copy link
Member

Hi,
ok verify the problem.

@mrtwister76
Copy link
Contributor

mrtwister76 commented Sep 25, 2020

I'm suffering from this too.
It occurs when the cache is explicitly set to No Cache in the VM disk settings, as opposed to leaving it as Default (No Cache).

If this is there to exclude cdrom entries my first suggestion was negative grepping on 'media=cdrom'.
However, that will exclude cloudinit images, which is something that we'd like to also backup.

An example of the CDRom images are:

a) An ISO mounted in a CD-ROM:
ide2: local:iso/ubuntu.iso,media=cdrom,size=30480K

b) No ISO mounted in a CD-ROM:
ide2: none,media=cdrom

c) A cloud-init disk:
ide2: ceph_vm:vm-104-cloudinit,media=cdrom

Replacing with the following grep should allow cloudinit disks to also be backed up (not tested):

grep -v -P '(?=.*media=cdrom)(?=.*size=)'

Any news on a fix?

@franklupo
Copy link
Member

I'm busy with work.
Can you create a fix?

Best reagrds

@mrtwister76
Copy link
Contributor

mrtwister76 commented Sep 25, 2020

OK, will take a look.
That previous grep I suggested is no good as some cloudinit disks include their size :(
e.g.
ide2: ceph_vm:vm-2014-cloudinit,media=cdrom,size=4M

@mrtwister76
Copy link
Contributor

@franklupo I've submitted the pull request #73
Please take a look when you can.

franklupo added a commit that referenced this issue Sep 27, 2020
franklupo added a commit that referenced this issue Sep 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants