NAME
disksim – disk simulator |
SYNOPSIS
aux/disksim [ –r ] [ –f file ] [ –s srvname ] [ –m mtpt ] [ diskname
] |
DESCRIPTION
Disksim presents an in–memory disk in the manner of the sd(3) device
on mtpt/diskname (default /dev/sdXX). The disk is initialized
to zeros; non–zeroed blocks written to the disk are kept in memory.
When setting disk geometry with the geometry control message, the arguments are sectors, sector size, cylinders, heads, and sectors per track. The last three may be zero for LBA disk simulations, but must be present. The –f option causes disksim to use file as the initial contents of the disk rather than a zeroed image. Changes made to the disk are written back to file unless the –r option is given.
The –s option causes disksim to post its 9P service at /srv/service. |
EXAMPLES
Disksim can be used to test programs such as fdisk and prep(8)
that expect sd(3) disks:
|
SOURCE
/sys/src/cmd/aux/disksim.c |
SEE ALSO
sd(3), prep(8) |