3 .\" Copyright 2002 Wasabi Systems, Inc.
4 .\" All rights reserved.
6 .\" Written by Jason R. Thorpe for Wasabi Systems, Inc.
8 .\" Redistribution and use in source and binary forms, with or without
9 .\" modification, are permitted provided that the following conditions
11 .\" 1. Redistributions of source code must retain the above copyright
12 .\" notice, this list of conditions and the following disclaimer.
13 .\" 2. Redistributions in binary form must reproduce the above copyright
14 .\" notice, this list of conditions and the following disclaimer in the
15 .\" documentation and/or other materials provided with the distribution.
16 .\" 3. All advertising materials mentioning features or use of this software
17 .\" must display the following acknowledgement:
18 .\" This product includes software developed for the NetBSD Project by
19 .\" Wasabi Systems, Inc.
20 .\" 4. The name of Wasabi Systems, Inc. may not be used to endorse
21 .\" or promote products derived from this software without specific prior
22 .\" written permission.
24 .\" THIS SOFTWARE IS PROVIDED BY WASABI SYSTEMS, INC. ``AS IS'' AND
25 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
26 .\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
27 .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL WASABI SYSTEMS, INC
28 .\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
29 .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
30 .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
31 .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
32 .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
33 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
34 .\" POSSIBILITY OF SUCH DAMAGE.
41 .Nd program to manipulate disks
51 allows a user or system administrator to manipulate and configure disks
53 It is used by specifying a disk to manipulate, the command
54 to perform, and any arguments the command may require.
57 is called without any command, it displays strategy, cache, and all of
58 the wedges of the specified device.
60 The following commands are supported:
61 .Bl -tag -width XXstrategyXXnameXX
63 Get and display the cache enables for the specified device.
64 .It Ic setcache Ar none | r | w | rw Op Ar save
65 Set the cache enables for the specified device.
66 The enables are as follows:
67 .Bl -tag -offset indent -width XsaveX
69 Disable all caches on the disk.
71 Enable the read cache, and disable all other caches on the disk.
73 Enable the write cache, and disable all other caches on the disk.
75 Enable both the read and write caches on the disk.
77 If specified, and the cache enables are savable, saves the cache
78 enables in the disk's non-volatile parameter storage.
80 .It Ic synccache Op Ar force
81 Causes the cache on the disk to be synchronized, flushing all dirty
82 write cache blocks to the media.
85 is specified, the cache synchronization command will be issued even
86 if the kernel does not believe that there are any dirty cache blocks
88 .It Ic keeplabel Op Ar yes | no
89 Specify to keep or drop the in-core disklabel on the last close of
96 .It Ic badsector Ar flush | list | retry
97 Used for managing the kernel's bad sector list for
100 The software bad sector list is only maintained if the option
102 was specified on kernel configuration.
103 .Bl -tag -width XflushXX -offset indent
105 Clears the in kernel list of bad sectors.
107 Prints out the list of bad sector ranges recorded by the kernel.
109 Flushes the in kernel list and then retries all of the previously recorded
110 bad sectors, causing the list to self update.
113 be used with character devices.
115 .It Ic addwedge Ar name Ar startblk Ar blkcnt Ar ptype
118 on the specified disk starting at block number
123 The wedge will have the volume name
125 and the partition type
127 The device name of the virtual block device assigned to the wedge will be
128 displayed after the wedge has been successfully created.
131 for more information about disk wedges.
132 .It Ic delwedge Ar dk
133 Delete the wedge specified by its device name
135 from the specified disk.
137 Display information about the specified disk wedge.
139 List all of the wedges configured on the specified disk.
140 .It Ic strategy Op Ar name
141 Get and set the disk I/O scheduler (buffer queue strategy) on the
143 If you do not provide a
145 argument, the currently selected strategy will be shown.
146 To set the bufq strategy, the
148 argument must be specified.
150 must be the name of one of the built-in kernel disk I/O schedulers.
151 To get the list of supported schedulers, use the following command:
152 .Bd -literal -offset indent
153 $ sysctl kern.bufq.strategies
167 command first appeared in
172 command was written by
174 of Wasabi Systems, Inc.