![]() To use non-destructive read-write checks, add the -n option to the above badblocks command. Upon forceful termination badblocks cannot restore the original content of the currently tested block range and will leave it overwritten with junk data and possibly corrupt the file system. NEVER use this on a drive with mounted file systems! badblocks refuses to operate on those anyway, unless you force it.ĭon't interrupt this operation forcefully! Ctrl+ C (SIGINT/SIGTERM) and waiting for graceful premature termination is ok, but killall -9 badblocks (SIGKILL) isn't. (This will not reliably discover (flash) media, that advertise a larger size, than they actually have use Fight Flash Fraud instead.) Sometimes – especially with flash media – an error only occurs when trying to write. quite safe (barring a power failure or intermittent kernel panic).We can also tweak the amount of data ( -c, in blocks) tested at once to improve throughput 16 MiB should be alright for most devices. Note for advanced usage: if we want to reuse the output for e2fsck, we need to set the block size ( -b) to that of the contained file system. It's possible to abort automatically on error with the option -e 1. We can safely abort the operation at any moment (even forcefully like during a power failure), if we're not interested in the exact amount (and maybe location) of bad blocks. If the error count rises above zero, we'll know that there's a bad block. This operation can take a lot of time, especially if the storage drive actually is damaged. To test the read integrity of the whole device without writing to it, we can use badblocks(8) like this: sudo badblocks -b 4096 -c 4096 -s /dev/sdc How can I check the SMART status of a drive on Ubuntu 14.04 through 16.10?. ![]() ![]() Most removable flash media don't support it. This is generally the best option, but usually only available on (non-ancient) hard disk and solid state drives. or instructed to perform integrity self-tests of different thoroughness.
0 Comments
Leave a Reply. |