- Create place to store our data.
dd if=/dev/zero of=/tmp/delayed-block bs=1G count=1
OUTPUT
1+0 records in
1+0 records out
1073741824 bytes (1,1 GB, 1,0 GiB) copied, 5,24011 s, 205 MB/s
- Create a loop device
losetup --find --show /tmp/delayed-block
OUTPUT
/dev/loop5
- Create a delayed mapper using dm-delay
echo "0 `blockdev --getsz /dev/loop0` delay /dev/loop5 0 <milliseconds> | dmsetup create delayed-device"
- Format and mount the delayed device to folder
mkfs.ext4 /dev/mapper/delayed-device
mkdir ~/delayed-folder
mount -o sync /dev/mapper/delayed-device ~/delayed-folder
we must select sync option to prevent kernel enhancements.
Top comments (0)