Create virtual block device which writes to /dev/null

See Documentation/device-mapper/zero.txt for usage. This target has no target-specific parameters.

The "zero" target create that functions similarly to /dev/zero: All reads return binary zero, and all writes are discarded. Normally used in tests [...]

This creates a 1GB (1953125-sector) zero target:

root# dmsetup create 1gb-zero --table '0 1953125 zero'

If you don't need it to have a specific limited size, you can just use /dev/zero directly. Technically it's a character device, not block.

/dev/zero discards writes like /dev/null but reads as zero instead of EOF.

As documented in the man page, on Linux you can make your own under any name with
mknod -m 666 /dev/zero c 1 5 Or of course make a symlink to /dev/zero.