| @@ -1,124 +1,130 @@ | | | @@ -1,124 +1,130 @@ |
1 | .\" $NetBSD: dk.4,v 1.9 2021/01/06 10:19:27 wiz Exp $ | | 1 | .\" $NetBSD: dk.4,v 1.10 2021/01/06 14:07:43 wiz Exp $ |
2 | .\" | | 2 | .\" |
3 | .\" Copyright (c) 2006 The NetBSD Foundation, Inc. | | 3 | .\" Copyright (c) 2006 The NetBSD Foundation, Inc. |
4 | .\" All rights reserved. | | 4 | .\" All rights reserved. |
5 | .\" | | 5 | .\" |
6 | .\" This code is derived from software contributed to The NetBSD Foundation | | 6 | .\" This code is derived from software contributed to The NetBSD Foundation |
7 | .\" by Jason R. Thorpe. | | 7 | .\" by Jason R. Thorpe. |
8 | .\" | | 8 | .\" |
9 | .\" Redistribution and use in source and binary forms, with or without | | 9 | .\" Redistribution and use in source and binary forms, with or without |
10 | .\" modification, are permitted provided that the following conditions | | 10 | .\" modification, are permitted provided that the following conditions |
11 | .\" are met: | | 11 | .\" are met: |
12 | .\" 1. Redistributions of source code must retain the above copyright | | 12 | .\" 1. Redistributions of source code must retain the above copyright |
13 | .\" notice, this list of conditions and the following disclaimer. | | 13 | .\" notice, this list of conditions and the following disclaimer. |
14 | .\" 2. Redistributions in binary form must reproduce the above copyright | | 14 | .\" 2. Redistributions in binary form must reproduce the above copyright |
15 | .\" notice, this list of conditions and the following disclaimer in the | | 15 | .\" notice, this list of conditions and the following disclaimer in the |
16 | .\" documentation and/or other materials provided with the distribution. | | 16 | .\" documentation and/or other materials provided with the distribution. |
17 | .\" | | 17 | .\" |
18 | .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS | | 18 | .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS |
19 | .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED | | 19 | .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED |
20 | .\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | | 20 | .\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
21 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS | | 21 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS |
22 | .\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | | 22 | .\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
23 | .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | | 23 | .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
24 | .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | | 24 | .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
25 | .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | | 25 | .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
26 | .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | | 26 | .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
27 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | | 27 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
28 | .\" POSSIBILITY OF SUCH DAMAGE. | | 28 | .\" POSSIBILITY OF SUCH DAMAGE. |
29 | .\" | | 29 | .\" |
30 | .\" Jonathan A. Kollasch used vnd(4) as the template for this man page. | | 30 | .\" Jonathan A. Kollasch used vnd(4) as the template for this man page. |
31 | .\" | | 31 | .\" |
32 | .Dd October 26, 2020 | | 32 | .Dd October 26, 2020 |
33 | .Dt DK 4 | | 33 | .Dt DK 4 |
34 | .Os | | 34 | .Os |
35 | .Sh NAME | | 35 | .Sh NAME |
36 | .Nm dk | | 36 | .Nm dk |
37 | .Nd disk partition | | 37 | .Nd disk partition |
38 | .Pq wedge | | 38 | .Pq wedge |
39 | driver | | 39 | driver |
40 | .Sh SYNOPSIS | | 40 | .Sh SYNOPSIS |
41 | .Cd "options DKWEDGE_AUTODISCOVER" | | 41 | .Cd "options DKWEDGE_AUTODISCOVER" |
42 | .Cd "options DKWEDGE_METHOD_BSDLABEL" | | 42 | .Cd "options DKWEDGE_METHOD_BSDLABEL" |
43 | .Cd "options DKWEDGE_METHOD_GPT" | | 43 | .Cd "options DKWEDGE_METHOD_GPT" |
44 | .Cd "options DKWEDGE_METHOD_MBR" | | 44 | .Cd "options DKWEDGE_METHOD_MBR" |
45 | .Cd "options DKWEDGE_METHOD_RDB" | | 45 | .Cd "options DKWEDGE_METHOD_RDB" |
46 | .Cd "options DKWEDGE_METHOD_APPLE" | | 46 | .Cd "options DKWEDGE_METHOD_APPLE" |
47 | .Sh DESCRIPTION | | 47 | .Sh DESCRIPTION |
48 | The | | 48 | The |
49 | .Nm | | 49 | .Nm |
50 | driver provides a disk-like interface, or | | 50 | driver provides a disk-like interface, or |
51 | .Em wedge , | | 51 | .Em wedge , |
52 | to an area of a physical disk. | | 52 | to an area of a physical disk. |
53 | Wedges may be configured manually with | | 53 | Wedges may be configured manually with |
54 | .Xr dkctl 8 | | 54 | .Xr dkctl 8 |
55 | or automatically by the kernel upon the attachment of the physical disk. | | 55 | or automatically by the kernel upon the attachment of the physical disk. |
| | | 56 | .Pp |
56 | Wedges needs to have a unique name. | | 57 | Wedges needs to have a unique name. |
57 | If a duplicate name is detected during | | 58 | If a duplicate name is detected during |
58 | auto-discovery, that partition is ignored. | | 59 | auto-discovery, that partition is ignored. |
59 | .Sh KERNEL OPTIONS | | 60 | .Sh KERNEL OPTIONS |
60 | .Bl -tag -width DKWEDGE_METHOD_BSDLABEL | | 61 | .Bl -tag -width DKWEDGE_METHOD_BSDLABEL |
61 | .It Dv DKWEDGE_AUTODISCOVER | | 62 | .It Dv DKWEDGE_AUTODISCOVER |
62 | Automatically detect and configure wedges using any available methods. | | 63 | Automatically detect and configure wedges using any available methods. |
| | | 64 | .Pp |
63 | Currently only | | 65 | Currently only |
64 | .Dv DKWEDGE_METHOD_GPT | | 66 | .Dv DKWEDGE_METHOD_GPT |
65 | and | | 67 | and |
66 | .Dv DKWEDGE_METHOD_APPLE | | 68 | .Dv DKWEDGE_METHOD_APPLE |
67 | are enabled by default. | | 69 | are enabled by default. |
| | | 70 | .Pp |
68 | For each partition found, a wedge with a corresponding name is created. | | 71 | For each partition found, a wedge with a corresponding name is created. |
69 | .It Dv DKWEDGE_METHOD_BSDLABEL | | 72 | .It Dv DKWEDGE_METHOD_BSDLABEL |
70 | BSD disklabel detection method. | | 73 | BSD disklabel detection method. |
71 | For each configured partition in the | | 74 | For each configured partition in the |
72 | .Xr disklabel 5 | | 75 | .Xr disklabel 5 |
73 | that is not of type | | 76 | that is not of type |
74 | .Dv FS_UNUSED , | | 77 | .Dv FS_UNUSED , |
75 | a wedge is created and named after the | | 78 | a wedge is created and named after the |
76 | .Va d_packname | | 79 | .Va d_packname |
77 | field followed by "/" and the partition letter a..p. | | 80 | field followed by "/" and the partition letter a..p. |
| | | 81 | .Pp |
78 | When the | | 82 | When the |
79 | .Va d_packname | | 83 | .Va d_packname |
80 | is empty or has the value "fictitious", the regular partition names | | 84 | is empty or has the value "fictitious", the regular partition names |
81 | are used as wedge names, i.e. the device name, unit number and | | 85 | are used as wedge names, i.e. the device name, unit number and |
82 | partition letter, for example "wd0a". | | 86 | partition letter, for example "wd0a". |
83 | .It Dv DKWEDGE_METHOD_GPT | | 87 | .It Dv DKWEDGE_METHOD_GPT |
84 | Extensible Firmware Interface Globally Unique Identifier Partition Table | | 88 | Extensible Firmware Interface Globally Unique Identifier Partition Table |
85 | (GPT) detection method. | | 89 | (GPT) detection method. |
| | | 90 | .Pp |
86 | For every GPT partition a wedge is created and named after the | | 91 | For every GPT partition a wedge is created and named after the |
87 | partition label. | | 92 | partition label. |
88 | GPT partitions are UTF-16-encoded, this is converted into UTF-8. | | 93 | GPT partitions are UTF-16-encoded, this is converted into UTF-8. |
89 | If a partition has no label, its UUID is used instead. | | 94 | If a partition has no label, its UUID is used instead. |
90 | .It Dv DKWEDGE_METHOD_MBR | | 95 | .It Dv DKWEDGE_METHOD_MBR |
91 | IBM PC-compatible Master Boot Record (MBR) partitioning detection method, | | 96 | IBM PC-compatible Master Boot Record (MBR) partitioning detection method, |
92 | with support for Extended MBRs. | | 97 | with support for Extended MBRs. |
| | | 98 | .Pp |
93 | For every partition in the MBR a wedge is created and named like a | | 99 | For every partition in the MBR a wedge is created and named like a |
94 | regular partition name, i.e. the device name, unit number and a | | 100 | regular partition name, i.e. the device name, unit number and a |
95 | partition letter, for example "wd0e". | | 101 | partition letter, for example "wd0e". |
96 | Primary partitions start with "e", extended partitions start with "i". | | 102 | Primary partitions start with "e", extended partitions start with "i". |
97 | .It Dv DKWEDGE_METHOD_RDB | | 103 | .It Dv DKWEDGE_METHOD_RDB |
98 | Amiga Rigid Disk Block (RDB) partitioning detection method. | | 104 | Amiga Rigid Disk Block (RDB) partitioning detection method. |
99 | .It Dv DKWEDGE_METHOD_APPLE | | 105 | .It Dv DKWEDGE_METHOD_APPLE |
100 | Apple partition map detection method. | | 106 | Apple partition map detection method. |
101 | .El | | 107 | .El |
102 | .Sh FILES | | 108 | .Sh FILES |
103 | .Bl -tag -width /dev/XXrXdkX -compact | | 109 | .Bl -tag -width /dev/XXrXdkX -compact |
104 | .It Pa /dev/{,r}dk* | | 110 | .It Pa /dev/{,r}dk* |
105 | .Nm | | 111 | .Nm |
106 | device special files. | | 112 | device special files. |
107 | .El | | 113 | .El |
108 | .Sh SEE ALSO | | 114 | .Sh SEE ALSO |
109 | .Xr config 1 , | | 115 | .Xr config 1 , |
110 | .Xr disklabel 8 , | | 116 | .Xr disklabel 8 , |
111 | .Xr dkctl 8 , | | 117 | .Xr dkctl 8 , |
112 | .Xr fdisk 8 , | | 118 | .Xr fdisk 8 , |
113 | .Xr gpt 8 , | | 119 | .Xr gpt 8 , |
114 | .Xr MAKEDEV 8 | | 120 | .Xr MAKEDEV 8 |
115 | .Sh HISTORY | | 121 | .Sh HISTORY |
116 | The | | 122 | The |
117 | .Nm | | 123 | .Nm |
118 | driver first appeared in | | 124 | driver first appeared in |
119 | .Nx 3.0 . | | 125 | .Nx 3.0 . |
120 | .Sh AUTHORS | | 126 | .Sh AUTHORS |
121 | The | | 127 | The |
122 | .Nm | | 128 | .Nm |
123 | driver was written by | | 129 | driver was written by |
124 | .An Jason R. Thorpe . | | 130 | .An Jason R. Thorpe . |