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
Fix 1: Restart Processes Using Deleted Files The most probable cause of the “No space left on device” error is a process still using a deleted file. Thankfully, fixing this error is easy. You just need to restart the process to free up the reserved storage.
dd command reads one block of input and process it and writes it into an output file. You can specify the block size for input and output file. In the above dd command example, the parameter “bs” specifies the block size for the both the input and output file. So dd uses 2048bytes as a block size in the above command.
Your local folder does not have enough space available for the operation. In your environment, update the 'TEMP', 'TMPDIR' or 'TMP' environment variable to a location with additional free space. Validate the updated location: Windows - command-prompt 'set'
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(a).
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).
(a) It may slow down somewhat in the final stages, as it becomes harder to get useful work out of a universe that's losing all its energy gradients :-)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With