raw格式的镜像,如何在网络传输、备份时减少拷贝

     raw 格式的镜像,不带matadata,就像一块空白的磁盘,读写效率比qcow2快近10~30%。

     本文探讨下,在将这个镜像进行网络传输备份时,如何减少数据拷贝。如果一个近50G大小的文件在网络中进行传输的话,即占用带宽,拷贝花的时间也是比较漫长的。

1. 看看创建raw镜像的一些参数

root@test:~# qemu-img create -f raw  a.img -o ?
Supported options:
size             Virtual disk size
nocow            Turn off copy-on-write (valid only on btrfs)
preallocation    Preallocation mode (allowed values: off, falloc, full)

An image with preallocated metadata is initially larger but can improve performance when the image needs to grow. Full preallocation additionally writes zeros to the whole image in order to preallocate lower layers

为了提高读写效率,通常会打开这个preallocation开关。

 

2. 创建raw镜像      

     1). 创建raw格式的镜像
            qemu-img cr

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值