delay.txt 694 B

123456789101112131415161718192021222324252627
  1. dm-delay
  2. ========
  3. Device-Mapper's "delay" target delays reads and/or writes
  4. and maps them to different devices.
  5. Parameters:
  6. <device> <offset> <delay> [<write_device> <write_offset> <write_delay>]
  7. With separate write parameters, the first set is only used for reads.
  8. Delays are specified in milliseconds.
  9. Example scripts
  10. ===============
  11. [[
  12. #!/bin/sh
  13. # Create device delaying rw operation for 500ms
  14. echo "0 `blockdev --getsize $1` delay $1 0 500" | dmsetup create delayed
  15. ]]
  16. [[
  17. #!/bin/sh
  18. # Create device delaying only write operation for 500ms and
  19. # splitting reads and writes to different devices $1 $2
  20. echo "0 `blockdev --getsize $1` delay $1 0 0 $2 0 500" | dmsetup create delayed
  21. ]]