DKCTL(8) BSD System Manager's Manual DKCTL(8)
dkctl -- a program to manipulate disks
dkctl device command [arg [...]]
dkctl allows a user or system administrator to manipulate and configure
disks in various ways. It is used by specifying a disk to manipulate,
the command to perform, and any arguments the command may require.
The following commands are supported:
Get and display the cache enables for the specified device.
setcache none | r | w | rw [save]
Set the cache enables for the specified device. The enables are as fol-
none Disable all caches on the disk.
r Enable the read cache, and disable all other caches on the disk.
w Enable the write cache, and disable all other caches on the disk.
rw Enable both the read and write caches on the disk.
save If specified, and the cache enables are savable, saves the cache
enables in the disk's non-volatile parameter storage.
Causes the cache on the disk to be synchronized, flushing all dirty write
cache blocks to the media. If force is specified, the cache synchroniza-
tion command will be issued even if the kernel does not believe that
there are any dirty cache blocks in the disk's cache.
keeplabel [yes | no]
Specify to keep or drop the in-core disklabel on the last close of the
disk device. (Keep if yes is specified, drop if no is specified.)
badsector flush | list | retry
Used for managing the kernel's bad sector list for wd* devices.
flush Clears the in kernel list of bad sectors.
list Prints out the list of bad sector ranges recorded by the kernel.
retry Flushes the in kernel list and then retries all of the previously
recorded bad sectors, causing the list to self update. This
option can only be used with character devices.
ioctl(2), sd(4), wd(4), disklabel(5)
The dkctl command first appeared in NetBSD 1.6.
The dkctl command was written by Jason R. Thorpe of Wasabi Systems, Inc.
BSD July 13, 2003 BSD