3 disksim \- disk simulator
26 presents an in-memory disk in the manner of the
32 The disk is initialized to zeros;
33 non-zeroed blocks written to the disk are kept in memory.
35 When setting disk geometry with the
39 sectors, sector size, cylinders, heads, and sectors per track.
40 The last three may be zero for LBA disk simulations,
49 as the initial contents of the disk rather than a zeroed image.
50 Changes made to the disk are written back to
60 to post its 9P service at
61 .BI /srv/ service \fR.
64 can be used to test programs such as
74 echo geometry 40000 512 0 0 0 >/dev/sdXX/ctl # 20MB
75 disk/mbr /dev/sdXX/data
76 disk/fdisk -baw /dev/sdXX/data
77 disk/prep /dev/sdXX/plan9
81 is useful for creating very large but mostly zeroed files
82 for testing other programs.
85 handling of large files:
88 for(i in sdXX sdYY sdZZ) aux/disksim $i
89 echo geometry 40000000 512 0 0 0 >/dev/sdXX/ctl # 20GB
90 echo geometry 10000000 512 0 0 0 >/dev/sdYY/ctl # 5GB
91 echo geometry 20000000 512 0 0 0 >/dev/sdZZ/ctl # 10GB
92 tar cf /dev/sdXX/data /dev/sdYY/data /dev/sdZZ/data
93 tar tvf /dev/sdXX/data
96 .B /sys/src/cmd/aux/disksim.c