writing data to fill a 1 TB disk
hi everyone:
I have to run a test with a drive that needs to be 1 TB but needs to have 10 GB of data after every 100 GB. Like this: 10 GB data 100 GB free 10 GB data 100 GB free 10 GB data ... I know this can probably be done with dd command but I would appreciate some help and I cannot figure out the correct switches. Thank you for your help! |
Yes, "dd" in loop can do it:
Code:
dd if=/dev/random of=/dev/sdx conv=notrunc oflag=append bs=1G count=10 seek=100 I do not known if "conv=notrunc oflag=append" is appropriate for devices, if not then you need create some more advanced loop with progressive "seek". |
Quote:
Thank you for your help! :) |
"seek" is the answer here. "append" would try to append to the end of the device, not wherever you happened to stop writing last time, causing an immediate "No space left" error and no data transferred.
|
Is pseudo-random data really a requirement? If not, using /dev/zero as input would be a lot more efficient than /dev/random (or /dev/urandom).
|
Quote:
|
If you want to "fill" a device e.g. to erase it, consider that many disk drives are able to perform "on-board diagnostics" (such as "SMART") independently of what they do in response to CPU-initiated commands. The disk drive itself might be capable of executing a "data security erase."
|
All times are GMT -5. The time now is 08:12 PM. |