问题描述
我正在寻找一种用于存储已退役系统档案的文件类型.目前,我们主要使用 tar.gz,但是从 200GB tar.gz 存档中查找和提取几个文件很笨拙,因为 tar.gz 不支持任何类型的随机访问读取配置.(在你明白之前,使用 FUSE 挂载 tgz 并没有让它变得更好.)
I'm looking for a file type for storing archives of systems that have been decomissioned. At the moment, we primarily use tar.gz, but finding and extracting just a few files from a 200GB tar.gz archive is unwieldy, since tar.gz doesn't support any sort of random-access read provision. (And before you get the idea, mounting a tgz using FUSE doen't make it better.)
以下是我们目前所发现的 -- 我想知道还有哪些其他选择:
Here's what we've found so far -- I'd like to know what other options there are:
- tar.gz -- 随机存取读取不佳
- zip -- 缺乏对某些高级文件系统功能的支持(例如:硬链接、xattrs)
- squashfs -- 创建大型存档需要很长时间(很多小时),而且用户空间工具很差.
- tar.gz -- poor random-access read
- zip -- lacks support for some advanced filesystem features (e.g: hard links, xattrs)
- squashfs -- takes an extremely long time to create a large archive (many hours) and poor userspace tools.
我正在想一种简单的方法,将全功能文件系统映像创建到尽可能小的空间中——cloop 映像中的 ext2,但这似乎不是一个特别用户友好的解决方案.
I'm trying to think of a simple way of creating a full-featured filesystem image into as small a space as possible -- ext2 in a cloop image, but it doesn't seem like a particularly user-friendly solution.
想必这个问题以前已经解决了——有没有我遗漏的选项?
Presumably this problem has been solved before -- are there any options I've missed?
推荐答案
virt-sparsify 可用于稀疏化和(通过 qemu 的 qcow2 gzip 支持)压缩几乎任何 linux 文件系统或磁盘映像.生成的图像可以挂载到虚拟机中,也可以通过 guestmount 挂载到主机上.
virt-sparsify can be used to sparsify and (through qemu's qcow2 gzip support) compress almost any linux filesystem or disk image. The resulting images can be mounted in a VM, or on the host through guestmount.
有一个新的 ndbkit xz plugin 可用于更高的压缩,它仍然保持良好的随机访问性能(只要你要求 xz/pixz pixz="https://github.com/libguestfs/nbdkit/blob/master/plugins/xz/nbdkit-xz-plugin.pod#getting-best-random-access-performance-from-xz" rel="nofollow">在块边界上重置压缩).
There's a new ndbkit xz plugin that can be used for higher compression, which still keeps good random-access performance (as long as you ask xz/pixz to reset compression on block boundaries).
这篇关于存档文件系统或格式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!