R
R
Raegdan2015-03-14 19:44:09
linux
Raegdan, 2015-03-14 19:44:09

Is it possible to score with zeros the unused space on the luxury section?

Hello!
There are Proxmox with virtual machines, hard drives on RAW images. For some virtual machines, the system is on luxed partitions, so from the point of view of the hypervisor, their images are garbage. It is impossible to backup normally, because random-like garbage cannot be compressed and each backup weighs almost the entire volume of the corresponding image. The question is - is it possible to somehow ask the suite to nullify the physical sectors it does not use, so that the backup shrinks at least to the actual amount of data in it?
Z.Y. Yes, I know that this entails a decrease in security. It suits me, I don’t see anything secret in the number of gigs.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
C
CrowbarVik, 2015-03-15
@CrowbarVik

I don't know if it will help or not. But you can try using dd to create a file from zeros and write until the space runs out and then delete it.
Something like this: dd if=/dev/zero of=zero.img bs=1M count=100000
For perverts, there is still an option to defragment the disk to find out where the end of the data is and again dd but immediately write zeros to the disk. (DANGER !!!)

S
ShamblerR, 2015-03-16
@ShamblerR

Look at the ext4 documentation, I think there is a mount option in general, than to hammer empty

H
Hilbert, 2015-10-04
@Hilbert

In general, encrypted partitions should not be backed up directly - the presence of two encrypted versions in the hands of a cracker gives him a lot of unnecessary information. Usually a second container is created and the decrypted files are transferred over an encrypted connection, while, as you understand, they are perfectly compressed.
If you still really want to nullify a partition, the easiest way is to simply create a new container from the nulled file/partition and copy the files to it. Untouched sectors will remain filled with zeros.
If this is not suitable, you need to check the blocks for employment and overwrite the free ones with zeros. How to check depends on the FS, but as a universal way, at first glance, it can be proposed to generate a kilobyte of pseudo-random data, fill the dd section with them, and then check and overwrite the matched ones.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question