dm-flakey.txt 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. dm-flakey
  2. =========
  3. This target is the same as the linear target except that it exhibits
  4. unreliable behaviour periodically. It's been found useful in simulating
  5. failing devices for testing purposes.
  6. Starting from the time the table is loaded, the device is available for
  7. <up interval> seconds, then exhibits unreliable behaviour for <down
  8. interval> seconds, and then this cycle repeats.
  9. Also, consider using this in combination with the dm-delay target too,
  10. which can delay reads and writes and/or send them to different
  11. underlying devices.
  12. Table parameters
  13. ----------------
  14. <dev path> <offset> <up interval> <down interval> \
  15. [<num_features> [<feature arguments>]]
  16. Mandatory parameters:
  17. <dev path>: Full pathname to the underlying block-device, or a
  18. "major:minor" device-number.
  19. <offset>: Starting sector within the device.
  20. <up interval>: Number of seconds device is available.
  21. <down interval>: Number of seconds device returns errors.
  22. Optional feature parameters:
  23. If no feature parameters are present, during the periods of
  24. unreliability, all I/O returns errors.
  25. drop_writes:
  26. All write I/O is silently ignored.
  27. Read I/O is handled correctly.
  28. corrupt_bio_byte <Nth_byte> <direction> <value> <flags>:
  29. During <down interval>, replace <Nth_byte> of the data of
  30. each matching bio with <value>.
  31. <Nth_byte>: The offset of the byte to replace.
  32. Counting starts at 1, to replace the first byte.
  33. <direction>: Either 'r' to corrupt reads or 'w' to corrupt writes.
  34. 'w' is incompatible with drop_writes.
  35. <value>: The value (from 0-255) to write.
  36. <flags>: Perform the replacement only if bio->bi_opf has all the
  37. selected flags set.
  38. Examples:
  39. corrupt_bio_byte 32 r 1 0
  40. - replaces the 32nd byte of READ bios with the value 1
  41. corrupt_bio_byte 224 w 0 32
  42. - replaces the 224th byte of REQ_META (=32) bios with the value 0