What exactly is 'private-cow.img' in appvms?

瀏覽次數:40 次
跳到第一則未讀訊息

Stickstoff

未讀,
2018年8月2日 上午11:06:492018/8/2
收件者:qubes...@googlegroups.com
Hello everyone,

there is documentation about 'root-cow.img' online [1], but nothing
about 'private-cow.img'.
Am I right to assume that the 'private.img' is the writable part the VM
sees, with the changes the VM wrote saved on 'private-cow.img', which is
rotated with 'private-img.old.img' after each VM restart for rollback
possibility? This is how I understand 'root-cow.img' at least.

If this is correct, and I backup only 'private.img' of a running VM, I
would miss on all changes the VM did since its current start?
Would 'private.img' be enough when the VM is shut down? It does sound
like 'root.img' need one of the two .old as "binary patches" in any case.

And just to be sure: 'root-cow.img' and 'volatile.img' shouldn't contain
any backup-worthy data of a VM, right?


Thank you,

Stickstoff

[1] https://www.qubes-os.org/doc/template-implementation/

signature.asc

Rusty Bird

未讀,
2018年8月3日 上午10:12:242018/8/3
收件者:Stickstoff、qubes...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Stickstoff:
> there is documentation about 'root-cow.img' online [1], but nothing
> about 'private-cow.img'.
> Am I right to assume that the 'private.img' is the writable part the VM
> sees, with the changes the VM wrote saved on 'private-cow.img' [...]

It's kind of the other way around - foo.img stores the most current
live data for volume foo, and foo-cow.img stores differing old data
blocks that allow the corresponding device-mapper snapshot* device to
present a virtual view of the contents of volume foo from the time it
was snapshotted, i.e. before the live data started to diverge.

> If [..] I backup only 'private.img' of a running VM

This would result in inconsistent/damaged data.

Rusty


* https://www.kernel.org/doc/Documentation/device-mapper/snapshot.txt
-----BEGIN PGP SIGNATURE-----

iQJ8BAEBCgBmBQJbZGBeXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w
ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ4NEI1OUJDRkM2MkIxMjlGRTFCMDZEMDQ0
NjlENzhGNDdBQUYyQURGAAoJEEadePR6ryrfERYP/ApX1aJuCoyueKURTwB8hCx/
GQsrqeflPsL9ohqjbEv6m19cVFXRK6G1vKkycxwPolfHqq/7bQ5U673jCHSzLwpr
bdLbgupYBe7AosfrNJLgwvcm5LR3v8qK+VOyK1htzdmuEDkLPom0INlVcMPRVpvB
G8uKjp9xnKfg7n2UaULsIdL8+IkQ4U1AlZ0Y/breR7q9Hivxzd9PZMoJL77NAdxD
iKNN+Ac9fHczupUdBjQAlUCrLchjeZSSzgnAIifRjuXDthwTyoi+f1/aSWYZxd0B
5MXh7HnPI2JyZ/trZadpKvZVCNn0s9D9AsDugCNbQSxP+YFxerC5uukwHgnC1j7g
ORtbs4c4NwP4jkytFJF/GtgCO77699FtyJFwPa5BU4hpspkjuJTSgaVAP7j2z4Jj
oGDd+iF91mb6Gbv6syYPN8QmSdshuCSFkYH61bft+Odd1+QokeN2Sa+uJQGZ20gA
xrM/lmmzo3TqtfLns7S7/FrsPok1njJaTyBsG7TdZf1A1rsu57mb0K6Vf9sPoI7t
cO/+4WwUR02oNfxviWTPuyou6ZzIIblwqnCS74EsOlLopf1Ilc0i/S9bxIhotPIg
grlKluk1QpWz4r/CWV8Ho7UzqrFQClWUBFkkEdtATkV7WAARFi5XS/efbTG4ita0
GkyInY0UAP9pk4FhPcQp
=+FNE
-----END PGP SIGNATURE-----

Rusty Bird

未讀,
2018年8月3日 上午10:23:422018/8/3
收件者:Stickstoff、qubes...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Rusty Bird:
> Stickstoff:
> > there is documentation about 'root-cow.img' online [1], but nothing
> > about 'private-cow.img'.
> > Am I right to assume that the 'private.img' is the writable part the VM
> > sees, with the changes the VM wrote saved on 'private-cow.img' [...]
>
> It's kind of the other way around - foo.img stores the most current
> live data for volume foo, and foo-cow.img stores differing old data
> blocks that allow the corresponding device-mapper snapshot* device to
> present a virtual view of the contents of volume foo from the time it
> was snapshotted, i.e. before the live data started to diverge.
>
> > If [..] I backup only 'private.img' of a running VM
>
> This would result in inconsistent/damaged data.

To be clear - what I meant by inconsistent is that that when the VM is
running, some data blocks in private.img will change while your manual
backup operation is copying that file.
iQJ8BAEBCgBmBQJbZGVjXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w
ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ4NEI1OUJDRkM2MkIxMjlGRTFCMDZEMDQ0
NjlENzhGNDdBQUYyQURGAAoJEEadePR6ryrfBzcP/jt0GN2azqrNqaP0jNoMmAJh
gvZVI53QSxwyK93gGVi1MxECG3B5EA9yl6wEpqe7IJbNKPja6QdPVcJPyruyE+0i
w+5aWuR81n8oAI2E1K2b/tJZ1Zha035d/6joRraQ6lkjIH+S2QdYAP5oUUx40ZWf
xYAwR+FJZJVsf0dMLnzPgTpLyd7rV2sF3YK5l6InypgmaNB0OmYx/jU7HpSuN7zz
w4jYEnfhXthwQS3uaEsuNXVTXln9bEgraR4n9G8emn6z2Xr1/HY6tvWQ2rZzkfRx
++kNrg9O2JrLuPx5mZlQPuZ3iki0wcqBbGNyFNNZ/2yYA5bmRTOYyof3Ux2zdZ9C
fa43idV5slEVmprwOH6/iiS0ZLzaoRuQVIvNFVIW5gqteUMiHemqWjyzQm09gY6p
QYCCimw48uYsgFyNxjJLp/F5ezdAl2qlbOyzZCK8gWY0zOpCoh1eywgM/04ZJVw9
M9rbHZZBBx4KxVGOkAKzW5LLXVgvpLtYPbdzkrkYqg3hP+Z06oXUqpJv6+TnbCnf
JgemF543aSXVcNmwTiZncu+gYwBin8AwWthHhmBaOxDBGnFUOFFjlQcXchbT5hrd
NOC0sm845KVgFYyOT+zWvkXJEg1PKTt2m/vQOwicaGF2/uY0Z5nBXBUHEzGkK+y0
rNBlQucepQa/7vJnLcZA
=EMYK
-----END PGP SIGNATURE-----

回覆所有人
回覆作者
轉寄
0 則新訊息