Skip to main content
deleted 17 characters in body
Source Link
muru
  • 78.4k
  • 16
  • 214
  • 321

I created an image from a 256GB HDD using following command:

  • dd if=/dev/sda bs=4M | pv -s 256G | gzip > /mnt/mydrive/img.gz
dd if=/dev/sda bs=4M | pv -s 256G | gzip > /mnt/mydrive/img.gz 

later I tried to restore the image to another 512GB HDD on another computer using following command:

  • gzip -d /mnt/mydrive/img.gz | pv -s 256G | dd of=/dev/sda bs=4M
gzip -d /mnt/mydrive/img.gz | pv -s 256G | dd of=/dev/sda bs=4M 

the 2nd command shows very long time zero bytes progress (just counting seconds, but nothing happens) and after some while it fails with error telling me no space left on device.

the problem is in the gzip command, when I unpack the image file to a raw 256GB file xxx.img and restore it without using gzip, it works:

  • dd if=/mnt/mydrive/xxx.img bs=4M | pv -s 256G | dd of=/dev/sda bs=4M
dd if=/mnt/mydrive/xxx.img bs=4M | pv -s 256G | dd of=/dev/sda bs=4M 

clearly the problem is in the gzip command (tried as well gunzip, no luck), as a workaround I can restore images using a huge temporary external drive which is annoying. The zipped image is about 10% size of the raw image. Do you have an idea why the gzip is failing?

side note: the problem is not in pv or dd, following command fails with the same error message: gzip -d /mnt/mydrive/img.gz > /dev/sda

thanks in advance

gzip -d /mnt/mydrive/img.gz > /dev/sda 

I created an image from a 256GB HDD using following command:

  • dd if=/dev/sda bs=4M | pv -s 256G | gzip > /mnt/mydrive/img.gz

later I tried to restore the image to another 512GB HDD on another computer using following command:

  • gzip -d /mnt/mydrive/img.gz | pv -s 256G | dd of=/dev/sda bs=4M

the 2nd command shows very long time zero bytes progress (just counting seconds, but nothing happens) and after some while it fails with error telling me no space left on device.

the problem is in the gzip command, when I unpack the image file to a raw 256GB file xxx.img and restore it without using gzip, it works:

  • dd if=/mnt/mydrive/xxx.img bs=4M | pv -s 256G | dd of=/dev/sda bs=4M

clearly the problem is in the gzip command (tried as well gunzip, no luck), as a workaround I can restore images using a huge temporary external drive which is annoying. The zipped image is about 10% size of the raw image. Do you have an idea why the gzip is failing?

side note: the problem is not in pv or dd, following command fails with the same error message: gzip -d /mnt/mydrive/img.gz > /dev/sda

thanks in advance

I created an image from a 256GB HDD using following command:

dd if=/dev/sda bs=4M | pv -s 256G | gzip > /mnt/mydrive/img.gz 

later I tried to restore the image to another 512GB HDD on another computer using following command:

gzip -d /mnt/mydrive/img.gz | pv -s 256G | dd of=/dev/sda bs=4M 

the 2nd command shows very long time zero bytes progress (just counting seconds, but nothing happens) and after some while it fails with error telling me no space left on device.

the problem is in the gzip command, when I unpack the image file to a raw 256GB file xxx.img and restore it without using gzip, it works:

dd if=/mnt/mydrive/xxx.img bs=4M | pv -s 256G | dd of=/dev/sda bs=4M 

clearly the problem is in the gzip command (tried as well gunzip, no luck), as a workaround I can restore images using a huge temporary external drive which is annoying. The zipped image is about 10% size of the raw image. Do you have an idea why the gzip is failing?

side note: the problem is not in pv or dd, following command fails with the same error message:

gzip -d /mnt/mydrive/img.gz > /dev/sda 
Source Link
Lukas K
  • 113
  • 3

restoring hdd image using gzip throws error no space left on device

I created an image from a 256GB HDD using following command:

  • dd if=/dev/sda bs=4M | pv -s 256G | gzip > /mnt/mydrive/img.gz

later I tried to restore the image to another 512GB HDD on another computer using following command:

  • gzip -d /mnt/mydrive/img.gz | pv -s 256G | dd of=/dev/sda bs=4M

the 2nd command shows very long time zero bytes progress (just counting seconds, but nothing happens) and after some while it fails with error telling me no space left on device.

the problem is in the gzip command, when I unpack the image file to a raw 256GB file xxx.img and restore it without using gzip, it works:

  • dd if=/mnt/mydrive/xxx.img bs=4M | pv -s 256G | dd of=/dev/sda bs=4M

clearly the problem is in the gzip command (tried as well gunzip, no luck), as a workaround I can restore images using a huge temporary external drive which is annoying. The zipped image is about 10% size of the raw image. Do you have an idea why the gzip is failing?

side note: the problem is not in pv or dd, following command fails with the same error message: gzip -d /mnt/mydrive/img.gz > /dev/sda

thanks in advance