|
Lines 4-231
Link Here
|
| 4 |
]> |
4 |
]> |
| 5 |
<!-- $FreeBSD: doc/en_US.ISO_8859-1/articles/formatting-media/article.sgml,v 1.8 1999/10/04 21:48:24 jesusr Exp $ --> |
5 |
<!-- $FreeBSD: doc/en_US.ISO_8859-1/articles/formatting-media/article.sgml,v 1.8 1999/10/04 21:48:24 jesusr Exp $ --> |
| 6 |
<article> |
6 |
<article> |
|
|
7 |
<artheader> |
| 8 |
<title>Formatting Media For Use With FreeBSD 2.2-RELEASE</title> |
| 7 |
|
9 |
|
| 8 |
<artheader> |
10 |
<subtitle>A Tutorial</subtitle> |
| 9 |
<title>Formatting Media For Use With FreeBSD 2.2-RELEASE</title> |
11 |
|
| 10 |
<subtitle>A Tutorial</subtitle> |
12 |
<authorgroup> |
| 11 |
|
13 |
<author> |
| 12 |
<authorgroup> |
14 |
<firstname>Doug</firstname> |
| 13 |
<author> |
15 |
|
| 14 |
<firstname>Doug</firstname> |
16 |
<surname>White</surname> |
| 15 |
<surname>White</surname> |
17 |
|
| 16 |
<affiliation> |
18 |
<affiliation> |
| 17 |
<address><email>dwhite@resnet.uoregon.edu</email></address> |
19 |
<address> |
| 18 |
</affiliation> |
20 |
<email>dwhite@resnet.uoregon.edu</email> |
| 19 |
</author> |
21 |
</address> |
| 20 |
</authorgroup> |
22 |
</affiliation> |
| 21 |
|
23 |
</author> |
| 22 |
<pubdate>March 1997</pubdate> |
24 |
</authorgroup> |
| 23 |
<abstract><para>This document describes how to slice, partition, and |
25 |
|
| 24 |
format hard disk drives and similar media for use with FreeBSD. The |
26 |
<pubdate>March 1997</pubdate> |
| 25 |
examples given have been tested under FreeBSD 2.2-GAMMA and may work |
27 |
|
| 26 |
for other releases. </para> |
28 |
<abstract> |
| 27 |
</abstract> |
29 |
<para>This document describes how to slice, partition, and |
| 28 |
</artheader> |
30 |
format hard disk drives and similar media for use with |
| 29 |
|
31 |
FreeBSD. The examples given have been tested under FreeBSD |
| 30 |
<sect1> |
32 |
2.2-GAMMA and may work for other releases.</para> |
| 31 |
<title>Introduction & Definitions</title> |
33 |
</abstract> |
| 32 |
|
34 |
</artheader> |
| 33 |
<sect2> |
35 |
|
| 34 |
<title>Overview</title> |
36 |
<sect1> |
| 35 |
<para>Successfully adding disks to an existing system is the mark of an |
37 |
<title>Introduction & Definitions</title> |
| 36 |
experienced system administrator. Slicing, partitioning, and adding |
38 |
|
| 37 |
disks requires a careful dance of proper command and name syntax. One |
39 |
<sect2> |
| 38 |
slipped finger and an entire disk could disappear in seconds. This |
40 |
<title>Overview</title> |
| 39 |
document is written in an attempt to simplify this process and avoid |
41 |
|
| 40 |
accidents. Thankfully, enhancements to existing tools (notably |
42 |
<para>Successfully adding disks to an existing system is the |
| 41 |
sysinstall) have greatly improved this process in recent releases of |
43 |
mark of an experienced system administrator. Slicing, |
| 42 |
FreeBSD. </para> |
44 |
partitioning, and adding disks requires a careful dance of |
| 43 |
|
45 |
proper command and name syntax. One slipped finger and an |
| 44 |
<para>There are two possible modes of disk formatting: |
46 |
entire disk could disappear in seconds. This document is |
| 45 |
</para> |
47 |
written in an attempt to simplify this process and avoid |
| 46 |
<itemizedlist> |
48 |
accidents. Thankfully, enhancements to existing tools |
| 47 |
|
49 |
(notably sysinstall) have greatly improved this process in |
| 48 |
<listitem><para><firstterm>compatibility mode</firstterm>: Arranging a |
50 |
recent releases of FreeBSD.</para> |
| 49 |
disk so that it has a slice table for use with other operating |
51 |
|
| 50 |
systems.</para> </listitem> |
52 |
<para>There are two possible modes of disk formatting:</para> |
| 51 |
|
53 |
|
| 52 |
<listitem><para><firstterm>dangerously dedicated mode</firstterm>: |
54 |
<itemizedlist> |
| 53 |
Formatting a disk with no slice table. This makes the process of |
55 |
<listitem> |
| 54 |
adding disks easier, however non-FreeBSD operating systems may not |
56 |
<para><firstterm>compatibility mode</firstterm>: Arranging a |
| 55 |
accept the disk. </para> </listitem> |
57 |
disk so that it has a slice table for use with other |
| 56 |
</itemizedlist> |
58 |
operating systems.</para> |
| 57 |
|
59 |
</listitem> |
| 58 |
<para>For most cases, dedicated mode is the easiest to set up and use |
60 |
|
| 59 |
in existing systems, as a new disk is usually dedicated entirely to |
61 |
<listitem> |
| 60 |
FreeBSD. However, compatibility mode insures optimum interoperability |
62 |
<para><firstterm>dangerously dedicated mode</firstterm>: |
| 61 |
with future installations at a cost of increased complexity.</para> |
63 |
Formatting a disk with no slice table. This makes the |
| 62 |
|
64 |
process of adding disks easier, however non-FreeBSD |
| 63 |
<para>In addition to selecting the mode, two methods of slicing the |
65 |
operating systems may not accept the disk.</para> |
| 64 |
disk are available. One is using the system installation tool |
66 |
</listitem> |
| 65 |
<command>/stand/sysinstall</command>. 2.1.7-RELEASE and later |
67 |
</itemizedlist> |
| 66 |
versions of <command>sysinstall</command> contain code to ease setup |
68 |
|
| 67 |
of disks during normal system operation, mainly allowing access to the |
69 |
<para>For most cases, dedicated mode is the easiest to set up |
| 68 |
Label and Partition editors and a Write feature which will update just |
70 |
and use in existing systems, as a new disk is usually |
| 69 |
the selected disk and slice without affecting other disks. The other |
71 |
dedicated entirely to FreeBSD. However, compatibility mode |
| 70 |
method is running the tools manually from a root command line. For |
72 |
insures optimum interoperability with future installations at |
| 71 |
dangerously dedicated mode, only three or four commands are involved |
73 |
a cost of increased complexity.</para> |
| 72 |
while <command>sysinstall</command> requires some manipulation.</para> |
74 |
|
| 73 |
</sect2> |
75 |
<para>In addition to selecting the mode, two methods of slicing |
| 74 |
<sect2> |
76 |
the disk are available. One is using the system installation |
| 75 |
<title>Definitions</title> |
77 |
tool <command>/stand/sysinstall</command>. 2.1.7-RELEASE and |
| 76 |
|
78 |
later versions of <command>sysinstall</command> contain code |
| 77 |
<para>UNIX disk management over the centuries has invented many new |
79 |
to ease setup of disks during normal system operation, mainly |
| 78 |
definitions for old words. The following glossary covers the |
80 |
allowing access to the Label and Partition editors and a Write |
| 79 |
definitions used in this document and (hopefully) for FreeBSD in |
81 |
feature which will update just the selected disk and slice |
| 80 |
general. </para> |
82 |
without affecting other disks. The other method is running |
|
|
83 |
the tools manually from a root command line. For dangerously |
| 84 |
dedicated mode, only three or four commands are involved while |
| 85 |
<command>sysinstall</command> requires some |
| 86 |
manipulation.</para> |
| 87 |
</sect2> |
| 88 |
|
| 89 |
<sect2> |
| 90 |
<title>Definitions</title> |
| 91 |
|
| 92 |
<para>UNIX disk management over the centuries has invented many |
| 93 |
new definitions for old words. The following glossary covers |
| 94 |
the definitions used in this document and (hopefully) for |
| 95 |
FreeBSD in general.</para> |
| 81 |
|
96 |
|
| 82 |
<!-- I'm tempted to use GLOSSARY here but will resort to a list for |
97 |
<!-- I'm tempted to use GLOSSARY here but will resort to a list for |
| 83 |
now. --> |
98 |
now. --> |
| 84 |
|
99 |
|
| 85 |
<itemizedlist> |
100 |
<itemizedlist> |
| 86 |
<listitem><para>compatibility mode: Arranging a disk so that it has a slice |
101 |
<listitem> |
| 87 |
table for use with other operating systems. Oppose dangerously |
102 |
<para>compatibility mode: Arranging a disk so that it has a |
| 88 |
dedicated mode.</para></listitem> |
103 |
slice table for use with other operating systems. Oppose |
| 89 |
|
104 |
dangerously dedicated mode.</para> |
| 90 |
<listitem><para>dangerously dedicated mode: Formatting a disk with no slice |
105 |
</listitem> |
| 91 |
table. This makes the process of adding disks easier, however |
106 |
|
| 92 |
non-FreeBSD operating systems may not accept the disk. Oppose |
107 |
<listitem> |
| 93 |
compatibility mode.</para></listitem> |
108 |
<para>dangerously dedicated mode: Formatting a disk with no |
| 94 |
|
109 |
slice table. This makes the process of adding disks |
| 95 |
<listitem><para>disk: A circular disc, covered with magnetic or similarly |
110 |
easier, however non-FreeBSD operating systems may not |
| 96 |
manipulable material, spun by a motor under a head. Data is stored on |
111 |
accept the disk. Oppose compatibility mode.</para> |
| 97 |
the disk by changing the pattern of magnetism on the disc, which can |
112 |
</listitem> |
| 98 |
be later read. Hard disks, CD-ROMs, Magneto-optical,and Zip/Jaz |
113 |
|
| 99 |
removables are examples of disks.</para></listitem> |
114 |
<listitem> |
| 100 |
|
115 |
<para>disk: A circular disc, covered with magnetic or |
| 101 |
<listitem><para>slice: A division of a disk. Up to four slices are permitted on one |
116 |
similarly manipulable material, spun by a motor under a |
| 102 |
disk in the PC standard. Slices are composed of contiguous sectors. |
117 |
head. Data is stored on the disk by changing the pattern |
| 103 |
Slices are recorded in a <quote>slice table</quote> used by the system BIOS to |
118 |
of magnetism on the disc, which can be later read. Hard |
| 104 |
locate bootable partitions. The slice table is usually called the |
119 |
disks, CD-ROMs, Magneto-optical,and Zip/Jaz removables are |
| 105 |
Partition Table in DOS parlance. Maintained by the fdisk utility.</para></listitem> |
120 |
examples of disks.</para> |
| 106 |
|
121 |
</listitem> |
| 107 |
<listitem><para>partition: A division of a slice. Usually used in reference |
122 |
|
| 108 |
to divisions of the FreeBSD slice of a disk. Each filesystem and swap |
123 |
<listitem> |
| 109 |
area on a disk resides in a partition. Maintained using the disklabel |
124 |
<para>slice: A division of a disk. Up to four slices are |
| 110 |
utility.</para></listitem> |
125 |
permitted on one disk in the PC standard. Slices are |
|
|
126 |
composed of contiguous sectors. Slices are recorded in a |
| 127 |
<quote>slice table</quote> used by the system BIOS to |
| 128 |
locate bootable partitions. The slice table is usually |
| 129 |
called the Partition Table in DOS parlance. Maintained by |
| 130 |
the fdisk utility.</para> |
| 131 |
</listitem> |
| 132 |
|
| 133 |
<listitem> |
| 134 |
<para>partition: A division of a slice. Usually used in |
| 135 |
reference to divisions of the FreeBSD slice of a disk. |
| 136 |
Each filesystem and swap area on a disk resides in a |
| 137 |
partition. Maintained using the disklabel utility.</para> |
| 138 |
</listitem> |
| 111 |
|
139 |
|
| 112 |
<listitem><para>sector: Smallest subdivision of a disk. One sector usually |
140 |
<listitem> |
| 113 |
represents 512 bytes of data.</para></listitem> |
141 |
<para>sector: Smallest subdivision of a disk. One sector |
| 114 |
|
142 |
usually represents 512 bytes of data.</para> |
| 115 |
</itemizedlist> |
143 |
</listitem> |
| 116 |
</sect2> |
144 |
</itemizedlist> |
| 117 |
|
145 |
</sect2> |
| 118 |
<sect2> |
146 |
|
| 119 |
<title>Warnings & Pitfalls</title> |
147 |
<sect2> |
| 120 |
|
148 |
<title>Warnings & Pitfalls</title> |
| 121 |
<para>Building disks is not something to take lightly. It is quite possible |
149 |
|
| 122 |
to destroy the contents of other disks in your system if the proper |
150 |
<para>Building disks is not something to take lightly. It is |
| 123 |
precautions are not taken.</para> |
151 |
quite possible to destroy the contents of other disks in your |
| 124 |
|
152 |
system if the proper precautions are not taken.</para> |
| 125 |
<para><emphasis>Check your work carefully.</> It is very simple to destroy |
153 |
|
| 126 |
the incorrect disk when working with these commands. When |
154 |
<para><emphasis>Check your work carefully.</> It is very simple |
| 127 |
in doubt consult the kernel boot output for the proper device.</para> |
155 |
to destroy the incorrect disk when working with these |
| 128 |
|
156 |
commands. When in doubt consult the kernel boot output for |
| 129 |
<para>Needless to say, we are not responsible for any damage to any data |
157 |
the proper device.</para> |
| 130 |
or hardware that you may experience. You work at your own risk!</para> |
158 |
|
| 131 |
|
159 |
<para>Needless to say, we are not responsible for any damage to |
| 132 |
</sect2> |
160 |
any data or hardware that you may experience. You work at |
|
|
161 |
your own risk!</para> |
| 162 |
</sect2> |
| 163 |
|
| 164 |
<sect2> |
| 165 |
<title>Zip, Jaz, and Other Removables</title> |
| 166 |
|
| 167 |
<para>Removable disks can be formatted in the same way as normal |
| 168 |
hard disks. It is essential to have the disk drive connected |
| 169 |
to the system and a disk placed in the drive during startup, |
| 170 |
so the kernel can determine the drive's geometry. Check the |
| 171 |
<command>dmesg</command> output and make sure your device and |
| 172 |
the disk's size is listed. If the kernel reports |
| 133 |
|
173 |
|
| 134 |
<sect2> |
|
|
| 135 |
<title>Zip, Jaz, and Other Removables</title> |
| 136 |
|
| 137 |
<para>Removable disks can be formatted in the same way as normal hard |
| 138 |
disks. It is essential to have the disk drive connected to the system |
| 139 |
and a disk placed in the drive during startup, so the kernel can |
| 140 |
determine the drive's geometry. Check the <command>dmesg</command> |
| 141 |
output and make sure your device and the disk's size is listed. If |
| 142 |
the kernel reports |
| 143 |
<informalexample> |
174 |
<informalexample> |
| 144 |
<screen> |
175 |
<screen> |
| 145 |
Can't get the size |
176 |
Can't get the size |
| 146 |
</screen> |
177 |
</screen> |
| 147 |
</informalexample> |
178 |
</informalexample> |
| 148 |
then the disk was not in the drive. In this case, you will need to restart the |
|
|
| 149 |
machine before attempting to format disks. |
| 150 |
</para> |
| 151 |
</sect2> |
| 152 |
|
| 153 |
</sect1> |
| 154 |
<sect1> |
| 155 |
<title>Formatting Disks in Dedicated Mode</title> |
| 156 |
|
| 157 |
<sect2> |
| 158 |
<title>Introduction</title> |
| 159 |
|
| 160 |
<para>This section details how to make disks that are totally dedicated to |
| 161 |
FreeBSD. Remember, dedicated mode disks cannot be booted by the PC |
| 162 |
architecture.</para> |
| 163 |
|
| 164 |
</sect2> |
| 165 |
<sect2> |
| 166 |
<title>Making Dedicated Mode Disks using Sysinstall</title> |
| 167 |
|
| 168 |
<para><command>/stand/sysinstall</command>, the system installation |
| 169 |
utility, has been expanded in recent versions to make the process of |
| 170 |
dividing disks properly a less tiring affair. The fdisk and disklabel |
| 171 |
editors built into sysinstall are GUI tools that remove much of the |
| 172 |
confusion from slicing disks. For FreeBSD versions 2.1.7 and later, |
| 173 |
this is perhaps the simplest way to slice disks.</para> |
| 174 |
|
179 |
|
| 175 |
<procedure> |
180 |
then the disk was not in the drive. In this case, you will |
| 176 |
<step><para>Start sysinstall as root by typing |
181 |
need to restart the machine before attempting to format |
|
|
182 |
disks.</para> |
| 183 |
</sect2> |
| 184 |
</sect1> |
| 185 |
|
| 186 |
<sect1> |
| 187 |
<title>Formatting Disks in Dedicated Mode</title> |
| 188 |
|
| 189 |
<sect2> |
| 190 |
<title>Introduction</title> |
| 191 |
|
| 192 |
<para>This section details how to make disks that are totally |
| 193 |
dedicated to FreeBSD. Remember, dedicated mode disks cannot |
| 194 |
be booted by the PC architecture.</para> |
| 195 |
</sect2> |
| 196 |
|
| 197 |
<sect2> |
| 198 |
<title>Making Dedicated Mode Disks using Sysinstall</title> |
| 199 |
|
| 200 |
<para><command>/stand/sysinstall</command>, the system |
| 201 |
installation utility, has been expanded in recent versions to |
| 202 |
make the process of dividing disks properly a less tiring |
| 203 |
affair. The fdisk and disklabel editors built into sysinstall |
| 204 |
are GUI tools that remove much of the confusion from slicing |
| 205 |
disks. For FreeBSD versions 2.1.7 and later, this is perhaps |
| 206 |
the simplest way to slice disks.</para> |
| 207 |
|
| 208 |
<procedure> |
| 209 |
<step> |
| 210 |
<para>Start sysinstall as root by typing |
| 211 |
|
| 177 |
<informalexample> |
212 |
<informalexample> |
| 178 |
<screen>&prompt.root; <userinput>/stand/sysinstall</userinput></screen> |
213 |
<screen> |
|
|
214 |
&prompt.root; <userinput>/stand/sysinstall</userinput> |
| 215 |
</screen> |
| 179 |
</informalexample> |
216 |
</informalexample> |
| 180 |
from the command prompt.</para></step> |
|
|
| 181 |
|
217 |
|
| 182 |
<step><para>Select <command>Index</command>.</para></step> |
218 |
from the command prompt.</para> |
| 183 |
<step><para>Select <command>Partition</command>.</para></step> |
219 |
</step> |
| 184 |
<step><para>Select the disk to edit with arrow keys and |
220 |
|
| 185 |
<keycap>SPACE</keycap>.</para> |
221 |
<step> |
| 186 |
</step> |
222 |
<para>Select <command>Index</command>.</para> |
| 187 |
<step><para>If you are using this entire disk for FreeBSD, select |
223 |
</step> |
| 188 |
<command>A</command>.</para></step> |
224 |
|
| 189 |
<step><para>When asked: |
225 |
<step> |
|
|
226 |
<para>Select <command>Partition</command>.</para> |
| 227 |
</step> |
| 228 |
|
| 229 |
<step> |
| 230 |
<para>Select the disk to edit with arrow keys and |
| 231 |
<keycap>SPACE</keycap>.</para> |
| 232 |
</step> |
| 233 |
|
| 234 |
<step> |
| 235 |
<para>If you are using this entire disk for FreeBSD, select |
| 236 |
<command>A</command>.</para> |
| 237 |
</step> |
| 238 |
|
| 239 |
<step> |
| 240 |
<para>When asked: |
| 241 |
|
| 190 |
<informalexample> |
242 |
<informalexample> |
| 191 |
<screen> |
243 |
<screen> |
| 192 |
Do you want to do this with a true partition entry so as to remain |
244 |
Do you want to do this with a true partition entry so as to remain |
| 193 |
cooperative with any future possible operating systems on the |
245 |
cooperative with any future possible operating systems on the |
| 194 |
drive(s)? |
246 |
drive(s)? |
| 195 |
</screen> |
247 |
</screen> |
| 196 |
</informalexample>answer <command>No</command>.</para></step> |
248 |
</informalexample> |
| 197 |
<step><para>When asked if you still want to do this, answer |
249 |
|
| 198 |
<command>Yes</command>.</para></step> |
250 |
answer <command>No</command>.</para> |
| 199 |
<step><para>Select <command>Write</command>.</para></step> |
251 |
</step> |
| 200 |
<step><para>When warned about Writing on installed systems, answer |
252 |
|
| 201 |
<command>Yes</command>.</para></step> |
253 |
<step> |
| 202 |
<step><para><command>Quit</command>the FDISK Editor and |
254 |
<para>When asked if you still want to do this, answer |
| 203 |
<keycap>ESCAPE</keycap> back to the Index menu.</para></step> |
255 |
<command>Yes</command>.</para> |
| 204 |
<step><para>Select <command>Label</command> from the Index |
256 |
</step> |
| 205 |
menu.</para></step> |
257 |
|
| 206 |
<step><para>Label as desired. For a single partition, enter |
258 |
<step> |
| 207 |
<command>C</command> to Create a partition, accept the |
259 |
<para>Select <command>Write</command>.</para> |
| 208 |
default size, partition type Filesystem, and a mountpoint (which isn't |
260 |
</step> |
| 209 |
used).</para></step> |
261 |
|
| 210 |
<step><para>Enter <command>W</command> when done and confirm to |
262 |
<step> |
| 211 |
continue. The filesystem will be newfs'd for you, unless you select |
263 |
<para>When warned about Writing on installed systems, answer |
| 212 |
otherwise (for news partitions you'll want to do this!). You'll get |
264 |
<command>Yes</command>.</para> |
| 213 |
the error: |
265 |
</step> |
|
|
266 |
|
| 267 |
<step> |
| 268 |
<para><command>Quit</command>the FDISK Editor and |
| 269 |
<keycap>ESCAPE</keycap> back to the Index menu.</para> |
| 270 |
</step> |
| 271 |
|
| 272 |
<step> |
| 273 |
<para>Select <command>Label</command> from the Index |
| 274 |
menu.</para> |
| 275 |
</step> |
| 276 |
|
| 277 |
<step> |
| 278 |
<para>Label as desired. For a single partition, enter |
| 279 |
<command>C</command> to Create a partition, accept the |
| 280 |
default size, partition type Filesystem, and a mountpoint |
| 281 |
(which isn't used).</para> |
| 282 |
</step> |
| 283 |
|
| 284 |
<step> |
| 285 |
<para>Enter <command>W</command> when done and confirm to |
| 286 |
continue. The filesystem will be newfs'd for you, unless |
| 287 |
you select otherwise (for news partitions you'll want to |
| 288 |
do this!). You'll get the error: |
| 289 |
|
| 214 |
<informalexample> |
290 |
<informalexample> |
| 215 |
<screen>Error mounting /mnt/dev/wd2s1e on /mnt/blah : No such file or directory </screen> |
291 |
<screen> |
|
|
292 |
Error mounting /mnt/dev/wd2s1e on /mnt/blah : No such file or directory </screen> |
| 216 |
</informalexample> |
293 |
</informalexample> |
| 217 |
Ignore. |
|
|
| 218 |
</para></step> |
| 219 |
<step><para>Exit out by repeatedly pressing <keycap>ESCAPE</keycap>.</para></step> |
| 220 |
</procedure> |
| 221 |
|
| 222 |
</sect2> |
| 223 |
<sect2> |
| 224 |
<title>Making Dedicated Mode Disks Using the Command Line</title> |
| 225 |
|
294 |
|
|
|
295 |
Ignore.</para> |
| 296 |
</step> |
| 297 |
|
| 298 |
<step> |
| 299 |
<para>Exit out by repeatedly pressing |
| 300 |
<keycap>ESCAPE</keycap>.</para> |
| 301 |
</step> |
| 302 |
</procedure> |
| 303 |
</sect2> |
| 304 |
|
| 305 |
<sect2> |
| 306 |
<title>Making Dedicated Mode Disks Using the Command Line</title> |
| 307 |
|
| 308 |
<para>Execute the following commands, replacing wd2 with the |
| 309 |
disk name. Lines beginning with # are comments.</para> |
| 226 |
|
310 |
|
| 227 |
<para>Execute the following commands, replacing wd2 with the disk |
|
|
| 228 |
name. Lines beginning with # are comments. </para> |
| 229 |
<informalexample> |
311 |
<informalexample> |
| 230 |
<screen> |
312 |
<screen> |
| 231 |
&prompt.root; <userinput>dd if=/dev/zero of=/dev/rwd2 count=2</userinput> |
313 |
&prompt.root; <userinput>dd if=/dev/zero of=/dev/rwd2 count=2</userinput> |
|
Lines 235-242
Link Here
|
| 235 |
</screen> |
317 |
</screen> |
| 236 |
</informalexample> |
318 |
</informalexample> |
| 237 |
|
319 |
|
| 238 |
<para> If you need to edit the disklabel to create multiple |
320 |
<para>If you need to edit the disklabel to create multiple |
| 239 |
partitions (such as swap), use the following: </para> |
321 |
partitions (such as swap), use the following: </para> |
| 240 |
|
322 |
|
| 241 |
<informalexample> |
323 |
<informalexample> |
| 242 |
<screen> |
324 |
<screen> |
|
Lines 249-354
Link Here
|
| 249 |
</screen> |
331 |
</screen> |
| 250 |
</informalexample> |
332 |
</informalexample> |
| 251 |
|
333 |
|
| 252 |
<para>Your disk is now ready for use.</para> |
334 |
<para>Your disk is now ready for use.</para> |
| 253 |
|
335 |
</sect2> |
| 254 |
</sect2> |
336 |
</sect1> |
| 255 |
</sect1> |
337 |
|
| 256 |
|
338 |
<sect1> |
| 257 |
<sect1> |
339 |
<title>Making Compatibility Mode Disks</title> |
| 258 |
<title>Making Compatibility Mode Disks</title> |
340 |
|
| 259 |
|
341 |
<sect2> |
| 260 |
<sect2> |
342 |
<title>Introduction</title> |
| 261 |
<title>Introduction</title> |
343 |
|
| 262 |
<para>The command line is the easiest way to make dedicated disks, and |
344 |
<para>The command line is the easiest way to make dedicated |
| 263 |
the worst way to make compatibility disks. The command-line fdisk |
345 |
disks, and the worst way to make compatibility disks. The |
| 264 |
utility requires higher math skills and an in-depth understanding of |
346 |
command-line fdisk utility requires higher math skills and an |
| 265 |
the slice table, which is more than most people want to deal with. |
347 |
in-depth understanding of the slice table, which is more than |
| 266 |
Use sysinstall for compatibility disks, as described below.</para> |
348 |
most people want to deal with. Use sysinstall for |
|
|
349 |
compatibility disks, as described below.</para> |
| 350 |
</sect2> |
| 351 |
|
| 352 |
<sect2> |
| 353 |
<title>Making Compatibility Mode Disks Using Sysinstall</title> |
| 354 |
|
| 355 |
<procedure> |
| 356 |
<step> |
| 357 |
<para>Start sysinstall as root by typing |
| 267 |
|
358 |
|
| 268 |
</sect2> |
|
|
| 269 |
<sect2> |
| 270 |
|
| 271 |
<title>Making Compatibility Mode Disks Using Sysinstall</title> |
| 272 |
|
| 273 |
<procedure> |
| 274 |
<step><para>Start sysinstall as root by typing |
| 275 |
<informalexample> |
359 |
<informalexample> |
| 276 |
<screen>&prompt.root; <userinput>/stand/sysinstall</></screen> |
360 |
<screen>&prompt.root; <userinput>/stand/sysinstall</></screen> |
| 277 |
</informalexample> |
361 |
</informalexample> |
| 278 |
from the command prompt.</para></step> |
|
|
| 279 |
|
362 |
|
| 280 |
<step><para>Select <command>Index</command>.</para> </step> |
363 |
from the command prompt.</para> |
| 281 |
<step><para>Select <command>Partition</command>.</para></step> |
364 |
</step> |
| 282 |
<step><para>Select the disk to edit with arrow keys and |
365 |
|
| 283 |
<keycap>SPACE</keycap>. |
366 |
<step> |
| 284 |
</para></step> |
367 |
<para>Select <command>Index</command>.</para> |
| 285 |
<step><para>If you are using this entire disk for FreeBSD, select |
368 |
</step> |
| 286 |
<command>A</command>.</para></step> |
369 |
|
|
|
370 |
<step> |
| 371 |
<para>Select <command>Partition</command>.</para> |
| 372 |
</step> |
| 373 |
|
| 374 |
<step> |
| 375 |
<para>Select the disk to edit with arrow keys and |
| 376 |
<keycap>SPACE</keycap>.</para> |
| 377 |
</step> |
| 378 |
|
| 379 |
<step> |
| 380 |
<para>If you are using this entire disk for FreeBSD, select |
| 381 |
<command>A</command>.</para> |
| 382 |
</step> |
| 383 |
|
| 384 |
<step> |
| 385 |
<para>When asked: |
| 287 |
|
386 |
|
| 288 |
<step><para>When asked: |
|
|
| 289 |
<informalexample> |
387 |
<informalexample> |
| 290 |
<screen> |
388 |
<screen> |
| 291 |
Do you want to do this with a true partition entry so as to remain |
389 |
Do you want to do this with a true partition entry so as to remain |
| 292 |
cooperative with any future possible operating systems on the |
390 |
cooperative with any future possible operating systems on the |
| 293 |
drive(s)? |
391 |
drive(s)? |
| 294 |
</screen> |
392 |
</screen> |
| 295 |
</informalexample> answer <command>yes</command>.</para></step> |
393 |
</informalexample> |
| 296 |
<step><para>Select <command>Write</command>.</para></step> |
394 |
answer <command>yes</command>.</para> |
| 297 |
<step><para>When asked to install the boot manager, select None with |
395 |
</step> |
| 298 |
<keycap>SPACE</keycap> then hit <keycap>ENTER</keycap> for OK.</para></step> |
396 |
|
| 299 |
<step><para><command>Quit</command> the FDISK Editor.</para></step> |
397 |
<step> |
| 300 |
<step><para>You'll be asked about the boot manager, select |
398 |
<para>Select <command>Write</command>.</para> |
| 301 |
<command>None</command> |
399 |
</step> |
| 302 |
again. </para></step> |
400 |
|
| 303 |
<step><para>Select <command>Label</command> from the Index |
401 |
<step> |
| 304 |
menu.</para></step> |
402 |
<para>When asked to install the boot manager, select None |
| 305 |
<step><para>Label as desired. For a single partition, accept the |
403 |
with <keycap>SPACE</keycap> then hit |
| 306 |
default size, type filesystem, and a mountpoint (which isn't |
404 |
<keycap>ENTER</keycap> for OK.</para> |
| 307 |
used).</para></step> |
405 |
</step> |
| 308 |
<step><para>The filesystem will be newfs'd for you, unless you select otherwise (for news partitions you'll want to do this!). You'll get the error: |
406 |
|
|
|
407 |
<step> |
| 408 |
<para><command>Quit</command> the FDISK Editor.</para> |
| 409 |
</step> |
| 410 |
|
| 411 |
<step> |
| 412 |
<para>You'll be asked about the boot manager, select |
| 413 |
<command>None</command> again. </para> |
| 414 |
</step> |
| 415 |
|
| 416 |
<step> |
| 417 |
<para>Select <command>Label</command> from the Index |
| 418 |
menu.</para> |
| 419 |
</step> |
| 420 |
|
| 421 |
<step> |
| 422 |
<para>Label as desired. For a single partition, accept the |
| 423 |
default size, type filesystem, and a mountpoint (which |
| 424 |
isn't used).</para> |
| 425 |
</step> |
| 426 |
|
| 427 |
<step> |
| 428 |
<para>The filesystem will be newfs'd for you, unless you |
| 429 |
select otherwise (for news partitions you'll want to do |
| 430 |
this!). You'll get the error: |
| 431 |
|
| 309 |
<informalexample> |
432 |
<informalexample> |
| 310 |
<screen> |
433 |
<screen> |
| 311 |
Error mounting /mnt/dev/wd2s1e on /mnt/blah : No such file or directory </screen> |
434 |
Error mounting /mnt/dev/wd2s1e on /mnt/blah : No such file or directory </screen> |
| 312 |
</informalexample> |
435 |
</informalexample> |
| 313 |
Ignore. |
436 |
|
| 314 |
</para></step> |
437 |
Ignore.</para> |
| 315 |
<step><para>Exit out by repeatedly pressing <keycap>ESCAPE</keycap>.</para></step> |
438 |
</step> |
| 316 |
</procedure> |
439 |
|
| 317 |
|
440 |
<step> |
| 318 |
<para>Your new disk is now ready for use.</para> |
441 |
<para>Exit out by repeatedly pressing |
| 319 |
|
442 |
<keycap>ESCAPE</keycap>.</para> |
| 320 |
</sect2> |
443 |
</step> |
| 321 |
</sect1> |
444 |
</procedure> |
| 322 |
|
445 |
|
| 323 |
<sect1> |
446 |
<para>Your new disk is now ready for use.</para> |
| 324 |
<title>Other Disk Operations</title> |
447 |
</sect2> |
| 325 |
<sect2> |
448 |
</sect1> |
| 326 |
<title>Adding Swap Space</title> |
449 |
|
| 327 |
|
450 |
<sect1> |
| 328 |
<para>As a system grows, it's need for swap space can also grow. |
451 |
<title>Other Disk Operations</title> |
| 329 |
Although adding swap space to existing disks is very difficult, a new |
452 |
|
| 330 |
disk can be partitioned with additional swap space. </para> |
453 |
<sect2> |
| 331 |
|
454 |
<title>Adding Swap Space</title> |
| 332 |
<para>To add swap space when adding a disk to a system:</para> |
455 |
|
| 333 |
<procedure> |
456 |
<para>As a system grows, it's need for swap space can also grow. |
| 334 |
<step><para>When partitioning the disk, edit the disklabel and |
457 |
Although adding swap space to existing disks is very |
| 335 |
allocate the amount of swap space to add in partition `b' and the |
458 |
difficult, a new disk can be partitioned with additional swap |
| 336 |
remainder in another partition, such as `a' or `e'. The size is given |
459 |
space.</para> |
| 337 |
in 512 byte blocks. </para></step> |
460 |
|
| 338 |
<step><para>When newfsing the drive, do NOT newfs the `c' |
461 |
<para>To add swap space when adding a disk to a system:</para> |
| 339 |
partition. Instead, newfs the partition where the non-swap space |
462 |
|
| 340 |
lies.</para></step> |
463 |
<procedure> |
| 341 |
<step><para>Add an entry to <filename>/etc/fstab</filename> as follows:</para> |
464 |
<step> |
|
|
465 |
<para>When partitioning the disk, edit the disklabel and |
| 466 |
allocate the amount of swap space to add in partition `b' |
| 467 |
and the remainder in another partition, such as `a' or |
| 468 |
`e'. The size is given in 512 byte blocks.</para> |
| 469 |
</step> |
| 470 |
|
| 471 |
<step> |
| 472 |
<para>When newfsing the drive, do NOT newfs the `c' |
| 473 |
partition. Instead, newfs the partition where the |
| 474 |
non-swap space lies.</para> |
| 475 |
</step> |
| 476 |
|
| 477 |
<step> |
| 478 |
<para>Add an entry to <filename>/etc/fstab</filename> as |
| 479 |
follows:</para> |
| 480 |
|
| 342 |
<informalexample> |
481 |
<informalexample> |
| 343 |
<programlisting> |
482 |
<programlisting> |
| 344 |
/dev/wd0b none swap sw 0 0 |
483 |
/dev/wd0b none swap sw 0 0 |
| 345 |
</programlisting> |
484 |
</programlisting> |
| 346 |
</informalexample> |
485 |
</informalexample> |
| 347 |
<para> |
486 |
|
| 348 |
Change /dev/wd0b to the device of the newly added |
487 |
<para>Change /dev/wd0b to the device of the newly added |
| 349 |
space.</para></step> |
488 |
space.</para> |
| 350 |
<step><para>To make the new space immediately available, use the |
489 |
</step> |
| 351 |
<command>swapon</command> command. |
490 |
|
|
|
491 |
<step> |
| 492 |
<para>To make the new space immediately available, use the |
| 493 |
<command>swapon</command> command. |
| 494 |
|
| 352 |
<informalexample> |
495 |
<informalexample> |
| 353 |
<screen> |
496 |
<screen> |
| 354 |
<userinput> |
497 |
<userinput> |
|
Lines 356-373
Link Here
|
| 356 |
</userinput> |
499 |
</userinput> |
| 357 |
swapon: added /dev/sd0b as swap space |
500 |
swapon: added /dev/sd0b as swap space |
| 358 |
</screen> |
501 |
</screen> |
| 359 |
</informalexample> |
502 |
</informalexample></para> |
| 360 |
</para></step> |
503 |
</step> |
| 361 |
</procedure> |
504 |
</procedure> |
| 362 |
</sect2> |
505 |
</sect2> |
| 363 |
|
506 |
|
| 364 |
<sect2> |
507 |
<sect2> |
| 365 |
<title>Copying the Contents of Disks</title> |
508 |
<title>Copying the Contents of Disks</title> |
| 366 |
<!-- Should have specific tag --> |
509 |
<!-- Should have specific tag --> |
| 367 |
<para>Submitted By: Renaud Waldura (<email>renaud@softway.com</email>) </para> |
510 |
|
|
|
511 |
<para>Submitted By: Renaud Waldura |
| 512 |
(<email>renaud@softway.com</email>) </para> |
| 513 |
|
| 514 |
<para>To move file from your original base disk to the fresh new |
| 515 |
one, do: |
| 368 |
|
516 |
|
| 369 |
<para>To move file from your original base disk to the fresh new one, |
|
|
| 370 |
do: |
| 371 |
<informalexample> |
517 |
<informalexample> |
| 372 |
<screen> |
518 |
<screen> |
| 373 |
&prompt.root; <userinput>mount /dev/wd2 /mnt</userinput> |
519 |
&prompt.root; <userinput>mount /dev/wd2 /mnt</userinput> |
|
Lines 376-405
Link Here
|
| 376 |
&prompt.root; <userinput>rm -rf /usr/home/*</userinput> |
522 |
&prompt.root; <userinput>rm -rf /usr/home/*</userinput> |
| 377 |
&prompt.root; <userinput>mount /dev/wd2 /usr/home</userinput> |
523 |
&prompt.root; <userinput>mount /dev/wd2 /usr/home</userinput> |
| 378 |
</screen> |
524 |
</screen> |
| 379 |
</informalexample> |
525 |
</informalexample></para> |
| 380 |
</para> |
526 |
</sect2> |
| 381 |
</sect2> |
527 |
|
|
|
528 |
<sect2> |
| 529 |
<title>Creating Striped Disks using CCD</title> |
| 382 |
|
530 |
|
| 383 |
<sect2> |
531 |
<para>Commands Submitted By: Stan Brown |
| 384 |
<title>Creating Striped Disks using CCD</title> |
532 |
(<email>stanb@awod.com</email>) </para> |
| 385 |
<para>Commands Submitted By: Stan Brown (<email>stanb@awod.com</email>) </para> |
533 |
|
| 386 |
|
534 |
<para>The Concatenated Disk Driver, or CCD, allows you to treat |
| 387 |
<para> |
535 |
several identical disks as a single disk. Striping can result |
| 388 |
The Concatenated Disk Driver, or CCD, allows you to treat several identical disks as a single disk. |
536 |
in increased disk performance by distributing reads and writes |
| 389 |
Striping can result in increased disk performance by distributing reads and |
537 |
across the disks. See the &man.ccd.4; and &man.ccdconfig.8; |
| 390 |
writes across the disks. See the &man.ccd.4; and &man.ccdconfig.8; man pages or the |
538 |
man pages or the <ulink |
| 391 |
<ulink URL="http://stampede.cs.berkeley.edu/ccd/">CCD Homepage</ulink> for further details.</para> |
539 |
URL="http://stampede.cs.berkeley.edu/ccd/">CCD |
| 392 |
|
540 |
Homepage</ulink> for further details.</para> |
| 393 |
<para>To create a new CCD, execute the following commands. This describes |
541 |
|
| 394 |
how to add three disks together; simply add or remove devices as |
542 |
<para>To create a new CCD, execute the following commands. This |
| 395 |
necessary. Remember that the disks to be striped must be <emphasis>identical.</></para> |
543 |
describes how to add three disks together; simply add or |
|
|
544 |
remove devices as necessary. Remember that the disks to be |
| 545 |
striped must be <emphasis>identical.</></para> |
| 546 |
|
| 547 |
<para>Before executing these commands, make sure you add the line |
| 396 |
|
548 |
|
| 397 |
<para>Before executing these commands, make sure you add the line |
|
|
| 398 |
<userinput> |
549 |
<userinput> |
| 399 |
pseudo-device ccd 4 |
550 |
pseudo-device ccd 4 |
| 400 |
</userinput> |
551 |
</userinput> |
| 401 |
|
552 |
|
| 402 |
to your kernel.</para> |
553 |
to your kernel.</para> |
| 403 |
|
554 |
|
| 404 |
<informalexample> |
555 |
<informalexample> |
| 405 |
<screen> |
556 |
<screen> |
|
Lines 422-457
Link Here
|
| 422 |
</screen> |
573 |
</screen> |
| 423 |
</informalexample> |
574 |
</informalexample> |
| 424 |
|
575 |
|
| 425 |
<para>Now you can mount and use your CCD by referencing device /dev/ccd0c. |
576 |
<para>Now you can mount and use your CCD by referencing device |
| 426 |
</para> |
577 |
/dev/ccd0c.</para> |
| 427 |
|
578 |
</sect2> |
| 428 |
</sect2> |
579 |
</sect1> |
| 429 |
</sect1> |
580 |
|
| 430 |
|
581 |
<sect1> |
| 431 |
<sect1> |
582 |
<title>Credits</title> |
| 432 |
<title>Credits</title> |
583 |
|
| 433 |
|
584 |
<para>The author would like to thank the following individuals for |
| 434 |
|
585 |
their contributions to this project:</para> |
| 435 |
|
586 |
|
| 436 |
<para>The author would like to thank the following individuals for |
587 |
<itemizedlist> |
| 437 |
their contributions to this project:</para> |
588 |
<listitem> |
| 438 |
<itemizedlist> |
589 |
<para>Darryl Okahata |
| 439 |
<listitem><para>Darryl Okahata |
590 |
(<email>darrylo@hpnmhjw.sr.hp.com</email>) for his simple |
| 440 |
(<email>darrylo@hpnmhjw.sr.hp.com</email>) for his |
591 |
dedicated mode setup documentation which I have used |
| 441 |
simple dedicated mode setup documentation which I have used repeatedly |
592 |
repeatedly on freebsd-questions.</para> |
| 442 |
on freebsd-questions.</para></listitem> |
593 |
</listitem> |
| 443 |
<listitem><para>Jordan Hubbard |
594 |
|
| 444 |
(<email>jkh@FreeBSD.org</email>) for making |
595 |
<listitem> |
| 445 |
sysinstall useful for this type of task.</para></listitem> |
596 |
<para>Jordan Hubbard (<email>jkh@FreeBSD.org</email>) for |
| 446 |
<listitem><para>John Fieber |
597 |
making sysinstall useful for this type of task.</para> |
| 447 |
(<email>jfieber@indiana.edu</email>) for making |
598 |
</listitem> |
| 448 |
information and examples of the DocBook DTD on which this document is |
599 |
|
| 449 |
based.</para></listitem> |
600 |
<listitem> |
| 450 |
<listitem><para>Greg Lehey (<email>grog@FreeBSD.org</email>) for checking my |
601 |
<para>John Fieber (<email>jfieber@indiana.edu</email>) for |
| 451 |
work and pointing out inaccuracies, as well as miscellaneous support. |
602 |
making information and examples of the DocBook DTD on which |
| 452 |
</para></listitem> |
603 |
this document is based.</para> |
| 453 |
</itemizedlist> |
604 |
</listitem> |
| 454 |
|
605 |
|
| 455 |
</sect1> |
606 |
<listitem> |
| 456 |
|
607 |
<para>Greg Lehey (<email>grog@FreeBSD.org</email>) for |
|
|
608 |
checking my work and pointing out inaccuracies, as well as |
| 609 |
miscellaneous support.</para> |
| 610 |
</listitem> |
| 611 |
</itemizedlist> |
| 612 |
</sect1> |
| 457 |
</article> |
613 |
</article> |