DD:写入错误 - 设备上没有剩余空间

DD:写入错误 - 设备上没有剩余空间

我有两个 SanDisk Extreme Pro USB 棒/磁盘,每个正好是 128,000,000,000 字节(约 119GiB),并且经常使用 dd 命令从其中一个磁盘克隆另一个磁盘(我之前尝试了十次都成功了)。我现在收到一个典型的 dd 错误,如下所示:

dd:写入‘/dev/sdd’时出错:设备上没有剩余空间

我使用计数和块大小 (bs) 参数来防止与无限制克隆相关的错误。我已将终端的输出复制到下面,以便为能够提供帮助的人详细说明。它首先显示 fdisk 的输出和卸载操作。

---------终端输出----------

sudo fdisk -l

[Note: I've ommitted some of the output of this command, keeping relevant bits.]

Disk /dev/sda: 14.6 GiB, 15682240512 bytes, 30629376 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: dos
Disk identifier: 0xe735b15f

Device    Boot Start      End  Sectors  Size Id Type
/dev/sda1  *    2048 30629375 30627328 14.6G  c W95 FAT32 (LBA)


Disk /dev/sdc: 119.3 GiB, 128043712512 bytes, 250085376 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: BC24B30C-D71B-4595-82F1-F4ED27740828

Device        Start      End  Sectors  Size Type
/dev/sdc1  64825344 238905343 174080000  83G Microsoft basic data
/dev/sdc2      2048      4095      2048    1M BIOS boot
/dev/sdc3      4096    503807    499712  244M EFI System
/dev/sdc4    503808  4610047  4106240    2G Linux filesystem
/dev/sdc5    4610048  64825343  60215296 28.7G Linux filesystem
/dev/sdc6  238905344 249759743  10854400  5.2G Linux filesystem

Partition table entries are not in disk order.


Disk /dev/loop8: 3.7 MiB, 3825664 bytes, 7472 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


Disk /dev/sdd: 119.3 GiB, 128043712512 bytes, 250085376 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: BC24B30C-D71B-4595-82F1-F4ED27740828

Device        Start      End  Sectors  Size Type
/dev/sdd1  64825344 238905343 174080000  83G Microsoft basic data
/dev/sdd2      2048      4095      2048    1M BIOS boot
/dev/sdd3      4096    503807    499712  244M EFI System
/dev/sdd4    503808  4610047  4106240    2G Linux filesystem
/dev/sdd5    4610048  64825343  60215296 28.7G Linux filesystem
/dev/sdd6  238905344 249759743  10854400  5.2G Linux filesystem

Partition table entries are not in disk order.
ubuntu@ubuntu:~$ for n in /dev/sdc* ; do umount $n ; done
umount: /dev/sdc: not mounted.
umount: /dev/sdc1: not mounted.
umount: /dev/sdc2: not mounted.
umount: /dev/sdc3: not mounted.
umount: /dev/sdc4: not mounted.
umount: /dev/sdc5: not mounted.
umount: /dev/sdc6: not mounted.

ubuntu@ubuntu:~$ sudo dd if=/dev/sdc of=/dev/sdd  bs=1000000 count=128000 conv=sync,noerror status=progress
7988000000 bytes (8.0 GB, 7.4 GiB) copied, 28 s, 285 MB/s
dd: error writing '/dev/sdd ': No space left on device
8241+0 records in
8240+0 records out
8240062464 bytes (8.2 GB, 7.7 GiB) copied, 29.0572 s, 284 MB/s

答案1

我发现,一旦我纠正了 USB 上的文件系统错误,dd 命令就可以正常运行。文件系统错误是使用 e2fsck 命令纠正的(fsck 就可以)。

相关内容