Read Raw Block

Top  Previous  Next

This feature was added in release 1.22. It instructs the software to read the selected block(s) from a random access device.



-read s,n,file  Reads n (512-528 byte) blocks from random access device starting at block #s and saves to binary file.



./smartmon-ux -read 0,200,/tmp/First100KBData.bin /dev/sda


This will read the first 200 x 512 bytes and save it into the file, assuming the disk is formatted to a standard block size of 512 bytes/block.  If the disk was formatted to 520 bytes per block then the total number of bytes copied would be 200 x 520 or 104,000


Feature Notes:

You will get an error message if the range is larger than the number of blocks on the disk.  Remember that disk drives start at block zero, so if your disk has 1,000,000,000 blocks, the highest block number you can read is block number 999,999,999.
The program, by design, does not buffer up the I/O.  Only the blocks you request are read from the device. Therefore, this is not an appropriate technique for fast data copy.
The starting block number and number of blocks are all decimal values (not hex).