Re: Questions about how block devices use snapshots

2023-02-23 Thread Zhiyong Ye
Hi Kevin, Thank you for your patience and explanations. Thanks again! Zhiyong On 2/23/23 7:39 PM, Kevin Wolf wrote: Am 23.02.2023 um 08:35 hat Zhiyong Ye geschrieben: Hi Kevin, Thank you for your reply and this method works. May I ask if this 'image-end-offset' field can be shown in the qe

Re: Questions about how block devices use snapshots

2023-02-23 Thread Kevin Wolf
Am 23.02.2023 um 08:35 hat Zhiyong Ye geschrieben: > Hi Kevin, > > Thank you for your reply and this method works. > > May I ask if this 'image-end-offset' field can be shown in the qemu-img info > too? Because it is also a very useful information whether qcow2 is placed on > a file or a block de

Re: Questions about how block devices use snapshots

2023-02-22 Thread Zhiyong Ye
Hi Kevin, Thank you for your reply and this method works. May I ask if this 'image-end-offset' field can be shown in the qemu-img info too? Because it is also a very useful information whether qcow2 is placed on a file or a block device. Regards Zhiyong On 2/21/23 11:58 PM, Kevin Wolf wrot

Re: Questions about how block devices use snapshots

2023-02-21 Thread Kevin Wolf
Am 21.02.2023 um 14:27 hat Zhiyong Ye geschrieben: > > Hi Kevin, > > Sorry to bother you again. > > I intend to use this approach for snapshots of block devices, which, as you > say, requires a lot of disk space to store snapshot data. So, to save disk > space, after each successful external sna

Re: Questions about how block devices use snapshots

2023-02-21 Thread Zhiyong Ye
Hi Kevin, Sorry to bother you again. I intend to use this approach for snapshots of block devices, which, as you say, requires a lot of disk space to store snapshot data. So, to save disk space, after each successful external snapshot creation, I want to shrink the block device that stores

Re: Questions about how block devices use snapshots

2023-01-13 Thread Zhiyong Ye
Hi Kevin, Thank you for your patience and explanations. I learned a lot from our discussions and thank you again for your help. Regards Zhiyong On 1/12/23 7:47 PM, Kevin Wolf wrote: Am 11.01.2023 um 17:21 hat Zhiyong Ye geschrieben: Hi Kevin, Can I ask again how base.img + diff.qcow2 can

Re: Questions about how block devices use snapshots

2023-01-12 Thread Kevin Wolf
Am 11.01.2023 um 17:21 hat Zhiyong Ye geschrieben: > Hi Kevin, > > Can I ask again how base.img + diff.qcow2 can be re-merged into one image > via qemu-img or hmp command when modified.img is discarded? You can either use 'qemu-img commit' to copy all of the data from diff.qcow2 back into base.im

Re: Questions about how block devices use snapshots

2023-01-11 Thread Zhiyong Ye
Hi Kevin, Can I ask again how base.img + diff.qcow2 can be re-merged into one image via qemu-img or hmp command when modified.img is discarded? Regards Zhiyong On 1/11/23 10:32 PM, Kevin Wolf wrote: Am 11.01.2023 um 08:55 hat Zhiyong Ye geschrieben: Hi Kevin, Thank you for your reply and

Re: Questions about how block devices use snapshots

2023-01-11 Thread Kevin Wolf
Am 11.01.2023 um 08:55 hat Zhiyong Ye geschrieben: > Hi Kevin, > > Thank you for your reply and detailed answers. > > In my scenario is the iSCSI SAN environment. The network storage device is > connected to the physical machine via iSCSI, and LVM is used as the middle > layer between the storage

Re: Questions about how block devices use snapshots

2023-01-10 Thread Zhiyong Ye
Hi Kevin, Thank you for your reply and detailed answers. In my scenario is the iSCSI SAN environment. The network storage device is connected to the physical machine via iSCSI, and LVM is used as the middle layer between the storage device and the VM for storage management and metadata synchr

Re: Questions about how block devices use snapshots

2023-01-09 Thread Kevin Wolf
Am 09.01.2023 um 13:45 hat Zhiyong Ye geschrieben: > Qemu provides powerful snapshot capabilities for different file > formats. But this is limited to the block backend being a file, and > support is not good enough when it is a block device. When creating > snapshots based on files, there is no ne

Questions about how block devices use snapshots

2023-01-09 Thread Zhiyong Ye
Dear all, Qemu provides powerful snapshot capabilities for different file formats. But this is limited to the block backend being a file, and support is not good enough when it is a block device. When creating snapshots based on files, there is no need to specify the size of the snapshot image