First, you must understand two special devices:
/Dev/null: Recycle Bin, bottomless pit
/Dev/zero: generate characters
Test the disk write capability
Time dd if =/dev/zero of =/test. dbf bs = 8 k count = 300000
Because/dev // zero is a pseudo device, it only produces a null compaction stream and does not generate IO for it. Therefore, IO is concentrated in the of file, and the of file is only used for writing, therefore, this command is equivalent to testing the disk write capability.
Testing disk read capability
Time dd if =/dev/sdb1 of =/dev/null bs = 8 k
Because/dev/sdb1 is a physical partition, reading it will generate IO,/dev/null is a pseudo device, which is equivalent to a black hole, of this device will not generate IO, so, the IO of this command only occurs on/dev/sdb1, which is equivalent to testing the disk's read capability.
Testing the simultaneous read/write capability
Time dd if =/dev/sdb1 of =/test1.dbf bs = 8 k
In this command, one is a physical partition and the other is an actual file. IO is generated for reading and writing them (read for/dev/sdb1 and write for/test1.dbf ), if they are all in one disk, this command is equivalent to testing the disk's simultaneous read/write capability.