|
Lines 1-4
Link Here
|
| 1 |
<!DOCTYPE ARTICLE PUBLIC "-//FreeBSD//DTD DocBook V3.1-Based Extension//EN"> |
1 |
<!DOCTYPE article PUBLIC "-//FreeBSD//DTD DocBook V3.1-Based Extension//EN" [ |
|
|
2 |
<!ENTITY % man PUBLIC "-//FreeBSD//ENTITIES DocBook Manual Page Entities//EN"> |
| 3 |
%man; |
| 4 |
]> |
| 2 |
<!-- $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 $ --> |
| 3 |
<article> |
6 |
<article> |
| 4 |
|
7 |
|
|
Lines 39-44
Link Here
|
| 39 |
FreeBSD. </para> |
42 |
FreeBSD. </para> |
| 40 |
|
43 |
|
| 41 |
<para>There are two possible modes of disk formatting: |
44 |
<para>There are two possible modes of disk formatting: |
|
|
45 |
</para> |
| 42 |
<itemizedlist> |
46 |
<itemizedlist> |
| 43 |
|
47 |
|
| 44 |
<listitem><para><firstterm>compatibility mode</firstterm>: Arranging a |
48 |
<listitem><para><firstterm>compatibility mode</firstterm>: Arranging a |
|
Lines 50-56
Link Here
|
| 50 |
adding disks easier, however non-FreeBSD operating systems may not |
54 |
adding disks easier, however non-FreeBSD operating systems may not |
| 51 |
accept the disk. </para> </listitem> |
55 |
accept the disk. </para> </listitem> |
| 52 |
</itemizedlist> |
56 |
</itemizedlist> |
| 53 |
</para> |
|
|
| 54 |
|
57 |
|
| 55 |
<para>For most cases, dedicated mode is the easiest to set up and use |
58 |
<para>For most cases, dedicated mode is the easiest to set up and use |
| 56 |
in existing systems, as a new disk is usually dedicated entirely to |
59 |
in existing systems, as a new disk is usually dedicated entirely to |
|
Lines 169-210
Link Here
|
| 169 |
confusion from slicing disks. For FreeBSD versions 2.1.7 and later, |
172 |
confusion from slicing disks. For FreeBSD versions 2.1.7 and later, |
| 170 |
this is perhaps the simplest way to slice disks.</para> |
173 |
this is perhaps the simplest way to slice disks.</para> |
| 171 |
|
174 |
|
| 172 |
<orderedlist> |
175 |
<procedure> |
| 173 |
<listitem><para>Start sysinstall as root by typing |
176 |
<step><para>Start sysinstall as root by typing |
| 174 |
<informalexample> |
177 |
<informalexample> |
| 175 |
<screen><userinput>/stand/sysinstall</userinput></screen> |
178 |
<screen>&prompt.root; <userinput>/stand/sysinstall</userinput></screen> |
| 176 |
</informalexample> |
179 |
</informalexample> |
| 177 |
from the command prompt.</para></listitem> |
180 |
from the command prompt.</para></step> |
| 178 |
|
181 |
|
| 179 |
<listitem><para>Select <command>Index</command>.</para></listitem> |
182 |
<step><para>Select <command>Index</command>.</para></step> |
| 180 |
<listitem><para>Select <command>Partition</command>.</para></listitem> |
183 |
<step><para>Select <command>Partition</command>.</para></step> |
| 181 |
<listitem><para>Select the disk to edit with arrow keys and |
184 |
<step><para>Select the disk to edit with arrow keys and |
| 182 |
<keycap>SPACE</keycap>.</para> |
185 |
<keycap>SPACE</keycap>.</para> |
| 183 |
</listitem> |
186 |
</step> |
| 184 |
<listitem><para>If you are using this entire disk for FreeBSD, select |
187 |
<step><para>If you are using this entire disk for FreeBSD, select |
| 185 |
<command>A</command>.</para></listitem> |
188 |
<command>A</command>.</para></step> |
| 186 |
<listitem><para>When asked: |
189 |
<step><para>When asked: |
| 187 |
<informalexample> |
190 |
<informalexample> |
| 188 |
<screen> |
191 |
<screen> |
| 189 |
Do you want to do this with a true partition entry so as to remain |
192 |
Do you want to do this with a true partition entry so as to remain |
| 190 |
cooperative with any future possible operating systems on the |
193 |
cooperative with any future possible operating systems on the |
| 191 |
drive(s)? |
194 |
drive(s)? |
| 192 |
</screen> |
195 |
</screen> |
| 193 |
</informalexample>answer <command>No</command>.</para></listitem> |
196 |
</informalexample>answer <command>No</command>.</para></step> |
| 194 |
<listitem><para>When asked if you still want to do this, answer |
197 |
<step><para>When asked if you still want to do this, answer |
| 195 |
<command>Yes</command>.</para></listitem> |
198 |
<command>Yes</command>.</para></step> |
| 196 |
<listitem><para>Select <command>Write</command>.</para></listitem> |
199 |
<step><para>Select <command>Write</command>.</para></step> |
| 197 |
<listitem><para>When warned about Writing on installed systems, answer |
200 |
<step><para>When warned about Writing on installed systems, answer |
| 198 |
<command>Yes</command>.</para></listitem> |
201 |
<command>Yes</command>.</para></step> |
| 199 |
<listitem><para><command>Quit</command>the FDISK Editor and |
202 |
<step><para><command>Quit</command>the FDISK Editor and |
| 200 |
<keycap>ESCAPE</keycap> back to the Index menu.</para></listitem> |
203 |
<keycap>ESCAPE</keycap> back to the Index menu.</para></step> |
| 201 |
<listitem><para>Select <command>Label</command> from the Index |
204 |
<step><para>Select <command>Label</command> from the Index |
| 202 |
menu.</para></listitem> |
205 |
menu.</para></step> |
| 203 |
<listitem><para>Label as desired. For a single partition, enter |
206 |
<step><para>Label as desired. For a single partition, enter |
| 204 |
<command>C</command> to Create a partition, accept the |
207 |
<command>C</command> to Create a partition, accept the |
| 205 |
default size, partition type Filesystem, and a mountpoint (which isn't |
208 |
default size, partition type Filesystem, and a mountpoint (which isn't |
| 206 |
used).</para></listitem> |
209 |
used).</para></step> |
| 207 |
<listitem><para>Enter <command>W</command> when done and confirm to |
210 |
<step><para>Enter <command>W</command> when done and confirm to |
| 208 |
continue. The filesystem will be newfs'd for you, unless you select |
211 |
continue. The filesystem will be newfs'd for you, unless you select |
| 209 |
otherwise (for news partitions you'll want to do this!). You'll get |
212 |
otherwise (for news partitions you'll want to do this!). You'll get |
| 210 |
the error: |
213 |
the error: |
|
Lines 212-220
Link Here
|
| 212 |
<screen>Error mounting /mnt/dev/wd2s1e on /mnt/blah : No such file or directory </screen> |
215 |
<screen>Error mounting /mnt/dev/wd2s1e on /mnt/blah : No such file or directory </screen> |
| 213 |
</informalexample> |
216 |
</informalexample> |
| 214 |
Ignore. |
217 |
Ignore. |
| 215 |
</para></listitem> |
218 |
</para></step> |
| 216 |
<listitem><para>Exit out by repeatedly pressing <keycap>ESCAPE</keycap>.</para></listitem> |
219 |
<step><para>Exit out by repeatedly pressing <keycap>ESCAPE</keycap>.</para></step> |
| 217 |
</orderedlist> |
220 |
</procedure> |
| 218 |
|
221 |
|
| 219 |
</sect2> |
222 |
</sect2> |
| 220 |
<sect2> |
223 |
<sect2> |
|
Lines 225-236
Link Here
|
| 225 |
name. Lines beginning with # are comments. </para> |
228 |
name. Lines beginning with # are comments. </para> |
| 226 |
<informalexample> |
229 |
<informalexample> |
| 227 |
<screen> |
230 |
<screen> |
| 228 |
<userinput> |
231 |
&prompt.root; <userinput>dd if=/dev/zero of=/dev/rwd2 count=2</userinput> |
| 229 |
dd if=/dev/zero of=/dev/rwd2 count=2 |
232 |
&prompt.root; <userinput>disklabel /dev/rwd2 | disklabel -B -R -r wd2 /dev/stdin</userinput> |
| 230 |
disklabel /dev/rwd2 | disklabel -B -R -r wd2 /dev/stdin |
233 |
<lineannotation>We only want one partition, so using slice 'c' should be fine:</lineannotation> |
| 231 |
# We only want one partition, so using slice 'c' should be fine: |
234 |
&prompt.root; <userinput>newfs /dev/rwd2c</userinput> |
| 232 |
newfs /dev/rwd2c |
|
|
| 233 |
</userinput> |
| 234 |
</screen> |
235 |
</screen> |
| 235 |
</informalexample> |
236 |
</informalexample> |
| 236 |
|
237 |
|
|
Lines 239-252
Link Here
|
| 239 |
|
240 |
|
| 240 |
<informalexample> |
241 |
<informalexample> |
| 241 |
<screen> |
242 |
<screen> |
| 242 |
<userinput> |
243 |
&prompt.root; <userinput>dd if=/dev/zero of=/dev/rwd2 count=2</userinput> |
| 243 |
dd if=/dev/zero of=/dev/rwd2 count=2 |
244 |
&prompt.root; <userinput>disklabel /dev/r$d > /tmp/label</userinput> |
| 244 |
disklabel /dev/r$d > /tmp/label |
245 |
<lineannotation>Edit disklabel to add partitions:</lineannotation> |
| 245 |
# Edit disklabel to add partitions: |
246 |
&prompt.root; <userinput>vi /tmp/label</userinput> |
| 246 |
vi /tmp/label |
247 |
&prompt.root; <userinput>disklabel -B -R -r wd2 /tmp/label</userinput> |
| 247 |
disklabel -B -R -r wd2 /tmp/label |
248 |
<lineannotation>newfs partitions appropriately</lineannotation> |
| 248 |
# newfs partitions appropriately |
|
|
| 249 |
</userinput> |
| 250 |
</screen> |
249 |
</screen> |
| 251 |
</informalexample> |
250 |
</informalexample> |
| 252 |
|
251 |
|
|
Lines 271-320
Link Here
|
| 271 |
|
270 |
|
| 272 |
<title>Making Compatibility Mode Disks Using Sysinstall</title> |
271 |
<title>Making Compatibility Mode Disks Using Sysinstall</title> |
| 273 |
|
272 |
|
| 274 |
<orderedlist> |
273 |
<procedure> |
| 275 |
<listitem><para>Start sysinstall as root by typing |
274 |
<step><para>Start sysinstall as root by typing |
| 276 |
<informalexample> |
275 |
<informalexample> |
| 277 |
<screen><userinput>/stand/sysinstall</></screen> |
276 |
<screen>&prompt.root; <userinput>/stand/sysinstall</></screen> |
| 278 |
</informalexample> |
277 |
</informalexample> |
| 279 |
from the command prompt.</para></listitem> |
278 |
from the command prompt.</para></step> |
| 280 |
|
279 |
|
| 281 |
<listitem><para>Select <command>Index</command>.</para> </listitem> |
280 |
<step><para>Select <command>Index</command>.</para> </step> |
| 282 |
<listitem><para>Select <command>Partition</command>.</para></listitem> |
281 |
<step><para>Select <command>Partition</command>.</para></step> |
| 283 |
<listitem><para>Select the disk to edit with arrow keys and |
282 |
<step><para>Select the disk to edit with arrow keys and |
| 284 |
<keycap>SPACE</keycap>. |
283 |
<keycap>SPACE</keycap>. |
| 285 |
</para></listitem> |
284 |
</para></step> |
| 286 |
<listitem><para>If you are using this entire disk for FreeBSD, select |
285 |
<step><para>If you are using this entire disk for FreeBSD, select |
| 287 |
<command>A</command>.</para></listitem> |
286 |
<command>A</command>.</para></step> |
| 288 |
|
287 |
|
| 289 |
<listitem><para>When asked: |
288 |
<step><para>When asked: |
| 290 |
<informalexample> |
289 |
<informalexample> |
| 291 |
<screen> |
290 |
<screen> |
| 292 |
Do you want to do this with a true partition entry so as to remain |
291 |
Do you want to do this with a true partition entry so as to remain |
| 293 |
cooperative with any future possible operating systems on the |
292 |
cooperative with any future possible operating systems on the |
| 294 |
drive(s)? |
293 |
drive(s)? |
| 295 |
</screen> |
294 |
</screen> |
| 296 |
</informalexample> answer <command>yes</command>.</para></listitem> |
295 |
</informalexample> answer <command>yes</command>.</para></step> |
| 297 |
<listitem><para>Select <command>Write</command>.</para></listitem> |
296 |
<step><para>Select <command>Write</command>.</para></step> |
| 298 |
<listitem><para>When asked to install the boot manager, select None with |
297 |
<step><para>When asked to install the boot manager, select None with |
| 299 |
<keycap>SPACE</keycap> then hit <keycap>ENTER</keycap> for OK.</para></listitem> |
298 |
<keycap>SPACE</keycap> then hit <keycap>ENTER</keycap> for OK.</para></step> |
| 300 |
<listitem><para><command>Quit</command> the FDISK Editor.</para></listitem> |
299 |
<step><para><command>Quit</command> the FDISK Editor.</para></step> |
| 301 |
<listitem><para>You'll be asked about the boot manager, select |
300 |
<step><para>You'll be asked about the boot manager, select |
| 302 |
<command>None</command> |
301 |
<command>None</command> |
| 303 |
again. </para></listitem> |
302 |
again. </para></step> |
| 304 |
<listitem><para>Select <command>Label</command> from the Index |
303 |
<step><para>Select <command>Label</command> from the Index |
| 305 |
menu.</para></listitem> |
304 |
menu.</para></step> |
| 306 |
<listitem><para>Label as desired. For a single partition, accept the |
305 |
<step><para>Label as desired. For a single partition, accept the |
| 307 |
default size, type filesystem, and a mountpoint (which isn't |
306 |
default size, type filesystem, and a mountpoint (which isn't |
| 308 |
used).</para></listitem> |
307 |
used).</para></step> |
| 309 |
<listitem><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: |
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: |
| 310 |
<informalexample> |
309 |
<informalexample> |
| 311 |
<screen> |
310 |
<screen> |
| 312 |
Error mounting /mnt/dev/wd2s1e on /mnt/blah : No such file or directory </screen> |
311 |
Error mounting /mnt/dev/wd2s1e on /mnt/blah : No such file or directory </screen> |
| 313 |
</informalexample> |
312 |
</informalexample> |
| 314 |
Ignore. |
313 |
Ignore. |
| 315 |
</para></listitem> |
314 |
</para></step> |
| 316 |
<listitem><para>Exit out by repeatedly pressing <keycap>ESCAPE</keycap>.</para></listitem> |
315 |
<step><para>Exit out by repeatedly pressing <keycap>ESCAPE</keycap>.</para></step> |
| 317 |
</orderedlist> |
316 |
</procedure> |
| 318 |
|
317 |
|
| 319 |
<para>Your new disk is now ready for use.</para> |
318 |
<para>Your new disk is now ready for use.</para> |
| 320 |
|
319 |
|
|
Lines 330-365
Link Here
|
| 330 |
Although adding swap space to existing disks is very difficult, a new |
329 |
Although adding swap space to existing disks is very difficult, a new |
| 331 |
disk can be partitioned with additional swap space. </para> |
330 |
disk can be partitioned with additional swap space. </para> |
| 332 |
|
331 |
|
| 333 |
<para>To add swap space when adding a disk to a system: |
332 |
<para>To add swap space when adding a disk to a system:</para> |
| 334 |
<orderedlist> |
333 |
<procedure> |
| 335 |
<listitem><para>When partitioning the disk, edit the disklabel and |
334 |
<step><para>When partitioning the disk, edit the disklabel and |
| 336 |
allocate the amount of swap space to add in partition `b' and the |
335 |
allocate the amount of swap space to add in partition `b' and the |
| 337 |
remainder in another partition, such as `a' or `e'. The size is given |
336 |
remainder in another partition, such as `a' or `e'. The size is given |
| 338 |
in 512 byte blocks. </para></listitem> |
337 |
in 512 byte blocks. </para></step> |
| 339 |
<listitem><para>When newfsing the drive, do NOT newfs the `c' |
338 |
<step><para>When newfsing the drive, do NOT newfs the `c' |
| 340 |
partition. Instead, newfs the partition where the non-swap space |
339 |
partition. Instead, newfs the partition where the non-swap space |
| 341 |
lies.</para></listitem> |
340 |
lies.</para></step> |
| 342 |
<listitem><para>Add an entry to <filename>/etc/fstab</filename> as follows: |
341 |
<step><para>Add an entry to <filename>/etc/fstab</filename> as follows:</para> |
| 343 |
<informalexample> |
342 |
<informalexample> |
| 344 |
<programlisting> |
343 |
<programlisting> |
| 345 |
/dev/wd0b none swap sw 0 0 |
344 |
/dev/wd0b none swap sw 0 0 |
| 346 |
</programlisting> |
345 |
</programlisting> |
| 347 |
</informalexample> |
346 |
</informalexample> |
|
|
347 |
<para> |
| 348 |
Change /dev/wd0b to the device of the newly added |
348 |
Change /dev/wd0b to the device of the newly added |
| 349 |
space.</para></listitem> |
349 |
space.</para></step> |
| 350 |
<listitem><para>To make the new space immediately available, use the |
350 |
<step><para>To make the new space immediately available, use the |
| 351 |
<command>swapon</command> command. |
351 |
<command>swapon</command> command. |
| 352 |
<informalexample> |
352 |
<informalexample> |
| 353 |
<screen> |
353 |
<screen> |
| 354 |
<userinput> |
354 |
<userinput> |
| 355 |
$ swapon /dev/sd0b |
355 |
&prompt.root; swapon /dev/sd0b |
| 356 |
</userinput> |
356 |
</userinput> |
| 357 |
swapon: added /dev/sd0b as swap space |
357 |
swapon: added /dev/sd0b as swap space |
| 358 |
</screen> |
358 |
</screen> |
| 359 |
</informalexample> |
359 |
</informalexample> |
| 360 |
</para></listitem> |
360 |
</para></step> |
| 361 |
</orderedlist> |
361 |
</procedure> |
| 362 |
</para> |
|
|
| 363 |
</sect2> |
362 |
</sect2> |
| 364 |
|
363 |
|
| 365 |
<sect2> |
364 |
<sect2> |
|
Lines 371-383
Link Here
|
| 371 |
do: |
370 |
do: |
| 372 |
<informalexample> |
371 |
<informalexample> |
| 373 |
<screen> |
372 |
<screen> |
| 374 |
<userinput> |
373 |
&prompt.root; <userinput>mount /dev/wd2 /mnt</userinput> |
| 375 |
mount /dev/wd2 /mnt |
374 |
&prompt.root; <userinput>pax -r -w -p e /usr/home /mnt</userinput> |
| 376 |
pax -r -w -p e /usr/home /mnt |
375 |
&prompt.root; <userinput>umount /mnt</userinput> |
| 377 |
umount /mnt |
376 |
&prompt.root; <userinput>rm -rf /usr/home/*</userinput> |
| 378 |
rm -rf /usr/home/* |
377 |
&prompt.root; <userinput>mount /dev/wd2 /usr/home</userinput> |
| 379 |
mount /dev/wd2 /usr/home |
|
|
| 380 |
</userinput> |
| 381 |
</screen> |
378 |
</screen> |
| 382 |
</informalexample> |
379 |
</informalexample> |
| 383 |
</para> |
380 |
</para> |
|
Lines 390-396
Link Here
|
| 390 |
<para> |
387 |
<para> |
| 391 |
The Concatenated Disk Driver, or CCD, allows you to treat several identical disks as a single disk. |
388 |
The Concatenated Disk Driver, or CCD, allows you to treat several identical disks as a single disk. |
| 392 |
Striping can result in increased disk performance by distributing reads and |
389 |
Striping can result in increased disk performance by distributing reads and |
| 393 |
writes across the disks. See the ccd(4) and ccdconfig(4) man pages or the |
390 |
writes across the disks. See the &man.ccd.4; and &man.ccdconfig.8; man pages or the |
| 394 |
<ulink URL="http://stampede.cs.berkeley.edu/ccd/">CCD Homepage</ulink> for further details.</para> |
391 |
<ulink URL="http://stampede.cs.berkeley.edu/ccd/">CCD Homepage</ulink> for further details.</para> |
| 395 |
|
392 |
|
| 396 |
<para>To create a new CCD, execute the following commands. This describes |
393 |
<para>To create a new CCD, execute the following commands. This describes |
|
Lines 406-426
Link Here
|
| 406 |
|
403 |
|
| 407 |
<informalexample> |
404 |
<informalexample> |
| 408 |
<screen> |
405 |
<screen> |
| 409 |
<userinput> |
406 |
&prompt.root; <userinput>cd /dev ; sh MAKDEV ccd0</userinput> |
| 410 |
cd /dev ; sh MAKDEV ccd0 |
|
|
| 411 |
|
| 412 |
disklabel -r -w sd0 auto |
| 413 |
disklabel -r -w sd1 auto |
| 414 |
disklabel -r -w sd2 auto |
| 415 |
|
407 |
|
| 416 |
disklabel -e sd0c # change type to 4.2BSD |
408 |
&prompt.root; <userinput>disklabel -r -w sd0 auto</userinput> |
| 417 |
disklabel -e sd1c # change type to 4.2BSD |
409 |
&prompt.root; <userinput>disklabel -r -w sd1 auto</userinput> |
| 418 |
disklabel -e sd2c # change type to 4.2BSD |
410 |
&prompt.root; <userinput>disklabel -r -w sd2 auto</userinput> |
|
|
411 |
|
| 412 |
&prompt.root; <userinput>disklabel -e sd0c</userinput> |
| 413 |
<lineannotation>change type to 4.2BSD</lineannotation> |
| 414 |
&prompt.root; <userinput>disklabel -e sd1c</userinput> |
| 415 |
<lineannotation>change type to 4.2BSD</lineannotation> |
| 416 |
&prompt.root; <userinput>disklabel -e sd2c</userinput> |
| 417 |
<lineannotation>change type to 4.2BSD</lineannotation> |
| 419 |
|
418 |
|
| 420 |
ccdconfig ccd0 32 0 /dev/sd0c /dev/sd1c /dev/sd2c |
419 |
&prompt.root; <userinput>ccdconfig ccd0 32 0 /dev/sd0c /dev/sd1c /dev/sd2c</userinput> |
| 421 |
|
420 |
|
| 422 |
newfs /dev/rccd0c |
421 |
&prompt.root; <userinput>newfs /dev/rccd0c</userinput> |
| 423 |
</userinput> |
|
|
| 424 |
</screen> |
422 |
</screen> |
| 425 |
</informalexample> |
423 |
</informalexample> |
| 426 |
|
424 |
|
|
Lines 436-442
Link Here
|
| 436 |
|
434 |
|
| 437 |
|
435 |
|
| 438 |
<para>The author would like to thank the following individuals for |
436 |
<para>The author would like to thank the following individuals for |
| 439 |
their contributions to this project: |
437 |
their contributions to this project:</para> |
| 440 |
<itemizedlist> |
438 |
<itemizedlist> |
| 441 |
<listitem><para>Darryl Okahata |
439 |
<listitem><para>Darryl Okahata |
| 442 |
(<email>darrylo@hpnmhjw.sr.hp.com</email>) for his |
440 |
(<email>darrylo@hpnmhjw.sr.hp.com</email>) for his |
|
Lines 453-459
Link Here
|
| 453 |
work and pointing out inaccuracies, as well as miscellaneous support. |
451 |
work and pointing out inaccuracies, as well as miscellaneous support. |
| 454 |
</para></listitem> |
452 |
</para></listitem> |
| 455 |
</itemizedlist> |
453 |
</itemizedlist> |
| 456 |
</para> |
|
|
| 457 |
|
454 |
|
| 458 |
</sect1> |
455 |
</sect1> |