linux dd 错,dd命令错误写入设备上没有剩余空间[关闭](dd command error writing No space left on device [closed])...

dd命令错误写入设备上没有剩余空间[关闭](dd command error writing No space left on device [closed])

我是新来的存储,试图擦除设备中的数据'/dev/sdcd'为什么我应该得到'没有空间留下错误'

[root@ dev]# dd if=/dev/zero of=/dev/sdcd bs=4k

dd: error writing ‘/dev/sdcd’: No space left on device

1310721+0 records in

1310720+0 records out

5368709120 bytes (5.4 GB) copied, 19.7749 s, 271 MB/s

[root@ dev]# ls -l /dev/null

crw-rw-rw-. 1 root root 1, 3 Oct 27 01:35 /dev/null

如果这是非常基本的问题,我很抱歉

I am new to storage, trying to erase the data in the device '/dev/sdcd' why should I get 'No space left error'

[root@ dev]# dd if=/dev/zero of=/dev/sdcd bs=4k

dd: error writing ‘/dev/sdcd’: No space left on device

1310721+0 records in

1310720+0 records out

5368709120 bytes (5.4 GB) copied, 19.7749 s, 271 MB/s

[root@ dev]# ls -l /dev/null

crw-rw-rw-. 1 root root 1, 3 Oct 27 01:35 /dev/null

if this is very basic question, I am sorry about that

原文:https://stackoverflow.com/questions/33360920

更新时间:2019-11-03 22:50

最满意答案

只要你读取它, /dev/zero设备将继续提供零,如果你的硬件持续了很长时间,一直到宇宙的热死亡。

使用你的命令,你没有像count=这样的限制子句,所以它将继续读取/dev/zero并写入/dev/sdcd直到后者空间不足。

它仍然会写入设备,因此您可以放心地忽略最后的错误(尽管确保磁盘实际上是块大小的整数倍可能是一个好主意,以避免在最后留下敏感信息的可能性)。

The /dev/zero device will continue to provide zeros for as long as you read from it, all the way to the heat death of the universe should your hardware last that long.

With your command, you have no limiting clause like count= so it will continue to read from /dev/zero and write to /dev/sdcd until the latter runs out of space.

It will still be writing to the device so you can safely ignore the error at the end (although it may be a good idea to ensure the disk is actually an integral multiple of the block size to avoid the possibility of leaving sensitive information at the end).

2015-10-27

相关问答

您可能还想检查您的inode使用情况: df -i 当你有可用的空间时,你可以得到“设备上没有空间”,但是你没有inode。 http://blog.scoutapp.com/articles/2014/10/08/understanding-disk-inodes you may want to check your inode usage as well: df -i it's possible to get "no space left on device" when you have sp

...

只要你读取它, /dev/zero设备将继续提供零,如果你的硬件持续了很长时间,一直到宇宙的热死亡。 使用你的命令,你没有像count=这样的限制子句,所以它将继续读取/dev/zero并写入/dev/sdcd直到后者空间不足。 它仍然会写入设备,因此您可以放心地忽略最后的错误(尽管确保磁盘实际上是块大小的整数倍可能是一个好主意,以避免在最后留下敏感信息的可能性)。 The /dev/zero device will continue to provide zeros for as long as

...

这可能是内存不足或其他地方的空间,并且它促使系统挂载溢出文件系统,无论什么原因,它都不会消失。 尝试卸载溢出分区: umount /tmp

要么 umount overflow

It's possible that you've run out of memory or some space elsewhere and it prompted the system to mount an overflow filesystem, and for whatever reason, it's no

...

您的错误消息非常明确:设备上没有剩余空间。 这由您的df输出验证: Filesystem Size Used Avail Use% Mounted on

/dev/mapper/vg_dev-lv_root 20G 19G 28K 100% /

这告诉您,您有一个根分区/总大小为20GB,使用率为100%。 在你的情况下,20GB可能有点小。 由于这个“分区”由LVM(/ dev / mapper / vg ...)管理,因此可以扩展它以为

...

我从简单的MinGW安装程序中卸载了GCC并安装了Codeblocks IDE。 Codeblocks可以选择安装MinGW GCC。 我不明白出了什么问题,但这种方法有效。 具有完全相同的C文件的完全相同的命令编译 这是一个简单的视频,显示了该过程: https : //www.youtube.com/watch?v = 3B4hPHZNtNw I uninstalled GCC from the simple MinGW installer and installed the Codebloc

...

以下是libvips将如何旋转您的jpg图像。 90度旋转需要随机访问图像像素,但JPEG图像只能从上到下严格读取,因此第一步,libvips必须将JPG解压缩为随机访问格式。 它使用vips(.v)格式,这几乎是一个带有小标题的C数组。 对于100mb以下的图像(您可以更改此值,请参见下文)解压缩,它将解压缩到内存缓冲区。 对于解压缩超过100mb的图像,它将解压缩到/tmp的临时文件(您可以更改此信息,请参见下文)。 接下来,它会旋转到输出图像。 它可以作为单个流操作执行此操作,因此它通常需要

...

我检查了/ boot是否已满,但似乎不是: /dev/sda1 236M 75M 149M 34% /boot

run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.10.12

/boot/vmlinuz-4.10.12

update-initramfs: Generating /boot/initrd.img-4.10.12

gzip: stdout: No space left on device

...

在我看来,你的/ tmp目录实际上是作为devtmpfs挂载的,如果我没有记错的话,它实际上就是你的计算机的RAM。 您可以随时重新启动并查看是否有帮助,增加虚拟内存分区,或者关闭正在运行的程序以查看是否有帮助。 另外,你可以从/ tmp中删除一些不必要的文件,因为它们对于会话的生命至少是易失的。 It looks to me that your /tmp directory is actually mounted as a devtmpfs which if I remember correct

...

您/分区上的空间不足。 你现在有几个选择: 在/ dev / sda1上创建空间 展开/ dev / sda1 在另一个驱动器或RAM中为/ tmp /创建一个新分区 我会选择3.因为将一个单独的分区安装到/ tmp /是一个好习惯。 ( https://superuser.com/questions/442383/why-should-i-make-a-separate-partition-for-tmp ) 用于创建新分区并将其安装到/ tmp的信息已经在stackexchange上,因此稍微

...

文件系统上有太多文件,因此您已经用完了inode。 尽管可以有空间写入更多数据,但如果没有可用的inode,则无法创建新文件。 你必须找到为什么你有额外的文件。 它们可能是一些零字节的pesks,只占用inode但没有数据空间。 You have too many files on the filesystem so you've run out of inodes. Even though there would be space to write more data, if there are

...

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值