압축 다시 해봐야겠다...


+

오오... 망할 -_- 진작에 찾아볼걸

$ tar -cvfS test_spar.tar 123123.qcow2

$ tar -S -cvf test_spar.tar 123123.qcow2 


$ ll

-rw-------. 1 root root   9665380352 Aug  8  2018 123123.qcow2

-rw-r--r--. 1 root root      1484800 Feb 14 18:10 test_spar.tar

-rw-r--r--. 1 root root   9665382400 Feb 14 18:09 test.tar



 To have tar attempt to recognize the holes in a file, use `--sparse' (`-S'). 

[링크 : https://www.gnu.org/software/tar/manual/html_node/sparse.html]


Advantages

The advantage of sparse files is that storage is only allocated when actually needed: disk space is saved, and large files can be created even if there is insufficient free space on the file system.


Disadvantages

Disadvantages are that sparse files may become fragmented; file system free space reports may be misleading; filling up file systems containing sparse files can have unexpected effects; and copying a sparse file with a program that does not explicitly support them may copy the entire, uncompressed size of the file, including the sparse, mostly zero sections which are not on disk -- losing the benefits of the sparse property in the file. 

[링크 : https://wiki.archlinux.org/index.php/sparse_file]


ls -s tells you the allocated size of the file, always a multiple of the allocation unit. ls -l tells the actual size. An easy way to test: 

[링크 : https://askubuntu.com/questions/269480/why-does-ls-l-output-a-different-size-from-ls-s]

[링크 : https://www.lisenet.com/2014/so-what-is-the-size-of-that-file/]


$ man ls

       --block-size=SIZE

              scale sizes by SIZE before printing them; e.g., '--block-size=M'

              prints sizes in units of 1,048,576 bytes; see SIZE format below 



2019/02/12 - [프로그램 사용/kvm(virt-manager)] - qcow2 파일크기의 오류?


'프로그램 사용 > kvm(virt-manager)' 카테고리의 다른 글

kvm 설치  (4) 2019.02.15
sparse file with cp  (0) 2019.02.15
qcow2 파일크기의 오류?  (0) 2019.02.12
kvm 서비스 종료하기  (0) 2019.02.12
kvm 관리용 툴(웹)  (0) 2019.02.08
Posted by 구차니