Sample Header Ad - 728x90

1TB drive compressed shows only 3.8GB, what did I do wrong?

1 vote
1 answer
773 views
On Linux Mint 20.2 Cinnamon I would like to create a disk image of my secondary disk drive (SATA) containing Windows 10, not that it matters now, directly gzip'ed using the Parallel gzip = pigz onto NTFS formatted external HDD (compressed on-the-fly). My problem is inside the resulting compressed file, there is somehow _twisted_ (wrong) size of the contents, which I would like you to have a look at: 1TB drive uncompressed disk shows only 3.8GB whereas its compressed size is 193 GB. 1TB drive uncompressed disk shows only 3.8GB whereas its compressed size is 193 GB.
$ gzip --list sata-disk--windows10--2021-Sep-24.img.gz 
         compressed        uncompressed  ratio uncompressed_name
       206222131640          3772473344 -5366.5% sata-disk--windows10--2021-Sep-24.img
-rwxrwxrwx 1 vlastimil vlastimil 193G 2021-Sep-24 sata-disk--windows10--2021-Sep-24.img.gz
*** ## Notes to the below shell snippet I just ran - Serial number censored, of course (ABCDEFGHIJKLMNO) - I tried to force the size with --size of pv command - The exact byte size of the whole disk comes from smartctl -i /dev/sdX *** ## The shell snippet I just ran follows
-bash
dev=/dev/disk/by-id/ata-Samsung_SSD_870_QVO_1TB_ABCDEFGHIJKLMNO; \
file=/media/vlastimil/4TB_Seagate_NTFS/Backups/sata-disk--windows10--"$(date +%Y-%b-%d)".img.gz; \
pv --size 1000204886016  "$file"
*** I am quite sure the problem is in how I used the pipe or pv for that matter, but I fail to prove it. Test scenario with a regular file (~2GB) works just fine and as expected. Can this be an error in gzip maybe...? What am I doing wrong here, please? Thank you in advance. *** Perhaps the last thing to cover is versions of pv and pigz: - I am using a packaged version of pv: 1.6.6-1 - I am using a compiled version of pigz: 2.6
Asked by Vlastimil Burián (30515 rep)
Sep 24, 2021, 07:21 PM
Last activity: Sep 26, 2021, 06:26 PM