减少qcow文件大小

int32位 posted @ Mar 22, 2016 04:00:02 PM in openstack , 2303 阅读
转载请注明:http://krystism.is-programmer.com/若有错误,请多多指正,谢谢!

 

当做虚拟机备份快照时,镜像的大小一般会大于实际数据大小,you'll need to zero out all free space of the partitions contained within the guest first.

参考维基百科:https://pve.proxmox.com/wiki/Shrin_Qcow2_Disk_Files

针对linux镜像:

1. 删除无用文件

尽量删除一些无用文件

2. Zero out磁盘

dd if=/dev/zero of=/mytempfile
# that could take a some time
rm -f /mytempfile

3.减少磁盘大小

备份

mv image.qcow2 image.qcow2_backup

#1: Shrink your disk without compression (better performance, larger disk size):

qemu-img convert -O qcow2 image.qcow2_backup image.qcow2

#2: Shrink your disk with compression (smaller disk size, takes longer to shrink, performance impact on slower systems):

qemu-img convert -O qcow2 -c image.qcow2_backup image.qcow2

 

转载请注明:http://krystism.is-programmer.com/若有错误,请多多指正,谢谢!
  • 无匹配
  • 无匹配
Digital Ali 说:
2021年9月14日 21:35

Please share more like that. 123 free movies

SEO 说:
2021年10月01日 00:31

What a fantabulous post this has been. Never seen this kind of useful post. I am grateful to you and expect more number of posts like these. Thank you very much. Complete Business Funding List

SEO 说:
2021年10月02日 19:35

Thank you very much for this great post. find more information

SEO 说:
2021年10月10日 01:30

I wanted to thank you for this great read!! I definitely enjoying every little bit of it I have you bookmarked to check out new stuff you post. รับทำ SEO

SEO 说:
2021年10月18日 03:16

I was reading some of your content on this website and I conceive this internet site is really informative ! Keep on putting up. umrah package from abu dhabi

SEO 说:
2021年11月04日 21:18

This is a great inspiring article.I am pretty much pleased with your good work.You put really very helpful information. Keep it up. Keep blogging. Looking to reading your next post. 오피아트

SEO 说:
2021年11月23日 23:15 KitaabNow is an online book store in pakistan with a huge variety of Academic Books and Stationery items.
Umzugsfirma Zürich 说:
2021年12月24日 18:39

Die 1a umzüge GmbH ist Ihr zuverlässiger Partner für Umzug, Reinigung, Entsorgung, Lagerung und alle Dienstleistungen rund um den Umzug. Kontakt 1a Umzüge GmbH, Umzugsfirma Zürich.

Website 说:
2022年6月22日 00:56

Buy YouTube PVA Accounts
The website is looking a bit flashy and it catches the visitor's eyes. The design is pretty simple and a good user-friendly interface.

Bushra 说:
2022年12月27日 17:57

Thanks for sharing the info, keep up the good work going.... I really enjoyed exploring your site. good resource... psychedelic mushrooms for sale

Bushra 说:
2022年12月28日 21:04

thanks for the tips and information..i really appreciate it.. junk car removal bc

Bushra 说:
2022年12月29日 19:41

thanks for the tips and information..i really appreciate it.. Teri Meri Doriyaan

EthanWilliam 说:
2023年9月19日 04:26

This includes supplying you with everything from a fundamental bookkeeper to a Finance Manager who will assist in managing each and every dollar that enters or exits your organization. <a href="https://financemonkey.ae/">Finance Monkey UAE</a>

Bushra batool 说:
2023年9月22日 23:00

The person behind the camera is known as the photographer. Photographers use their skills, creativity, and technical knowledge to compose and capture images. christmas portraits

ZoeyWinston 说:
2023年11月11日 22:10

Brand felt there was a movement in favor of fundamentally remaking American industrial society along socially and environmentally equitable principles. However, Brand believed that rather than by socialist political action, such reconstruction would be achieved through lifestyle modifications. 

Finance Monkey UK Bookkeeping Services For Small Business

 

DecoreNest 说:
2024年1月27日 07:50

You don't need to be an expert interior designer or have an endless budget to create a nice home <a href="https://www.decorenest.com/">Decorenest - Home Decor Ideas</a> . You may design the ideal environment for you with a little bit of artistic inspiration and by reading our posts on wall decor, furniture selection, kitchen decor, and home decor.


登录 *


loading captcha image...
(输入验证码)
or Ctrl+Enter