0

So I have a weird error, while dd'ing partition 3 (partition table below) from my laptop's SSD to a larger USB drive with an identical partition table. After writing ~3-4GB (expecting to write >75GB), I get an error from dd "No space left on device".

I get this result:

$ sudo dd status=progress if=/dev/sda3 of=/dev/sdb3
[sudo] password for erick: 
3977882112 bytes (4.0 GB, 3.7 GiB) copied, 11 s, 362 MB/s
dd: writing to '/dev/sdb3': No space left on device
8016353+0 records in
8016352+0 records out
4104372224 bytes (4.1 GB, 3.8 GiB) copied, 11.3585 s, 361 MB/s

here is the partition table for /dev/sda and /dev/sdb respectively:

$ sudo fdisk -l /dev/sda
Disk /dev/sda: 119.2 GiB, 128035676160 bytes, 250069680 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 40F4F8E1-63F2-4AE7-B768-4AC7D97A473B

Device         Start       End   Sectors  Size Type
/dev/sda1       2048    514047    512000  250M EFI System
/dev/sda2     514048   1538047   1024000  500M Linux filesystem
/dev/sda3    1538048 160374783 158836736 75.8G Linux filesystem
/dev/sda4  160374784 193011711  32636928 15.6G Linux swap
/dev/sda5  193011712 250068991  57057280 27.2G Linux filesystem


$ sudo fdisk -l /dev/sdb
Disk /dev/sdb: 229.1 GiB, 246021095424 bytes, 480509952 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 40F4F8E1-63F2-4AE7-B768-4AC7D97A473B

Device         Start       End   Sectors  Size Type
/dev/sdb1       2048    514047    512000  250M EFI System
/dev/sdb2     514048   1538047   1024000  500M Linux filesystem
/dev/sdb3    1538048 160374783 158836736 75.8G Linux filesystem
/dev/sdb4  160374784 193011711  32636928 15.6G Linux swap
/dev/sdb5  193011712 250068991  57057280 27.2G Linux filesystem

I've searched around some other old posts, but none seem to apply.

Erick
  • 1

1 Answers1

0

How about a "df -h" (altenatively "df -i" for inodes) and space left on the "current" partition, ie. doesn't dd store temp data somewhere (like /tmp) and fills it before it can move everything to its finale destination?

This is probably not you are looking for, but it might help.

Unless you are looking to automate this operation, I'd try to run ddrescue from a live CD instead of "regular" dd from a running OS. This what I'd personnally do for a "one time" copy, and even copy whole disk if it applies.

Nesousx
  • 11
  • 1
  • 3