aboutsummaryrefslogtreecommitdiff
path: root/documentation/content/en/books/handbook/disks/_index.po
blob: 1124a6ec62d7ec2ac89786a90fd3a6c12a2ff5d4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
# SOME DESCRIPTIVE TITLE
# Copyright (C) YEAR The FreeBSD Project
# This file is distributed under the same license as the FreeBSD Documentation package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: FreeBSD Documentation VERSION\n"
"POT-Creation-Date: 2024-01-17 20:35-0300\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"

#. type: YAML Front Matter: description
#: documentation/content/en/books/handbook/disks/_index.adoc:1
#, no-wrap
msgid "This chapter covers the use of disks and storage media in FreeBSD. This includes SCSI and IDE disks, CD and DVD media, memory-backed disks, and USB storage devices."
msgstr ""

#. type: YAML Front Matter: part
#: documentation/content/en/books/handbook/disks/_index.adoc:1
#, no-wrap
msgid "Part III. System Administration"
msgstr ""

#. type: YAML Front Matter: title
#: documentation/content/en/books/handbook/disks/_index.adoc:1
#, no-wrap
msgid "Chapter 20. Storage"
msgstr ""

#. type: Title =
#: documentation/content/en/books/handbook/disks/_index.adoc:14
#, no-wrap
msgid "Storage"
msgstr ""

#. type: Title ==
#: documentation/content/en/books/handbook/disks/_index.adoc:52
#, no-wrap
msgid "Synopsis"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:56
msgid ""
"This chapter covers the use of disks and storage media in FreeBSD.  This "
"includes SCSI and IDE disks, CD and DVD media, memory-backed disks, and USB "
"storage devices."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:58
msgid "After reading this chapter, you will know:"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:60
msgid "How to add additional hard disks to a FreeBSD system."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:61
msgid "How to grow the size of a disk's partition on FreeBSD."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:62
msgid "How to configure FreeBSD to use USB storage devices."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:63
msgid "How to use CD and DVD media on a FreeBSD system."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:64
msgid "How to use the backup programs available under FreeBSD."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:65
msgid "How to set up memory disks."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:66
msgid "What file system snapshots are and how to use them efficiently."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:67
msgid "How to use quotas to limit disk space usage."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:68
msgid "How to encrypt disks and swap to secure them against attackers."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:69
msgid "How to configure a highly available storage network."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:71
msgid "Before reading this chapter, you should:"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:73
msgid ""
"Know how to crossref:kernelconfig[kernelconfig,configure and install a new "
"FreeBSD kernel]."
msgstr ""

#. type: Title ==
#: documentation/content/en/books/handbook/disks/_index.adoc:75
#, no-wrap
msgid "Adding Disks"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:80
msgid ""
"This section describes how to add a new SATA disk to a machine that "
"currently only has a single drive.  First, turn off the computer and install "
"the drive in the computer following the instructions of the computer, "
"controller, and drive manufacturers.  Reboot the system and become `root`."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:83
msgid ""
"Inspect [.filename]#/var/run/dmesg.boot# to ensure the new disk was found.  "
"In this example, the newly added SATA drive will appear as [.filename]#ada1#."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:86
msgid ""
"For this example, a single large partition will be created on the new disk.  "
"The http://en.wikipedia.org/wiki/GUID_Partition_Table[GPT] partitioning "
"scheme will be used in preference to the older and less versatile MBR scheme."
msgstr ""

#. type: delimited block = 4
#: documentation/content/en/books/handbook/disks/_index.adoc:91
msgid ""
"If the disk to be added is not blank, old partition information can be "
"removed with `gpart delete`.  See man:gpart[8] for details."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:95
msgid ""
"The partition scheme is created, and then a single partition is added.  To "
"improve performance on newer disks with larger hardware block sizes, the "
"partition is aligned to one megabyte boundaries:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:100
#, no-wrap
msgid ""
"# gpart create -s GPT ada1\n"
"# gpart add -t freebsd-ufs -a 1M ada1\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:104
msgid ""
"Depending on use, several smaller partitions may be desired.  See man:"
"gpart[8] for options to create partitions smaller than a whole disk."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:106
msgid "The disk partition information can be viewed with `gpart show`:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:114
#, no-wrap
msgid ""
"% gpart show ada1\n"
"=>        34  1465146988  ada1  GPT  (699G)\n"
"          34        2014        - free -  (1.0M)\n"
"        2048  1465143296     1  freebsd-ufs  (699G)\n"
"  1465145344        1678        - free -  (839K)\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:117
msgid "A file system is created in the new partition on the new disk:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:121
#, no-wrap
msgid "# newfs -U /dev/ada1p1\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:124
msgid ""
"An empty directory is created as a _mountpoint_, a location for mounting the "
"new disk in the original disk's file system:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:128
#, no-wrap
msgid "# mkdir /newdisk\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:131
msgid ""
"Finally, an entry is added to [.filename]#/etc/fstab# so the new disk will "
"be mounted automatically at startup:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:135
#, no-wrap
msgid "/dev/ada1p1\t/newdisk\tufs\trw\t2\t2\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:138
msgid "The new disk can be mounted manually, without restarting the system:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:142
#, no-wrap
msgid "# mount /newdisk\n"
msgstr ""

#. type: Title ==
#: documentation/content/en/books/handbook/disks/_index.adoc:145
#, no-wrap
msgid "Resizing and Growing Disks"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:151
msgid ""
"A disk's capacity can increase without any changes to the data already "
"present.  This happens commonly with virtual machines, when the virtual disk "
"turns out to be too small and is enlarged.  Sometimes a disk image is "
"written to a USB memory stick, but does not use the full capacity.  Here we "
"describe how to resize or _grow_ disk contents to take advantage of "
"increased capacity."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:154
msgid ""
"Determine the device name of the disk to be resized by inspecting [."
"filename]#/var/run/dmesg.boot#.  In this example, there is only one SATA "
"disk in the system, so the drive will appear as [.filename]#ada0#."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:156
msgid "List the partitions on the disk to see the current configuration:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:165
#, no-wrap
msgid ""
"# gpart show ada0\n"
"=>      34  83886013  ada0  GPT  (48G) [CORRUPT]\n"
"        34       128     1  freebsd-boot  (64k)\n"
"       162  79691648     2  freebsd-ufs  (38G)\n"
"  79691810   4194236     3  freebsd-swap  (2G)\n"
"  83886046         1        - free -  (512B)\n"
msgstr ""

#. type: delimited block = 4
#: documentation/content/en/books/handbook/disks/_index.adoc:171
msgid ""
"If the disk was formatted with the http://en.wikipedia.org/wiki/"
"GUID_Partition_Table[GPT] partitioning scheme, it may show as \"corrupted\" "
"because the GPT backup partition table is no longer at the end of the "
"drive.  Fix the backup partition table with `gpart`:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:176
#, no-wrap
msgid ""
"# gpart recover ada0\n"
"ada0 recovered\n"
msgstr ""

#. type: delimited block = 4
#: documentation/content/en/books/handbook/disks/_index.adoc:181
msgid ""
"Now the additional space on the disk is available for use by a new "
"partition, or an existing partition can be expanded:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:190
#, no-wrap
msgid ""
"# gpart show ada0\n"
"=>       34  102399933  ada0  GPT  (48G)\n"
"         34        128     1  freebsd-boot  (64k)\n"
"        162   79691648     2  freebsd-ufs  (38G)\n"
"   79691810    4194236     3  freebsd-swap  (2G)\n"
"   83886046   18513921        - free -  (8.8G)\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:195
msgid ""
"Partitions can only be resized into contiguous free space.  Here, the last "
"partition on the disk is the swap partition, but the second partition is the "
"one that needs to be resized.  Swap partitions only contain temporary data, "
"so it can safely be unmounted, deleted, and then recreate the third "
"partition after resizing the second partition."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:197
msgid "Disable the swap partition:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:201
#, no-wrap
msgid "# swapoff /dev/ada0p3\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:204
msgid ""
"Delete the third partition, specified by the `-i` flag, from the disk _ada0_."
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:214
#, no-wrap
msgid ""
"# gpart delete -i 3 ada0\n"
"ada0p3 deleted\n"
"# gpart show ada0\n"
"=>       34  102399933  ada0  GPT  (48G)\n"
"         34        128     1  freebsd-boot  (64k)\n"
"        162   79691648     2  freebsd-ufs  (38G)\n"
"   79691810   22708157        - free -  (10G)\n"
msgstr ""

#. type: delimited block = 4
#: documentation/content/en/books/handbook/disks/_index.adoc:222
msgid ""
"There is risk of data loss when modifying the partition table of a mounted "
"file system.  It is best to perform the following steps on an unmounted file "
"system while running from a live CD-ROM or USB device.  However, if "
"absolutely necessary, a mounted file system can be resized after disabling "
"GEOM safety features:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:226
#, no-wrap
msgid "# sysctl kern.geom.debugflags=16\n"
msgstr ""

#. type: delimited block = 4
#: documentation/content/en/books/handbook/disks/_index.adoc:235
msgid ""
"Resize the partition, leaving room to recreate a swap partition of the "
"desired size.  The partition to resize is specified with `-i`, and the new "
"desired size with `-s`.  Optionally, alignment of the partition is "
"controlled with `-a`.  This only modifies the size of the partition.  The "
"file system in the partition will be expanded in a separate step."
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:245
#, no-wrap
msgid ""
"# gpart resize -i 2 -s 47G -a 4k ada0\n"
"ada0p2 resized\n"
"# gpart show ada0\n"
"=>       34  102399933  ada0  GPT  (48G)\n"
"         34        128     1  freebsd-boot  (64k)\n"
"        162   98566144     2  freebsd-ufs  (47G)\n"
"   98566306    3833661        - free -  (1.8G)\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:249
msgid ""
"Recreate the swap partition and activate it.  If no size is specified with `-"
"s`, all remaining space is used:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:260
#, no-wrap
msgid ""
"# gpart add -t freebsd-swap -a 4k ada0\n"
"ada0p3 added\n"
"# gpart show ada0\n"
"=>       34  102399933  ada0  GPT  (48G)\n"
"         34        128     1  freebsd-boot  (64k)\n"
"        162   98566144     2  freebsd-ufs  (47G)\n"
"   98566306    3833661     3  freebsd-swap  (1.8G)\n"
"# swapon /dev/ada0p3\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:263
msgid ""
"Grow the UFS file system to use the new capacity of the resized partition:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:273
#, no-wrap
msgid ""
"# growfs /dev/ada0p2\n"
"Device is mounted read-write; resizing will result in temporary write suspension for /.\n"
"It's strongly recommended to make a backup before growing the file system.\n"
"OK to grow file system on /dev/ada0p2, mounted on /, from 38GB to 47GB? [Yes/No] Yes\n"
"super-block backups (for fsck -b #) at:\n"
" 80781312, 82063552, 83345792, 84628032, 85910272, 87192512, 88474752,\n"
" 89756992, 91039232, 92321472, 93603712, 94885952, 96168192, 97450432\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:276
msgid ""
"If the file system is ZFS, the resize is triggered by running the `online` "
"subcommand with `-e`:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:280
#, no-wrap
msgid "# zpool online -e zroot /dev/ada0p2\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:283
msgid ""
"Both the partition and the file system on it have now been resized to use "
"the newly-available disk space."
msgstr ""

#. type: Title ==
#: documentation/content/en/books/handbook/disks/_index.adoc:285
#, no-wrap
msgid "USB Storage Devices"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:289
msgid ""
"Many external storage solutions, such as hard drives, USB thumbdrives, and "
"CD and DVD burners, use the Universal Serial Bus (USB).  FreeBSD provides "
"support for USB 1.x, 2.0, and 3.0 devices."
msgstr ""

#. type: delimited block = 4
#: documentation/content/en/books/handbook/disks/_index.adoc:294
msgid ""
"USB 3.0 support is not compatible with some hardware, including Haswell "
"(Lynx point) chipsets.  If FreeBSD boots with a `failed with error 19` "
"message, disable xHCI/USB3 in the system BIOS."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:298
msgid ""
"Support for USB storage devices is built into the [.filename]#GENERIC# "
"kernel.  For a custom kernel, be sure that the following lines are present "
"in the kernel configuration file:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:311
#, no-wrap
msgid ""
"device scbus\t# SCSI bus (required for ATA/SCSI)\n"
"device da\t# Direct Access (disks)\n"
"device pass\t# Passthrough device (direct ATA/SCSI access)\n"
"device uhci\t# provides USB 1.x support\n"
"device ohci\t# provides USB 1.x support\n"
"device ehci\t# provides USB 2.0 support\n"
"device xhci\t# provides USB 3.0 support\n"
"device usb\t# USB Bus (required)\n"
"device umass\t# Disks/Mass storage - Requires scbus and da\n"
"device cd\t# needed for CD and DVD burners\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:315
msgid ""
"FreeBSD uses the man:umass[4] driver which uses the SCSI subsystem to access "
"USB storage devices.  Since any USB device will be seen as a SCSI device by "
"the system, if the USB device is a CD or DVD burner, do _not_ include "
"`device atapicam` in a custom kernel configuration file."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:317
msgid ""
"The rest of this section demonstrates how to verify that a USB storage "
"device is recognized by FreeBSD and how to configure the device so that it "
"can be used."
msgstr ""

#. type: Title ===
#: documentation/content/en/books/handbook/disks/_index.adoc:318
#, no-wrap
msgid "Device Configuration"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:323
msgid ""
"To test the USB configuration, plug in the USB device.  Use `dmesg` to "
"confirm that the drive appears in the system message buffer.  It should look "
"something like this:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:335
#, no-wrap
msgid ""
"umass0: <STECH Simple Drive, class 0/0, rev 2.00/1.04, addr 3> on usbus0\n"
"umass0:  SCSI over Bulk-Only; quirks = 0x0100\n"
"umass0:4:0:-1: Attached to scbus4\n"
"da0 at umass-sim0 bus 0 scbus4 target 0 lun 0\n"
"da0: <STECH Simple Drive 1.04> Fixed Direct Access SCSI-4 device\n"
"da0: Serial Number WD-WXE508CAN263\n"
"da0: 40.000MB/s transfers\n"
"da0: 152627MB (312581808 512 byte sectors: 255H 63S/T 19457C)\n"
"da0: quirks=0x2<NO_6_BYTE>\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:338
msgid ""
"The brand, device node ([.filename]#da0#), speed, and size will differ "
"according to the device."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:340
msgid ""
"Since the USB device is seen as a SCSI one, `camcontrol` can be used to list "
"the USB storage devices attached to the system:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:345
#, no-wrap
msgid ""
"# camcontrol devlist\n"
"<STECH Simple Drive 1.04>          at scbus4 target 0 lun 0 (pass3,da0)\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:349
msgid ""
"Alternately, `usbconfig` can be used to list the device.  Refer to man:"
"usbconfig[8] for more information about this command."
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:354
#, no-wrap
msgid ""
"# usbconfig\n"
"ugen0.3: <Simple Drive STECH> at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (2mA)\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:358
msgid ""
"If the device has not been formatted, refer to <<disks-adding>> for "
"instructions on how to format and create partitions on the USB drive.  If "
"the drive comes with a file system, it can be mounted by `root` using the "
"instructions in crossref:basics[mount-unmount,“Mounting and Unmounting File "
"Systems”]."
msgstr ""

#. type: delimited block = 4
#: documentation/content/en/books/handbook/disks/_index.adoc:363
msgid ""
"Allowing untrusted users to mount arbitrary media, by enabling `vfs."
"usermount` as described below, should not be considered safe from a security "
"point of view.  Most file systems were not built to safeguard against "
"malicious devices."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:367
msgid ""
"To make the device mountable as a normal user, one solution is to make all "
"users of the device a member of the `operator` group using man:pw[8].  Next, "
"ensure that `operator` is able to read and write the device by adding these "
"lines to [.filename]#/etc/devfs.rules#:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:372
#, no-wrap
msgid ""
"[localrules=5]\n"
"add path 'da*' mode 0660 group operator\n"
msgstr ""

#. type: delimited block = 4
#: documentation/content/en/books/handbook/disks/_index.adoc:377
msgid ""
"If internal SCSI disks are also installed in the system, change the second "
"line as follows:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:381
#, no-wrap
msgid "add path 'da[3-9]*' mode 0660 group operator\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:386
msgid ""
"This will exclude the first three SCSI disks ([.filename]#da0# to [."
"filename]#da2#) from belonging to the `operator` group.  Replace _3_ with "
"the number of internal SCSI disks.  Refer to man:devfs.rules[5] for more "
"information about this file."
msgstr ""

#. type: delimited block = 4
#: documentation/content/en/books/handbook/disks/_index.adoc:389
msgid "Next, enable the ruleset in [.filename]#/etc/rc.conf#:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:393
#, no-wrap
msgid "devfs_system_ruleset=\"localrules\"\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:396
msgid ""
"Then, instruct the system to allow regular users to mount file systems by "
"adding the following line to [.filename]#/etc/sysctl.conf#:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:400
#, no-wrap
msgid "vfs.usermount=1\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:403
msgid ""
"Since this only takes effect after the next reboot, use `sysctl` to set this "
"variable now:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:408
#, no-wrap
msgid ""
"# sysctl vfs.usermount=1\n"
"vfs.usermount: 0 -> 1\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:414
msgid ""
"The final step is to create a directory where the file system is to be "
"mounted.  This directory needs to be owned by the user that is to mount the "
"file system.  One way to do that is for `root` to create a subdirectory "
"owned by that user as [.filename]#/mnt/username#.  In the following example, "
"replace _username_ with the login name of the user and _usergroup_ with the "
"user's primary group:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:419
#, no-wrap
msgid ""
"# mkdir /mnt/username\n"
"# chown username:usergroup /mnt/username\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:423
msgid ""
"Suppose a USB thumbdrive is plugged in, and a device [.filename]#/dev/da0s1# "
"appears.  If the device is formatted with a FAT file system, the user can "
"mount it using:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:427
#, no-wrap
msgid "% mount -t msdosfs -o -m=644,-M=755 /dev/da0s1 /mnt/username\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:430
msgid "Before the device can be unplugged, it _must_ be unmounted first:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:434
#, no-wrap
msgid "% umount /mnt/username\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:437
msgid ""
"After device removal, the system message buffer will show messages similar "
"to the following:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:444
#, no-wrap
msgid ""
"umass0: at uhub3, port 2, addr 3 (disconnected)\n"
"da0 at umass-sim0 bus 0 scbus4 target 0 lun 0\n"
"da0: <STECH Simple Drive 1.04> s/n WD-WXE508CAN263          detached\n"
"(da0:umass-sim0:0:0:0): Periph destroyed\n"
msgstr ""

#. type: Title ===
#: documentation/content/en/books/handbook/disks/_index.adoc:446
#, no-wrap
msgid "Automounting Removable Media"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:449
msgid ""
"USB devices can be automatically mounted by uncommenting this line in [."
"filename]#/etc/auto_master#:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:453
#, no-wrap
msgid "/media\t\t-media\t\t-nosuid\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:456
msgid "Then add these lines to [.filename]#/etc/devd.conf#:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:464
#, no-wrap
msgid ""
"notify 100 {\n"
"\tmatch \"system\" \"GEOM\";\n"
"\tmatch \"subsystem\" \"DEV\";\n"
"\taction \"/usr/sbin/automount -c\";\n"
"};\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:467
msgid ""
"Reload the configuration if man:autofs[5] and man:devd[8] are already "
"running:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:472
#, no-wrap
msgid ""
"# service automount restart\n"
"# service devd restart\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:475
msgid ""
"man:autofs[5] can be set to start at boot by adding this line to [."
"filename]#/etc/rc.conf#:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:479
#, no-wrap
msgid "autofs_enable=\"YES\"\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:482
msgid "man:autofs[5] requires man:devd[8] to be enabled, as it is by default."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:484
msgid "Start the services immediately with:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:491
#, no-wrap
msgid ""
"# service automount start\n"
"# service automountd start\n"
"# service autounmountd start\n"
"# service devd start\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:496
msgid ""
"Each file system that can be automatically mounted appears as a directory in "
"[.filename]#/media/#.  The directory is named after the file system label.  "
"If the label is missing, the directory is named after the device node."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:499
msgid ""
"The file system is transparently mounted on the first access, and unmounted "
"after a period of inactivity.  Automounted drives can also be unmounted "
"manually:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:503
#, no-wrap
msgid "# automount -fu\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:507
msgid ""
"This mechanism is typically used for memory cards and USB memory sticks.  It "
"can be used with any block device, including optical drives or iSCSILUNs."
msgstr ""

#. type: Title ==
#: documentation/content/en/books/handbook/disks/_index.adoc:509
#, no-wrap
msgid "Creating and Using CD Media"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:515
msgid ""
"Compact Disc (CD) media provide a number of features that differentiate them "
"from conventional disks.  They are designed so that they can be read "
"continuously without delays to move the head between tracks.  While CD media "
"do have tracks, these refer to a section of data to be read continuously, "
"and not a physical property of the disk.  The ISO 9660 file system was "
"designed to deal with these differences."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:519
msgid ""
"The FreeBSD Ports Collection provides several utilities for burning and "
"duplicating audio and data CDs.  This chapter demonstrates the use of "
"several command line utilities.  For CD burning software with a graphical "
"utility, consider installing the package:sysutils/xcdroast[] or package:"
"sysutils/k3b[] packages or ports."
msgstr ""

#. type: Title ===
#: documentation/content/en/books/handbook/disks/_index.adoc:521
#, no-wrap
msgid "Supported Devices"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:525
msgid ""
"The [.filename]#GENERIC# kernel provides support for SCSI, USB, and ATAPICD "
"readers and burners.  If a custom kernel is used, the options that need to "
"be present in the kernel configuration file vary by the type of device."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:527
msgid "For a SCSI burner, make sure these options are present:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:534
#, no-wrap
msgid ""
"device scbus\t# SCSI bus (required for ATA/SCSI)\n"
"device da\t# Direct Access (disks)\n"
"device pass\t# Passthrough device (direct ATA/SCSI access)\n"
"device cd\t# needed for CD and DVD burners\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:537
msgid "For a USB burner, make sure these options are present:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:550
#, no-wrap
msgid ""
"device scbus\t# SCSI bus (required for ATA/SCSI)\n"
"device da\t# Direct Access (disks)\n"
"device pass\t# Passthrough device (direct ATA/SCSI access)\n"
"device cd\t# needed for CD and DVD burners\n"
"device uhci\t# provides USB 1.x support\n"
"device ohci\t# provides USB 1.x support\n"
"device ehci\t# provides USB 2.0 support\n"
"device xhci\t# provides USB 3.0 support\n"
"device usb\t# USB Bus (required)\n"
"device umass\t# Disks/Mass storage - Requires scbus and da\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:553
msgid "For an ATAPI burner, make sure these options are present:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:560
#, no-wrap
msgid ""
"device ata\t# Legacy ATA/SATA controllers\n"
"device scbus\t# SCSI bus (required for ATA/SCSI)\n"
"device pass\t# Passthrough device (direct ATA/SCSI access)\n"
"device cd\t# needed for CD and DVD burners\n"
msgstr ""

#. type: delimited block = 4
#: documentation/content/en/books/handbook/disks/_index.adoc:565
msgid ""
"On FreeBSD versions prior to 10.x, this line is also needed in the kernel "
"configuration file if the burner is an ATAPI device:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:569
#, no-wrap
msgid "device atapicam\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:572
msgid ""
"Alternately, this driver can be loaded at boot time by adding the following "
"line to [.filename]#/boot/loader.conf#:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:576
#, no-wrap
msgid "atapicam_load=\"YES\"\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:579
msgid ""
"This will require a reboot of the system as this driver can only be loaded "
"at boot time."
msgstr ""

#. type: delimited block = 4
#: documentation/content/en/books/handbook/disks/_index.adoc:583
msgid ""
"To verify that FreeBSD recognizes the device, run `dmesg` and look for an "
"entry for the device.  On systems prior to 10.x, the device name in the "
"first line of the output will be [.filename]#acd0# instead of [."
"filename]#cd0#."
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:592
#, no-wrap
msgid ""
"% dmesg | grep cd\n"
"cd0 at ahcich1 bus 0 scbus1 target 0 lun 0\n"
"cd0: <HL-DT-ST DVDRAM GU70N LT20> Removable CD-ROM SCSI-0 device\n"
"cd0: Serial Number M3OD3S34152\n"
"cd0: 150.000MB/s transfers (SATA 1.x, UDMA6, ATAPI 12bytes, PIO 8192bytes)\n"
"cd0: Attempt to query device size failed: NOT READY, Medium not present - tray closed\n"
msgstr ""

#. type: Title ===
#: documentation/content/en/books/handbook/disks/_index.adoc:595
#, no-wrap
msgid "Burning a CD"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:599
msgid ""
"In FreeBSD, `cdrecord` can be used to burn CDs.  This command is installed "
"with the package:sysutils/cdrtools[] package or port."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:602
msgid ""
"While `cdrecord` has many options, basic usage is simple.  Specify the name "
"of the ISO file to burn and, if the system has multiple burner devices, "
"specify the name of the device to use:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:606
#, no-wrap
msgid "# cdrecord dev=device imagefile.iso\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:609
msgid ""
"To determine the device name of the burner, use `-scanbus` which might "
"produce results like this:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:633
#, no-wrap
msgid ""
"# cdrecord -scanbus\n"
"ProDVD-ProBD-Clone 3.00 (amd64-unknown-freebsd10.0) Copyright (C) 1995-2010 Jörg Schilling\n"
"Using libscg version 'schily-0.9'\n"
"scsibus0:\n"
"        0,0,0     0) 'SEAGATE ' 'ST39236LW       ' '0004' Disk\n"
"        0,1,0     1) 'SEAGATE ' 'ST39173W        ' '5958' Disk\n"
"        0,2,0     2) *\n"
"        0,3,0     3) 'iomega  ' 'jaz 1GB         ' 'J.86' Removable Disk\n"
"        0,4,0     4) 'NEC     ' 'CD-ROM DRIVE:466' '1.26' Removable CD-ROM\n"
"        0,5,0     5) *\n"
"        0,6,0     6) *\n"
"        0,7,0     7) *\n"
"scsibus1:\n"
"        1,0,0   100) *\n"
"        1,1,0   101) *\n"
"        1,2,0   102) *\n"
"        1,3,0   103) *\n"
"        1,4,0   104) *\n"
"        1,5,0   105) 'YAMAHA  ' 'CRW4260         ' '1.0q' Removable CD-ROM\n"
"        1,6,0   106) 'ARTEC   ' 'AM12S           ' '1.06' Scanner\n"
"        1,7,0   107) *\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:638
msgid ""
"Locate the entry for the CD burner and use the three numbers separated by "
"commas as the value for `dev`.  In this case, the Yamaha burner device is "
"`1,5,0`, so the appropriate input to specify that device is `dev=1,5,0`.  "
"Refer to the manual page for `cdrecord` for other ways to specify this value "
"and for information on writing audio tracks and controlling the write speed."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:640
msgid ""
"Alternately, run the following command to get the device address of the "
"burner:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:645
#, no-wrap
msgid ""
"# camcontrol devlist\n"
"<MATSHITA CDRW/DVD UJDA740 1.00>   at scbus1 target 0 lun 0 (cd0,pass0)\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:649
msgid ""
"Use the numeric values for `scbus`, `target`, and `lun`.  For this example, "
"`1,0,0` is the device name to use."
msgstr ""

#. type: Title ===
#: documentation/content/en/books/handbook/disks/_index.adoc:651
#, no-wrap
msgid "Writing Data to an ISO File System"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:656
msgid ""
"In order to produce a data CD, the data files that are going to make up the "
"tracks on the CD must be prepared before they can be burned to the CD.  In "
"FreeBSD, package:sysutils/cdrtools[] installs `mkisofs`, which can be used "
"to produce an ISO 9660 file system that is an image of a directory tree "
"within a UNIX(R) file system.  The simplest usage is to specify the name of "
"the ISO file to create and the path to the files to place into the ISO 9660 "
"file system:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:660
#, no-wrap
msgid "# mkisofs -o imagefile.iso /path/to/tree\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:663
msgid ""
"This command maps the file names in the specified path to names that fit the "
"limitations of the standard ISO 9660 file system, and will exclude files "
"that do not meet the standard for ISO file systems."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:666
msgid ""
"A number of options are available to overcome the restrictions imposed by "
"the standard.  In particular, `-R` enables the Rock Ridge extensions common "
"to UNIX(R) systems and `-J` enables Joliet extensions used by Microsoft(R) "
"systems."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:669
msgid ""
"For CDs that are going to be used only on FreeBSD systems, `-U` can be used "
"to disable all filename restrictions.  When used with `-R`, it produces a "
"file system image that is identical to the specified FreeBSD tree, even if "
"it violates the ISO 9660 standard."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:677
msgid ""
"The last option of general use is `-b`.  This is used to specify the "
"location of a boot image for use in producing an \"El Torito\" bootable CD.  "
"This option takes an argument which is the path to a boot image from the top "
"of the tree being written to the CD.  By default, `mkisofs` creates an ISO "
"image in \"floppy disk emulation\" mode, and thus expects the boot image to "
"be exactly 1200, 1440 or 2880 KB in size.  Some boot loaders, like the one "
"used by the FreeBSD distribution media, do not use emulation mode.  In this "
"case, `-no-emul-boot` should be used.  So, if [.filename]#/tmp/myboot# holds "
"a bootable FreeBSD system with the boot image in [.filename]#/tmp/myboot/"
"boot/cdboot#, this command would produce [.filename]#/tmp/bootable.iso#:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:681
#, no-wrap
msgid "# mkisofs -R -no-emul-boot -b boot/cdboot -o /tmp/bootable.iso /tmp/myboot\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:684
msgid "The resulting ISO image can be mounted as a memory disk with:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:689
#, no-wrap
msgid ""
"# mdconfig -a -t vnode -f /tmp/bootable.iso -u 0\n"
"# mount -t cd9660 /dev/md0 /mnt\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:692
msgid ""
"One can then verify that [.filename]#/mnt# and [.filename]#/tmp/myboot# are "
"identical."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:695
msgid ""
"There are many other options available for `mkisofs` to fine-tune its "
"behavior.  Refer to man:mkisofs[8] for details."
msgstr ""

#. type: delimited block = 4
#: documentation/content/en/books/handbook/disks/_index.adoc:700
msgid ""
"It is possible to copy a data CD to an image file that is functionally "
"equivalent to the image file created with `mkisofs`.  To do so, use [."
"filename]#dd# with the device name as the input file and the name of the ISO "
"to create as the output file:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:704
#, no-wrap
msgid "# dd if=/dev/cd0 of=file.iso bs=2048\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:707
msgid ""
"The resulting image file can be burned to CD as described in <<cdrecord>>."
msgstr ""

#. type: Title ===
#: documentation/content/en/books/handbook/disks/_index.adoc:710
#, no-wrap
msgid "Using Data CDs"
msgstr ""

#. type: delimited block = 4
#: documentation/content/en/books/handbook/disks/_index.adoc:713
msgid ""
"Once an ISO has been burned to a CD, it can be mounted by specifying the "
"file system type, the name of the device containing the CD, and an existing "
"mount point:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:717
#, no-wrap
msgid "# mount -t cd9660 /dev/cd0 /mnt\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:720
msgid ""
"Since `mount` assumes that a file system is of type `ufs`, an `Incorrect "
"super block` error will occur if `-t cd9660` is not included when mounting a "
"data CD."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:725
msgid ""
"While any data CD can be mounted this way, disks with certain ISO 9660 "
"extensions might behave oddly.  For example, Joliet disks store all "
"filenames in two-byte Unicode characters.  If some non-English characters "
"show up as question marks, specify the local charset with `-C`.  For more "
"information, refer to man:mount_cd9660[8]."
msgstr ""

#. type: delimited block = 4
#: documentation/content/en/books/handbook/disks/_index.adoc:730
msgid ""
"In order to do this character conversion with the help of `-C`, the kernel "
"requires the [.filename]#cd9660_iconv.ko# module to be loaded.  This can be "
"done either by adding this line to [.filename]#loader.conf#:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:734
#, no-wrap
msgid "cd9660_iconv_load=\"YES\"\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:737
msgid ""
"and then rebooting the machine, or by directly loading the module with "
"`kldload`."
msgstr ""

#. type: delimited block = 4
#: documentation/content/en/books/handbook/disks/_index.adoc:742
msgid ""
"Occasionally, `Device not configured` will be displayed when trying to mount "
"a data CD.  This usually means that the CD drive has not detected a disk in "
"the tray, or that the drive is not visible on the bus.  It can take a couple "
"of seconds for a CD drive to detect media, so be patient."
msgstr ""

#. type: delimited block = 4
#: documentation/content/en/books/handbook/disks/_index.adoc:746
msgid ""
"Sometimes, a SCSICD drive may be missed because it did not have enough time "
"to answer the bus reset.  To resolve this, a custom kernel can be created "
"which increases the default SCSI delay.  Add the following option to the "
"custom kernel configuration file and rebuild the kernel using the "
"instructions in crossref:kernelconfig[kernelconfig-building,“Building and "
"Installing a Custom Kernel”]:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:750
#, no-wrap
msgid "options SCSI_DELAY=15000\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:753
msgid ""
"This tells the SCSI bus to pause 15 seconds during boot, to give the CD "
"drive every possible chance to answer the bus reset."
msgstr ""

#. type: delimited block = 4
#: documentation/content/en/books/handbook/disks/_index.adoc:758
msgid ""
"It is possible to burn a file directly to CD, without creating an ISO 9660 "
"file system.  This is known as burning a raw data CD and some people do this "
"for backup purposes."
msgstr ""

#. type: delimited block = 4
#: documentation/content/en/books/handbook/disks/_index.adoc:762
msgid ""
"This type of disk can not be mounted as a normal data CD.  In order to "
"retrieve the data burned to such a CD, the data must be read from the raw "
"device node.  For example, this command will extract a compressed tar file "
"located on the second CD device into the current working directory:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:766
#, no-wrap
msgid "# tar xzvf /dev/cd1\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:769
msgid "In order to mount a data CD, the data must be written using `mkisofs`."
msgstr ""

#. type: Title ===
#: documentation/content/en/books/handbook/disks/_index.adoc:772
#, no-wrap
msgid "Duplicating Audio CDs"
msgstr ""

#. type: delimited block = 4
#: documentation/content/en/books/handbook/disks/_index.adoc:775
msgid ""
"To duplicate an audio CD, extract the audio data from the CD to a series of "
"files, then write these files to a blank CD."
msgstr ""

#. type: delimited block = 4
#: documentation/content/en/books/handbook/disks/_index.adoc:778
msgid ""
"<<using-cdrecord>> describes how to duplicate and burn an audio CD.  If the "
"FreeBSD version is less than 10.0 and the device is ATAPI, the `atapicam` "
"module must be first loaded using the instructions in <<atapicam>>."
msgstr ""

#. type: Block title
#: documentation/content/en/books/handbook/disks/_index.adoc:781
#, no-wrap
msgid "Procedure: Duplicating an Audio CD"
msgstr ""

#. type: delimited block = 4
#: documentation/content/en/books/handbook/disks/_index.adoc:783
msgid ""
"The package:sysutils/cdrtools[] package or port installs `cdda2wav`. This "
"command can be used to extract all of the audio tracks, with each track "
"written to a separate WAV file in the current working directory:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:787
#, no-wrap
msgid "% cdda2wav -vall -B -Owav\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:791
msgid ""
"A device name does not need to be specified if there is only one CD device "
"on the system.  Refer to the `cdda2wav` manual page for instructions on how "
"to specify a device and to learn more about the other options available for "
"this command."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:792
msgid "Use `cdrecord` to write the [.filename]#.wav# files:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:796
#, no-wrap
msgid "% cdrecord -v dev=2,0 -dao -useinfo  *.wav\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:799
msgid ""
"Make sure that _2,0_ is set appropriately, as described in <<cdrecord>>."
msgstr ""

#. type: Title ==
#: documentation/content/en/books/handbook/disks/_index.adoc:801
#, no-wrap
msgid "Creating and Using DVD Media"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:805
msgid ""
"Compared to the CD, the DVD is the next generation of optical media storage "
"technology.  The DVD can hold more data than any CD and is the standard for "
"video publishing."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:807
msgid "Five physical recordable formats can be defined for a recordable DVD:"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:809
msgid ""
"DVD-R: This was the first DVD recordable format available. The DVD-R "
"standard is defined by the http://www.dvdforum.org/forum.shtml[DVD Forum]. "
"This format is write once."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:810
msgid ""
"DVD-RW: This is the rewritable version of the DVD-R standard. A DVD-RW can "
"be rewritten about 1000 times."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:811
msgid ""
"DVD-RAM: This is a rewritable format which can be seen as a removable hard "
"drive. However, this media is not compatible with most DVD-ROM drives and "
"DVD-Video players as only a few DVD writers support the DVD-RAM format. "
"Refer to <<creating-dvd-ram>> for more information on DVD-RAM use."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:812
msgid ""
"DVD+RW: This is a rewritable format defined by the https://en.wikipedia.org/"
"wiki/DVD%2BRW_Alliance[DVD+RW Alliance]. A DVD+RW can be rewritten about "
"1000 times."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:813
msgid "DVD+R: This format is the write once variation of the DVD+RW format."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:815
msgid ""
"A single layer recordable DVD can hold up to 4,700,000,000 bytes which is "
"actually 4.38 GB or 4485 MB as 1 kilobyte is 1024 bytes."
msgstr ""

#. type: delimited block = 4
#: documentation/content/en/books/handbook/disks/_index.adoc:821
msgid ""
"A distinction must be made between the physical media and the application.  "
"For example, a DVD-Video is a specific file layout that can be written on "
"any recordable DVD physical media such as DVD-R, DVD+R, or DVD-RW.  Before "
"choosing the type of media, ensure that both the burner and the DVD-Video "
"player are compatible with the media under consideration."
msgstr ""

#. type: Title ===
#: documentation/content/en/books/handbook/disks/_index.adoc:823
#, no-wrap
msgid "Configuration"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:827
msgid ""
"To perform DVD recording, use man:growisofs[1].  This command is part of the "
"package:sysutils/dvd+rw-tools[] utilities which support all DVD media types."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:831
msgid ""
"These tools use the SCSI subsystem to access the devices, therefore "
"<<atapicam,ATAPI/CAM support>> must be loaded or statically compiled into "
"the kernel.  This support is not needed if the burner uses the USB "
"interface.  Refer to <<usb-disks>> for more details on USB device "
"configuration."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:833
msgid ""
"DMA access must also be enabled for ATAPI devices, by adding the following "
"line to [.filename]#/boot/loader.conf#:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:837
#: documentation/content/en/books/handbook/disks/_index.adoc:1070
#, no-wrap
msgid "hw.ata.atapi_dma=\"1\"\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:840
msgid ""
"Before attempting to use dvd+rw-tools, consult the http://fy.chalmers.se/"
"~appro/linux/DVD+RW/hcn.html[Hardware Compatibility Notes]."
msgstr ""

#. type: delimited block = 4
#: documentation/content/en/books/handbook/disks/_index.adoc:844
msgid ""
"For a graphical user interface, consider using package:sysutils/k3b[] which "
"provides a user friendly interface to man:growisofs[1] and many other "
"burning tools."
msgstr ""

#. type: Title ===
#: documentation/content/en/books/handbook/disks/_index.adoc:846
#, no-wrap
msgid "Burning Data DVDs"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:850
msgid ""
"Since man:growisofs[1] is a front-end to <<mkisofs,mkisofs>>, it will invoke "
"man:mkisofs[8] to create the file system layout and perform the write on the "
"DVD.  This means that an image of the data does not need to be created "
"before the burning process."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:852
msgid ""
"To burn to a DVD+R or a DVD-R the data in [.filename]#/path/to/data#, use "
"the following command:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:856
#, no-wrap
msgid "# growisofs -dvd-compat -Z /dev/cd0 -J -R /path/to/data\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:860
msgid ""
"In this example, `-J -R` is passed to man:mkisofs[8] to create an ISO 9660 "
"file system with Joliet and Rock Ridge extensions.  Refer to man:mkisofs[8] "
"for more details."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:865
msgid ""
"For the initial session recording, `-Z` is used for both single and multiple "
"sessions.  Replace _/dev/cd0_, with the name of the DVD device.  Using `-dvd-"
"compat` indicates that the disk will be closed and that the recording will "
"be unappendable.  This should also provide better media compatibility with "
"DVD-ROM drives."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:867
msgid "To burn a pre-mastered image, such as _imagefile.iso_, use:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:871
#, no-wrap
msgid "# growisofs -dvd-compat -Z /dev/cd0=imagefile.iso\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:875
msgid ""
"The write speed should be detected and automatically set according to the "
"media and the drive being used.  To force the write speed, use `-speed=`. "
"Refer to man:growisofs[1] for example usage."
msgstr ""

#. type: delimited block = 4
#: documentation/content/en/books/handbook/disks/_index.adoc:882
msgid ""
"In order to support working files larger than 4.38GB, an UDF/ISO-9660 hybrid "
"file system must be created by passing `-udf -iso-level 3` to man:mkisofs[8] "
"and all related programs, such as man:growisofs[1].  This is required only "
"when creating an ISO image file or when writing files directly to a disk.  "
"Since a disk created this way must be mounted as an UDF file system with man:"
"mount_udf[8], it will be usable only on an UDF aware operating system.  "
"Otherwise it will look as if it contains corrupted files."
msgstr ""

#. type: delimited block = 4
#: documentation/content/en/books/handbook/disks/_index.adoc:884
msgid "To create this type of ISO file:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:888
#, no-wrap
msgid "% mkisofs -R -J -udf -iso-level 3 -o imagefile.iso /path/to/data\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:891
msgid "To burn files directly to a disk:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:895
#, no-wrap
msgid "# growisofs -dvd-compat -udf -iso-level 3 -Z /dev/cd0 -J -R /path/to/data\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:898
msgid ""
"When an ISO image already contains large files, no additional options are "
"required for man:growisofs[1] to burn that image on a disk."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:901
msgid ""
"Be sure to use an up-to-date version of package:sysutils/cdrtools[], which "
"contains man:mkisofs[8], as an older version may not contain large files "
"support.  If the latest version does not work, install package:sysutils/"
"cdrtools-devel[] and read its man:mkisofs[8]."
msgstr ""

#. type: Title ===
#: documentation/content/en/books/handbook/disks/_index.adoc:903
#, no-wrap
msgid "Burning a DVD-Video"
msgstr ""

#. type: delimited block = 4
#: documentation/content/en/books/handbook/disks/_index.adoc:907
msgid ""
"A DVD-Video is a specific file layout based on the ISO 9660 and micro-UDF (M-"
"UDF) specifications.  Since DVD-Video presents a specific data structure "
"hierarchy, a particular program such as package:multimedia/dvdauthor[] is "
"needed to author the DVD."
msgstr ""

#. type: delimited block = 4
#: documentation/content/en/books/handbook/disks/_index.adoc:910
msgid ""
"If an image of the DVD-Video file system already exists, it can be burned in "
"the same way as any other image.  If `dvdauthor` was used to make the DVD "
"and the result is in [.filename]#/path/to/video#, the following command "
"should be used to burn the DVD-Video:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:914
#, no-wrap
msgid "# growisofs -Z /dev/cd0 -dvd-video /path/to/video\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:918
msgid ""
"`-dvd-video` is passed to man:mkisofs[8] to instruct it to create a DVD-"
"Video file system layout.  This option implies the `-dvd-compat` man:"
"growisofs[1] option."
msgstr ""

#. type: Title ===
#: documentation/content/en/books/handbook/disks/_index.adoc:919
#, no-wrap
msgid "Using a DVD+RW"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:924
msgid ""
"Unlike CD-RW, a virgin DVD+RW needs to be formatted before first use.  It is "
"_recommended_ to let man:growisofs[1] take care of this automatically "
"whenever appropriate.  However, it is possible to use `dvd+rw-format` to "
"format the DVD+RW:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:928
#: documentation/content/en/books/handbook/disks/_index.adoc:1018
#, no-wrap
msgid "# dvd+rw-format /dev/cd0\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:932
msgid ""
"Only perform this operation once and keep in mind that only virgin DVD+RW "
"medias need to be formatted.  Once formatted, the DVD+RW can be burned as "
"usual."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:935
msgid ""
"To burn a totally new file system and not just append some data onto a "
"DVD+RW, the media does not need to be blanked first.  Instead, write over "
"the previous recording like this:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:939
#, no-wrap
msgid "# growisofs -Z /dev/cd0 -J -R /path/to/newdata\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:944
msgid ""
"The DVD+RW format supports appending data to a previous recording.  This "
"operation consists of merging a new session to the existing one as it is not "
"considered to be multi-session writing.  man:growisofs[1] will _grow_ the "
"ISO 9660 file system present on the media."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:946
msgid "For example, to append data to a DVD+RW, use the following:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:950
#: documentation/content/en/books/handbook/disks/_index.adoc:1038
#, no-wrap
msgid "# growisofs -M /dev/cd0 -J -R /path/to/nextdata\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:953
msgid ""
"The same man:mkisofs[8] options used to burn the initial session should be "
"used during next writes."
msgstr ""

#. type: delimited block = 4
#: documentation/content/en/books/handbook/disks/_index.adoc:958
msgid ""
"Use `-dvd-compat` for better media compatibility with DVD-ROM drives.  When "
"using DVD+RW, this option will not prevent the addition of data."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:961
msgid "To blank the media, use:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:965
#, no-wrap
msgid "# growisofs -Z /dev/cd0=/dev/zero\n"
msgstr ""

#. type: Title ===
#: documentation/content/en/books/handbook/disks/_index.adoc:967
#, no-wrap
msgid "Using a DVD-RW"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:971
msgid ""
"A DVD-RW accepts two disc formats: incremental sequential and restricted "
"overwrite.  By default, DVD-RW discs are in sequential format."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:974
msgid ""
"A virgin DVD-RW can be directly written without being formatted.  However, a "
"non-virgin DVD-RW in sequential format needs to be blanked before writing a "
"new initial session."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:976
msgid "To blank a DVD-RW in sequential mode:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:980
#: documentation/content/en/books/handbook/disks/_index.adoc:1025
#, no-wrap
msgid "# dvd+rw-format -blank=full /dev/cd0\n"
msgstr ""

#. type: delimited block = 4
#: documentation/content/en/books/handbook/disks/_index.adoc:987
msgid ""
"A full blanking using `-blank=full` will take about one hour on a 1x media.  "
"A fast blanking can be performed using `-blank`, if the DVD-RW will be "
"recorded in Disk-At-Once (DAO) mode.  To burn the DVD-RW in DAO mode, use "
"the command:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:991
#, no-wrap
msgid "# growisofs -use-the-force-luke=dao -Z /dev/cd0=imagefile.iso\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:994
msgid ""
"Since man:growisofs[1] automatically attempts to detect fast blanked media "
"and engage DAO write, `-use-the-force-luke=dao` should not be required."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:996
msgid ""
"One should instead use restricted overwrite mode with any DVD-RW as this "
"format is more flexible than the default of incremental sequential."
msgstr ""

#. type: delimited block = 4
#: documentation/content/en/books/handbook/disks/_index.adoc:999
msgid ""
"To write data on a sequential DVD-RW, use the same instructions as for the "
"other DVD formats:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:1003
#, no-wrap
msgid "# growisofs -Z /dev/cd0 -J -R /path/to/data\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1007
msgid ""
"To append some data to a previous recording, use `-M` with man:"
"growisofs[1].  However, if data is appended on a DVD-RW in incremental "
"sequential mode, a new session will be created on the disc and the result "
"will be a multi-session disc."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1012
msgid ""
"A DVD-RW in restricted overwrite format does not need to be blanked before a "
"new initial session.  Instead, overwrite the disc with `-Z`.  It is also "
"possible to grow an existing ISO 9660 file system written on the disc with `-"
"M`.  The result will be a one-session DVD."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1014
msgid ""
"To put a DVD-RW in restricted overwrite format, the following command must "
"be used:"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1021
msgid "To change back to sequential format, use:"
msgstr ""

#. type: Title ===
#: documentation/content/en/books/handbook/disks/_index.adoc:1027
#, no-wrap
msgid "Multi-Session"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1032
msgid ""
"Few DVD-ROM drives support multi-session DVDs and most of the time only read "
"the first session.  DVD+R, DVD-R and DVD-RW in sequential format can accept "
"multiple sessions.  The notion of multiple sessions does not exist for the "
"DVD+RW and the DVD-RW restricted overwrite formats."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1034
msgid ""
"Using the following command after an initial non-closed session on a DVD+R, "
"DVD-R, or DVD-RW in sequential format, will add a new session to the disc:"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1043
msgid ""
"Using this command with a DVD+RW or a DVD-RW in restricted overwrite mode "
"will append data while merging the new session to the existing one.  The "
"result will be a single-session disc.  Use this method to add data after an "
"initial write on these types of media."
msgstr ""

#. type: delimited block = 4
#: documentation/content/en/books/handbook/disks/_index.adoc:1048
msgid ""
"Since some space on the media is used between each session to mark the end "
"and start of sessions, one should add sessions with a large amount of data "
"to optimize media space.  The number of sessions is limited to 154 for a "
"DVD+R, about 2000 for a DVD-R, and 127 for a DVD+R Double Layer."
msgstr ""

#. type: Title ===
#: documentation/content/en/books/handbook/disks/_index.adoc:1050
#, no-wrap
msgid "For More Information"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1053
msgid ""
"To obtain more information about a DVD, use `dvd+rw-mediainfo _/dev/cd0_` "
"while the disc in the specified drive."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1055
msgid ""
"More information about dvd+rw-tools can be found in man:growisofs[1], on the "
"http://fy.chalmers.se/~appro/linux/DVD+RW/[dvd+rw-tools web site], and in "
"the http://lists.debian.org/cdwrite/[cdwrite mailing list] archives."
msgstr ""

#. type: delimited block = 4
#: documentation/content/en/books/handbook/disks/_index.adoc:1059
msgid ""
"When creating a problem report related to the use of dvd+rw-tools, always "
"include the output of `dvd+rw-mediainfo`."
msgstr ""

#. type: Title ===
#: documentation/content/en/books/handbook/disks/_index.adoc:1062
#, no-wrap
msgid "Using a DVD-RAM"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1066
msgid ""
"DVD-RAM writers can use either a SCSI or ATAPI interface.  For ATAPI "
"devices, DMA access has to be enabled by adding the following line to [."
"filename]#/boot/loader.conf#:"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1075
msgid ""
"A DVD-RAM can be seen as a removable hard drive.  Like any other hard drive, "
"the DVD-RAM must be formatted before it can be used.  In this example, the "
"whole disk space will be formatted with a standard UFS2 file system:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:1081
#, no-wrap
msgid ""
"# dd if=/dev/zero of=/dev/acd0 bs=2k count=1\n"
"# bsdlabel -Bw acd0\n"
"# newfs /dev/acd0\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1084
msgid ""
"The DVD device, [.filename]#acd0#, must be changed according to the "
"configuration."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1086
msgid ""
"Once the DVD-RAM has been formatted, it can be mounted as a normal hard "
"drive:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:1090
#, no-wrap
msgid "# mount /dev/acd0 /mnt\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1093
msgid "Once mounted, the DVD-RAM will be both readable and writeable."
msgstr ""

#. type: Title ==
#: documentation/content/en/books/handbook/disks/_index.adoc:1095
#, no-wrap
msgid "Creating and Using Floppy Disks"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1098
msgid "This section explains how to format a 3.5 inch floppy disk in FreeBSD."
msgstr ""

#. type: delimited block = 4
#: documentation/content/en/books/handbook/disks/_index.adoc:1102
#, no-wrap
msgid "*Procedure: Steps to Format a Floppy*\n"
msgstr ""

#. type: delimited block = 4
#: documentation/content/en/books/handbook/disks/_index.adoc:1107
msgid ""
"A floppy disk needs to be low-level formatted before it can be used.  This "
"is usually done by the vendor, but formatting is a good way to check media "
"integrity.  To low-level format the floppy disk on FreeBSD, use man:"
"fdformat[1].  When using this utility, make note of any error messages, as "
"these can help determine if the disk is good or bad."
msgstr ""

#. type: delimited block = 4
#: documentation/content/en/books/handbook/disks/_index.adoc:1109
msgid ""
"To format the floppy, insert a new 3.5 inch floppy disk into the first "
"floppy drive and issue:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:1113
#, no-wrap
msgid "# /usr/sbin/fdformat -f 1440 /dev/fd0\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1116
msgid ""
"After low-level formatting the disk, create a disk label as it is needed by "
"the system to determine the size of the disk and its geometry. The supported "
"geometry values are listed in [.filename]#/etc/disktab#."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1118
msgid "To write the disk label, use man:bsdlabel[8]:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:1122
#, no-wrap
msgid "# /sbin/bsdlabel -B -w /dev/fd0 fd1440\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1125
msgid ""
"The floppy is now ready to be high-level formatted with a file system. The "
"floppy's file system can be either UFS or FAT, where FAT is generally a "
"better choice for floppies."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1127
msgid "To format the floppy with FAT, issue:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:1131
#, no-wrap
msgid "# /sbin/newfs_msdos /dev/fd0\n"
msgstr ""

#. type: delimited block = 4
#: documentation/content/en/books/handbook/disks/_index.adoc:1137
msgid ""
"The disk is now ready for use.  To use the floppy, mount it with man:"
"mount_msdosfs[8].  One can also install and use package:emulators/mtools[] "
"from the Ports Collection."
msgstr ""

#. type: Title ==
#: documentation/content/en/books/handbook/disks/_index.adoc:1139
#, no-wrap
msgid "Using NTFS Disks"
msgstr ""

#. type: delimited block = 4
#: documentation/content/en/books/handbook/disks/_index.adoc:1142
msgid "This section explains how to mount NTFS disks in FreeBSD."
msgstr ""

#. type: delimited block = 4
#: documentation/content/en/books/handbook/disks/_index.adoc:1147
msgid ""
"NTFS (New Technology File System) is a proprietary journaling file system "
"developed by Microsoft(R).  It has been the default file system in Microsoft "
"Windows(R) for many years.  FreeBSD can mount NTFS volumes using a FUSE file "
"system.  These file systems are implemented as user space programs which "
"interact with the man:fusefs[5] kernel module via a well defined interface."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1151
#, no-wrap
msgid "*Procedure: Steps to Mount a NTFS Disk*\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1154
msgid ""
"Before using a FUSE file system we need to load the man:fusefs[5] kernel "
"module:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:1158
#, no-wrap
msgid "# kldload fusefs\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1161
msgid "Use man:sysrc[8] to load the module at startup:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:1165
#, no-wrap
msgid "# sysrc kld_list+=fusefs\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1168
msgid ""
"Install the actual NTFS file system from packages as in the example (see "
"crossref:ports[pkgng-intro,Using pkg for Binary Package Management]) or from "
"ports (see crossref:ports[ports-using,Using the Ports Collection]):"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:1172
#, no-wrap
msgid "# pkg install fusefs-ntfs\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1175
msgid ""
"Last we need to create a directory where the file system will be mounted:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:1179
#, no-wrap
msgid "# mkdir /mnt/usb\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1182
msgid ""
"Suppose a USB disk is plugged in.  The disk partition information can be "
"viewed with man:gpart[8]:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:1188
#, no-wrap
msgid ""
"# gpart show da0\n"
"=>\t  63  1953525105  da0 MBR   (932G)\n"
"\t  63  1953525105    1 ntfs  (932G)\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1191
msgid "We can mount the disk using the following command:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:1195
#, no-wrap
msgid "# ntfs-3g /dev/da0s1 /mnt/usb/\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1197
msgid "The disk is now ready to use."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1199
msgid "Additionally, an entry can be added to /etc/fstab:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:1203
#, no-wrap
msgid "/dev/da0s1  /mnt/usb\tntfs mountprog=/usr/local/bin/ntfs-3g,noauto,rw  0 0\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1206
msgid "Now the disk can be now mounted with:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:1210
#, no-wrap
msgid "# mount /mnt/usb\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1213
msgid "The disk can be unmounted with:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:1217
#, no-wrap
msgid "# umount /mnt/usb/\n"
msgstr ""

#. type: Title ==
#: documentation/content/en/books/handbook/disks/_index.adoc:1221
#, no-wrap
msgid "Backup Basics"
msgstr ""

#. type: delimited block = 4
#: documentation/content/en/books/handbook/disks/_index.adoc:1224
msgid ""
"Implementing a backup plan is essential in order to have the ability to "
"recover from disk failure, accidental file deletion, random file corruption, "
"or complete machine destruction, including destruction of on-site backups."
msgstr ""

#. type: delimited block = 4
#: documentation/content/en/books/handbook/disks/_index.adoc:1227
msgid ""
"The backup type and schedule will vary, depending upon the importance of the "
"data, the granularity needed for file restores, and the amount of acceptable "
"downtime.  Some possible backup techniques include:"
msgstr ""

#. type: delimited block = 4
#: documentation/content/en/books/handbook/disks/_index.adoc:1229
msgid ""
"Archives of the whole system, backed up onto permanent, off-site media. This "
"provides protection against all of the problems listed above, but is slow "
"and inconvenient to restore from, especially for non-privileged users."
msgstr ""

#. type: delimited block = 4
#: documentation/content/en/books/handbook/disks/_index.adoc:1230
msgid ""
"File system snapshots, which are useful for restoring deleted files or "
"previous versions of files."
msgstr ""

#. type: delimited block = 4
#: documentation/content/en/books/handbook/disks/_index.adoc:1231
msgid ""
"Copies of whole file systems or disks which are synchronized with another "
"system on the network using a scheduled package:net/rsync[]."
msgstr ""

#. type: delimited block = 4
#: documentation/content/en/books/handbook/disks/_index.adoc:1232
msgid ""
"Hardware or software RAID, which minimizes or avoids downtime when a disk "
"fails."
msgstr ""

#. type: delimited block = 4
#: documentation/content/en/books/handbook/disks/_index.adoc:1236
msgid ""
"Typically, a mix of backup techniques is used.  For example, one could "
"create a schedule to automate a weekly, full system backup that is stored "
"off-site and to supplement this backup with hourly ZFS snapshots.  In "
"addition, one could make a manual backup of individual directories or files "
"before making file edits or deletions."
msgstr ""

#. type: delimited block = 4
#: documentation/content/en/books/handbook/disks/_index.adoc:1238
msgid ""
"This section describes some of the utilities which can be used to create and "
"manage backups on a FreeBSD system."
msgstr ""

#. type: Title ===
#: documentation/content/en/books/handbook/disks/_index.adoc:1239
#, no-wrap
msgid "File System Backups"
msgstr ""

#. type: delimited block = 4
#: documentation/content/en/books/handbook/disks/_index.adoc:1245
msgid ""
"The traditional UNIX(R) programs for backing up a file system are man:"
"dump[8], which creates the backup, and man:restore[8], which restores the "
"backup.  These utilities work at the disk block level, below the "
"abstractions of the files, links, and directories that are created by file "
"systems.  Unlike other backup software, `dump` backs up an entire file "
"system and is unable to backup only part of a file system or a directory "
"tree that spans multiple file systems.  Instead of writing files and "
"directories, `dump` writes the raw data blocks that comprise files and "
"directories."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1249
msgid ""
"If `dump` is used on the root directory, it will not back up [.filename]#/"
"home#, [.filename]#/usr# or many other directories since these are typically "
"mount points for other file systems or symbolic links into those file "
"systems."
msgstr ""

#. type: delimited block = 4
#: documentation/content/en/books/handbook/disks/_index.adoc:1253
msgid ""
"When used to restore data, `restore` stores temporary files in [.filename]#/"
"tmp/# by default.  When using a recovery disk with a small [.filename]#/"
"tmp#, set `TMPDIR` to a directory with more free space in order for the "
"restore to succeed."
msgstr ""

#. type: delimited block = 4
#: documentation/content/en/books/handbook/disks/_index.adoc:1257
msgid ""
"When using `dump`, be aware that some quirks remain from its early days in "
"Version 6 of AT&T UNIX(R),circa 1975.  The default parameters assume a "
"backup to a 9-track tape, rather than to another type of media or to the "
"high-density tapes available today.  These defaults must be overridden on "
"the command line."
msgstr ""

#. type: delimited block = 4
#: documentation/content/en/books/handbook/disks/_index.adoc:1260
msgid ""
"It is possible to backup a file system across the network to a another "
"system or to a tape drive attached to another computer.  While the man:"
"rdump[8] and man:rrestore[8] utilities can be used for this purpose, they "
"are not considered to be secure."
msgstr ""

#. type: delimited block = 4
#: documentation/content/en/books/handbook/disks/_index.adoc:1263
msgid ""
"Instead, one can use `dump` and `restore` in a more secure fashion over an "
"SSH connection.  This example creates a full, compressed backup of [."
"filename]#/usr# and sends the backup file to the specified host over a SSH "
"connection."
msgstr ""

#. type: Block title
#: documentation/content/en/books/handbook/disks/_index.adoc:1264
#, no-wrap
msgid "Using `dump` over ssh"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:1271
#, no-wrap
msgid ""
"# /sbin/dump -0uan -f - /usr | gzip -2 | ssh -c blowfish \\\n"
"          targetuser@targetmachine.example.com dd of=/mybigfiles/dump-usr-l0.gz\n"
msgstr ""

#. type: delimited block = 4
#: documentation/content/en/books/handbook/disks/_index.adoc:1275
msgid ""
"This example sets `RSH` in order to write the backup to a tape drive on a "
"remote system over a SSH connection:"
msgstr ""

#. type: Block title
#: documentation/content/en/books/handbook/disks/_index.adoc:1276
#, no-wrap
msgid "Using `dump` over ssh with `RSH` Set"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:1282
#, no-wrap
msgid "# env RSH=/usr/bin/ssh /sbin/dump -0uan -f targetuser@targetmachine.example.com:/dev/sa0 /usr\n"
msgstr ""

#. type: Title ===
#: documentation/content/en/books/handbook/disks/_index.adoc:1285
#, no-wrap
msgid "Directory Backups"
msgstr ""

#. type: delimited block = 4
#: documentation/content/en/books/handbook/disks/_index.adoc:1288
msgid ""
"Several built-in utilities are available for backing up and restoring "
"specified files and directories as needed."
msgstr ""

#. type: delimited block = 4
#: documentation/content/en/books/handbook/disks/_index.adoc:1292
msgid ""
"A good choice for making a backup of all of the files in a directory is man:"
"tar[1].  This utility dates back to Version 6 of AT&T UNIX(R) and by default "
"assumes a recursive backup to a local tape device.  Switches can be used to "
"instead specify the name of a backup file."
msgstr ""

#. type: delimited block = 4
#: documentation/content/en/books/handbook/disks/_index.adoc:1295
msgid ""
"This example creates a compressed backup of the current directory and saves "
"it to [.filename]#/tmp/mybackup.tgz#.  When creating a backup file, make "
"sure that the backup is not saved to the same directory that is being backed "
"up."
msgstr ""

#. type: Block title
#: documentation/content/en/books/handbook/disks/_index.adoc:1296
#, no-wrap
msgid "Backing Up the Current Directory with `tar`"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:1302
#, no-wrap
msgid "# tar czvf /tmp/mybackup.tgz .\n"
msgstr ""

#. type: delimited block = 4
#: documentation/content/en/books/handbook/disks/_index.adoc:1308
msgid ""
"To restore the entire backup, `cd` into the directory to restore into and "
"specify the name of the backup.  Note that this will overwrite any newer "
"versions of files in the restore directory.  When in doubt, restore to a "
"temporary directory or specify the name of the file within the backup to "
"restore."
msgstr ""

#. type: Block title
#: documentation/content/en/books/handbook/disks/_index.adoc:1309
#, no-wrap
msgid "Restoring Up the Current Directory with `tar`"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:1315
#, no-wrap
msgid "# tar xzvf /tmp/mybackup.tgz\n"
msgstr ""

#. type: delimited block = 4
#: documentation/content/en/books/handbook/disks/_index.adoc:1320
msgid ""
"There are dozens of available switches which are described in man:tar[1].  "
"This utility also supports the use of exclude patterns to specify which "
"files should not be included when backing up the specified directory or "
"restoring files from a backup."
msgstr ""

#. type: delimited block = 4
#: documentation/content/en/books/handbook/disks/_index.adoc:1323
msgid ""
"To create a backup using a specified list of files and directories, man:"
"cpio[1] is a good choice.  Unlike `tar`, `cpio` does not know how to walk "
"the directory tree and it must be provided the list of files to backup."
msgstr ""

#. type: delimited block = 4
#: documentation/content/en/books/handbook/disks/_index.adoc:1326
msgid ""
"For example, a list of files can be created using `ls` or `find`.  This "
"example creates a recursive listing of the current directory which is then "
"piped to `cpio` in order to create an output backup file named [.filename]#/"
"tmp/mybackup.cpio#."
msgstr ""

#. type: Block title
#: documentation/content/en/books/handbook/disks/_index.adoc:1327
#, no-wrap
msgid "Using `ls` and `cpio` to Make a Recursive Backup of the Current Directory"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:1333
#, no-wrap
msgid "# ls -R | cpio -ovF /tmp/mybackup.cpio\n"
msgstr ""

#. type: delimited block = 4
#: documentation/content/en/books/handbook/disks/_index.adoc:1339
msgid ""
"A backup utility which tries to bridge the features provided by `tar` and "
"`cpio` is man:pax[1].  Over the years, the various versions of `tar` and "
"`cpio` became slightly incompatible.  POSIX(R) created `pax` which attempts "
"to read and write many of the various `cpio` and `tar` formats, plus new "
"formats of its own."
msgstr ""

#. type: delimited block = 4
#: documentation/content/en/books/handbook/disks/_index.adoc:1341
msgid "The `pax` equivalent to the previous examples would be:"
msgstr ""

#. type: Block title
#: documentation/content/en/books/handbook/disks/_index.adoc:1342
#, no-wrap
msgid "Backing Up the Current Directory with `pax`"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:1348
#, no-wrap
msgid "# pax -wf /tmp/mybackup.pax .\n"
msgstr ""

#. type: Title ===
#: documentation/content/en/books/handbook/disks/_index.adoc:1352
#, no-wrap
msgid "Using Data Tapes for Backups"
msgstr ""

#. type: delimited block = 4
#: documentation/content/en/books/handbook/disks/_index.adoc:1357
msgid ""
"While tape technology has continued to evolve, modern backup systems tend to "
"combine off-site backups with local removable media.  FreeBSD supports any "
"tape drive that uses SCSI, such as LTO or DAT.  There is limited support for "
"SATA and USB tape drives."
msgstr ""

#. type: delimited block = 4
#: documentation/content/en/books/handbook/disks/_index.adoc:1361
msgid ""
"For SCSI tape devices, FreeBSD uses the man:sa[4] driver and the [."
"filename]#/dev/sa0#, [.filename]#/dev/nsa0#, and [.filename]#/dev/esa0# "
"devices.  The physical device name is [.filename]#/dev/sa0#. When [."
"filename]#/dev/nsa0# is used, the backup application will not rewind the "
"tape after writing a file, which allows writing more than one file to a "
"tape.  Using [.filename]#/dev/esa0# ejects the tape after the device is "
"closed."
msgstr ""

#. type: delimited block = 4
#: documentation/content/en/books/handbook/disks/_index.adoc:1364
msgid ""
"In FreeBSD, `mt` is used to control operations of the tape drive, such as "
"seeking through files on a tape or writing tape control marks to the tape.  "
"For example, the first three files on a tape can be preserved by skipping "
"past them before writing a new file:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:1368
#, no-wrap
msgid "# mt -f /dev/nsa0 fsf 3\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1371
msgid "This utility supports many operations. Refer to man:mt[1] for details."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1373
msgid ""
"To write a single file to tape using `tar`, specify the name of the tape "
"device and the file to backup:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:1377
#, no-wrap
msgid "# tar cvf /dev/sa0 file\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1380
msgid ""
"To recover files from a `tar` archive on tape into the current directory:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:1384
#, no-wrap
msgid "# tar xvf /dev/sa0\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1388
msgid ""
"To backup a UFS file system, use `dump`.  This examples backs up [."
"filename]#/usr# without rewinding the tape when finished:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:1392
#, no-wrap
msgid "# dump -0aL -b64 -f /dev/nsa0 /usr\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1395
msgid ""
"To interactively restore files from a `dump` file on tape into the current "
"directory:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:1399
#, no-wrap
msgid "# restore -i -f /dev/nsa0\n"
msgstr ""

#. type: Title ===
#: documentation/content/en/books/handbook/disks/_index.adoc:1402
#, no-wrap
msgid "Third-Party Backup Utilities"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1406
msgid ""
"The FreeBSD Ports Collection provides many third-party utilities which can "
"be used to schedule the creation of backups, simplify tape backup, and make "
"backups easier and more convenient.  Many of these applications are client/"
"server based and can be used to automate the backups of a single system or "
"all of the computers in a network."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1408
msgid "Popular utilities include Amanda, Bacula, rsync, and duplicity."
msgstr ""

#. type: Title ===
#: documentation/content/en/books/handbook/disks/_index.adoc:1409
#, no-wrap
msgid "Emergency Recovery"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1412
msgid ""
"In addition to regular backups, it is recommended to perform the following "
"steps as part of an emergency preparedness plan."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1414
msgid "Create a print copy of the output of the following commands:"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1416
msgid "`gpart show`"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1417
msgid "`more /etc/fstab`"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1418
msgid "`dmesg`"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1422
msgid ""
"Store this printout and a copy of the installation media in a secure "
"location.  Should an emergency restore be needed, boot into the installation "
"media and select `Live CD` to access a rescue shell.  This rescue mode can "
"be used to view the current state of the system, and if needed, to reformat "
"disks and restore data from backups."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1427
msgid ""
"Next, test the rescue shell and the backups.  Make notes of the procedure.  "
"Store these notes with the media, the printouts, and the backups.  These "
"notes may prevent the inadvertent destruction of the backups while under the "
"stress of performing an emergency recovery."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1429
msgid ""
"For an added measure of security, store the latest backup at a remote "
"location which is physically separated from the computers and disk drives by "
"a significant distance."
msgstr ""

#. type: Title ==
#: documentation/content/en/books/handbook/disks/_index.adoc:1431
#, no-wrap
msgid "Memory Disks"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1435
msgid ""
"In addition to physical disks, FreeBSD also supports the creation and use of "
"memory disks.  One possible use for a memory disk is to access the contents "
"of an ISO file system without the overhead of first burning it to a CD or "
"DVD, then mounting the CD/DVD media."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1439
msgid ""
"In FreeBSD, the man:md[4] driver is used to provide support for memory "
"disks.  The [.filename]#GENERIC# kernel includes this driver.  When using a "
"custom kernel configuration file, ensure it includes this line:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:1443
#, no-wrap
msgid "device md\n"
msgstr ""

#. type: Title ===
#: documentation/content/en/books/handbook/disks/_index.adoc:1446
#, no-wrap
msgid "Attaching and Detaching Existing Images"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1452
msgid ""
"To mount an existing file system image, use `mdconfig` to specify the name "
"of the ISO file and a free unit number.  Then, refer to that unit number to "
"mount it on an existing mount point.  Once mounted, the files in the ISO "
"will appear in the mount point.  This example attaches _diskimage.iso_ to "
"the memory device [.filename]#/dev/md0# then mounts that memory device on [."
"filename]#/mnt#:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:1457
#, no-wrap
msgid ""
"# mdconfig -f diskimage.iso -u 0\n"
"# mount -t cd9660 /dev/md0 /mnt\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1462
msgid ""
"Notice that `-t cd9660` was used to mount an ISO format.  If a unit number "
"is not specified with `-u`, `mdconfig` will automatically allocate an unused "
"memory device and output the name of the allocated unit, such as [."
"filename]#md4#.  Refer to man:mdconfig[8] for more details about this "
"command and its options."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1466
msgid ""
"When a memory disk is no longer in use, its resources should be released "
"back to the system.  First, unmount the file system, then use `mdconfig` to "
"detach the disk from the system and release its resources.  To continue this "
"example:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:1471
#, no-wrap
msgid ""
"# umount /mnt\n"
"# mdconfig -d -u 0\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1474
msgid ""
"To determine if any memory disks are still attached to the system, type "
"`mdconfig -l`."
msgstr ""

#. type: Title ===
#: documentation/content/en/books/handbook/disks/_index.adoc:1476
#, no-wrap
msgid "Creating a File- or Memory-Backed Memory Disk"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1481
msgid ""
"FreeBSD also supports memory disks where the storage to use is allocated "
"from either a hard disk or an area of memory.  The first method is commonly "
"referred to as a file-backed file system and the second method as a memory-"
"backed file system.  Both types can be created using `mdconfig`."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1486
msgid ""
"To create a new memory-backed file system, specify a type of `swap` and the "
"size of the memory disk to create.  Then, format the memory disk with a file "
"system and mount as usual.  This example creates a 5M memory disk on unit "
"`1`.  That memory disk is then formatted with the UFS file system before it "
"is mounted:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:1500
#, no-wrap
msgid ""
"# mdconfig -a -t swap -s 5m -u 1\n"
"# newfs -U md1\n"
"/dev/md1: 5.0MB (10240 sectors) block size 16384, fragment size 2048\n"
"        using 4 cylinder groups of 1.27MB, 81 blks, 192 inodes.\n"
"        with soft updates\n"
"super-block backups (for fsck -b #) at:\n"
" 160, 2752, 5344, 7936\n"
"# mount /dev/md1 /mnt\n"
"# df /mnt\n"
"Filesystem 1K-blocks Used Avail Capacity  Mounted on\n"
"/dev/md1        4718    4  4338     0%    /mnt\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1504
msgid ""
"To create a new file-backed memory disk, first allocate an area of disk to "
"use.  This example creates an empty 5MB file named [.filename]#newimage#:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:1510
#, no-wrap
msgid ""
"# dd if=/dev/zero of=newimage bs=1k count=5k\n"
"5120+0 records in\n"
"5120+0 records out\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1513
msgid ""
"Next, attach that file to a memory disk, label the memory disk and format it "
"with the UFS file system, mount the memory disk, and verify the size of the "
"file-backed disk:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:1527
#, no-wrap
msgid ""
"# mdconfig -f newimage -u 0\n"
"# bsdlabel -w md0 auto\n"
"# newfs -U md0a\n"
"/dev/md0a: 5.0MB (10224 sectors) block size 16384, fragment size 2048\n"
"        using 4 cylinder groups of 1.25MB, 80 blks, 192 inodes.\n"
"super-block backups (for fsck -b #) at:\n"
" 160, 2720, 5280, 7840\n"
"# mount /dev/md0a /mnt\n"
"# df /mnt\n"
"Filesystem 1K-blocks Used Avail Capacity  Mounted on\n"
"/dev/md0a       4710    4  4330     0%    /mnt\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1532
msgid ""
"It takes several commands to create a file- or memory-backed file system "
"using `mdconfig`.  FreeBSD also comes with `mdmfs` which automatically "
"configures a memory disk, formats it with the UFS file system, and mounts "
"it.  For example, after creating _newimage_ with `dd`, this one command is "
"equivalent to running the `bsdlabel`, `newfs`, and `mount` commands shown "
"above:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:1536
#, no-wrap
msgid "# mdmfs -F newimage -s 5m md0 /mnt\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1539
msgid ""
"To instead create a new memory-based memory disk with `mdmfs`, use this one "
"command:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:1543
#, no-wrap
msgid "# mdmfs -s 5m md1 /mnt\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1547
msgid ""
"If the unit number is not specified, `mdmfs` will automatically select an "
"unused memory device.  For more details about `mdmfs`, refer to man:mdmfs[8]."
msgstr ""

#. type: Title ==
#: documentation/content/en/books/handbook/disks/_index.adoc:1549
#, no-wrap
msgid "File System Snapshots"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1552
msgid ""
"FreeBSD offers a feature in conjunction with crossref:config[soft-updates,"
"Soft Updates]: file system snapshots."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1558
msgid ""
"UFS snapshots allow a user to create images of specified file systems, and "
"treat them as a file.  Snapshot files must be created in the file system "
"that the action is performed on, and a user may create no more than 20 "
"snapshots per file system.  Active snapshots are recorded in the superblock "
"so they are persistent across unmount and remount operations along with "
"system reboots.  When a snapshot is no longer required, it can be removed "
"using man:rm[1].  While snapshots may be removed in any order, all the used "
"space may not be acquired because another snapshot will possibly claim some "
"of the released blocks."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1561
msgid ""
"The un-alterable `snapshot` file flag is set by man:mksnap_ffs[8] after "
"initial creation of a snapshot file.  man:unlink[1] makes an exception for "
"snapshot files since it allows them to be removed."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1564
msgid ""
"Snapshots are created using man:mount[8].  To place a snapshot of [."
"filename]#/var# in the file [.filename]#/var/snapshot/snap#, use the "
"following command:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:1568
#, no-wrap
msgid "# mount -u -o snapshot /var/snapshot/snap /var\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1571
msgid "Alternatively, use man:mksnap_ffs[8] to create the snapshot:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:1575
#, no-wrap
msgid "# mksnap_ffs /var /var/snapshot/snap\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1578
msgid ""
"One can find snapshot files on a file system, such as [.filename]#/var#, "
"using man:find[1]:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:1582
#, no-wrap
msgid "# find /var -flags snapshot\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1585
msgid "Once a snapshot has been created, it has several uses:"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1587
msgid ""
"Some administrators will use a snapshot file for backup purposes, because "
"the snapshot can be transferred to CDs or tape."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1588
msgid ""
"The file system integrity checker, man:fsck[8], may be run on the snapshot. "
"Assuming that the file system was clean when it was mounted, this should "
"always provide a clean and unchanging result."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1589
msgid ""
"Running man:dump[8] on the snapshot will produce a dump file that is "
"consistent with the file system and the timestamp of the snapshot. man:"
"dump[8] can also take a snapshot, create a dump image, and then remove the "
"snapshot in one command by using `-L`."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1590
msgid ""
"The snapshot can be mounted as a frozen image of the file system. To man:"
"mount[8] the snapshot [.filename]#/var/snapshot/snap# run:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:1595
#, no-wrap
msgid ""
"# mdconfig -a -t vnode -o readonly -f /var/snapshot/snap -u 4\n"
"# mount -r /dev/md4 /mnt\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1601
msgid ""
"The frozen [.filename]#/var# is now available through [.filename]#/mnt#.  "
"Everything will initially be in the same state it was during the snapshot "
"creation time.  The only exception is that any earlier snapshots will appear "
"as zero length files.  To unmount the snapshot, use:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:1606
#, no-wrap
msgid ""
"# umount /mnt\n"
"# mdconfig -d -u 4\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1609
msgid ""
"For more information about `softupdates` and file system snapshots, "
"including technical papers, visit Marshall Kirk McKusick's website at http://"
"www.mckusick.com/[http://www.mckusick.com/]."
msgstr ""

#. type: Title ==
#: documentation/content/en/books/handbook/disks/_index.adoc:1611
#, no-wrap
msgid "Disk Quotas"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1615
msgid ""
"Disk quotas can be used to limit the amount of disk space or the number of "
"files a user or members of a group may allocate on a per-file system basis.  "
"This prevents one user or group of users from consuming all of the available "
"disk space."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1618
msgid ""
"This section describes how to configure disk quotas for the UFS file "
"system.  To configure quotas on the ZFS file system, refer to crossref:"
"zfs[zfs-zfs-quota,\"Dataset, User, and Group Quotas\"]"
msgstr ""

#. type: Title ===
#: documentation/content/en/books/handbook/disks/_index.adoc:1619
#, no-wrap
msgid "Enabling Disk Quotas"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1622
msgid "To determine if the FreeBSD kernel provides support for disk quotas:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:1627
#, no-wrap
msgid ""
"% sysctl kern.features.ufs_quota\n"
"kern.features.ufs_quota: 1\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1631
msgid ""
"In this example, the `1` indicates quota support.  If the value is instead "
"`0`, add the following line to a custom kernel configuration file and "
"rebuild the kernel using the instructions in crossref:"
"kernelconfig[kernelconfig,Configuring the FreeBSD Kernel]:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:1635
#, no-wrap
msgid "options QUOTA\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1638
msgid "Next, enable disk quotas in [.filename]#/etc/rc.conf#:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:1642
#, no-wrap
msgid "quota_enable=\"YES\"\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1648
msgid ""
"Normally on bootup, the quota integrity of each file system is checked by "
"man:quotacheck[8].  This program insures that the data in the quota database "
"properly reflects the data on the file system.  This is a time consuming "
"process that will significantly affect the time the system takes to boot.  "
"To skip this step, add this variable to [.filename]#/etc/rc.conf#:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:1652
#, no-wrap
msgid "check_quotas=\"NO\"\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1657
msgid ""
"Finally, edit [.filename]#/etc/fstab# to enable disk quotas on a per-file "
"system basis.  To enable per-user quotas on a file system, add `userquota` "
"to the options field in the [.filename]#/etc/fstab# entry for the file "
"system to enable quotas on.  For example:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:1661
#, no-wrap
msgid "/dev/da1s2g   /home    ufs rw,userquota 1 2\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1665
msgid ""
"To enable group quotas, use `groupquota` instead.  To enable both user and "
"group quotas, separate the options with a comma:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:1669
#, no-wrap
msgid "/dev/da1s2g    /home    ufs rw,userquota,groupquota 1 2\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1674
msgid ""
"By default, quota files are stored in the root directory of the file system "
"as [.filename]#quota.user# and [.filename]#quota.group#.  Refer to man:"
"fstab[5] for more information.  Specifying an alternate location for the "
"quota files is not recommended."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1676
msgid ""
"Once the configuration is complete, reboot the system and [.filename]#/etc/"
"rc# will automatically run the appropriate commands to create the initial "
"quota files for all of the quotas enabled in [.filename]#/etc/fstab#."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1679
msgid ""
"In the normal course of operations, there should be no need to manually run "
"man:quotacheck[8], man:quotaon[8], or man:quotaoff[8].  However, one should "
"read these manual pages to be familiar with their operation."
msgstr ""

#. type: Title ===
#: documentation/content/en/books/handbook/disks/_index.adoc:1680
#, no-wrap
msgid "Setting Quota Limits"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1683
msgid "To verify that quotas are enabled, run:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:1687
#, no-wrap
msgid "# quota -v\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1690
msgid ""
"There should be a one line summary of disk usage and current quota limits "
"for each file system that quotas are enabled on."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1692
msgid "The system is now ready to be assigned quota limits with `edquota`."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1696
msgid ""
"Several options are available to enforce limits on the amount of disk space "
"a user or group may allocate, and how many files they may create.  "
"Allocations can be limited based on disk space (block quotas), number of "
"files (inode quotas), or a combination of both.  Each limit is further "
"broken down into two categories: hard and soft limits."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1701
msgid ""
"A hard limit may not be exceeded.  Once a user reaches a hard limit, no "
"further allocations can be made on that file system by that user.  For "
"example, if the user has a hard limit of 500 kbytes on a file system and is "
"currently using 490 kbytes, the user can only allocate an additional 10 "
"kbytes.  Attempting to allocate an additional 11 kbytes will fail."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1705
msgid ""
"Soft limits can be exceeded for a limited amount of time, known as the grace "
"period, which is one week by default.  If a user stays over their limit "
"longer than the grace period, the soft limit turns into a hard limit and no "
"further allocations are allowed.  When the user drops back below the soft "
"limit, the grace period is reset."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1709
msgid ""
"In the following example, the quota for the `test` account is being edited.  "
"When `edquota` is invoked, the editor specified by `EDITOR` is opened in "
"order to edit the quota limits.  The default editor is set to vi."
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:1718
#, no-wrap
msgid ""
"# edquota -u test\n"
"Quotas for user test:\n"
"/usr: kbytes in use: 65, limits (soft = 50, hard = 75)\n"
"        inodes in use: 7, limits (soft = 50, hard = 60)\n"
"/usr/var: kbytes in use: 0, limits (soft = 50, hard = 75)\n"
"        inodes in use: 0, limits (soft = 50, hard = 60)\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1724
msgid ""
"There are normally two lines for each file system that has quotas enabled.  "
"One line represents the block limits and the other represents the inode "
"limits.  Change the value to modify the quota limit.  For example, to raise "
"the block limit on [.filename]#/usr# to a soft limit of `500` and a hard "
"limit of `600`, change the values in that line as follows:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:1728
#, no-wrap
msgid "/usr: kbytes in use: 65, limits (soft = 500, hard = 600)\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1731
msgid "The new quota limits take effect upon exiting the editor."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1736
msgid ""
"Sometimes it is desirable to set quota limits on a range of users.  This can "
"be done by first assigning the desired quota limit to a user.  Then, use `-"
"p` to duplicate that quota to a specified range of user IDs (UIDs).  The "
"following command will duplicate those quota limits for UIDs `10,000` "
"through `19,999`:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:1740
#, no-wrap
msgid "# edquota -p test 10000-19999\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1743
msgid "For more information, refer to man:edquota[8]."
msgstr ""

#. type: Title ===
#: documentation/content/en/books/handbook/disks/_index.adoc:1744
#, no-wrap
msgid "Checking Quota Limits and Disk Usage"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1750
msgid ""
"To check individual user or group quotas and disk usage, use man:quota[1].  "
"A user may only examine their own quota and the quota of a group they are a "
"member of.  Only the superuser may view all user and group quotas.  To get a "
"summary of all quotas and disk usage for file systems with quotas enabled, "
"use man:repquota[8]."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1754
msgid ""
"Normally, file systems that the user is not using any disk space on will not "
"show in the output of `quota`, even if the user has a quota limit assigned "
"for that file system.  Use `-v` to display those file systems.  The "
"following is sample output from `quota -v` for a user that has quota limits "
"on two file systems."
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:1761
#, no-wrap
msgid ""
"Disk quotas for user test (uid 1002):\n"
"     Filesystem  usage    quota   limit   grace   files   quota   limit   grace\n"
"           /usr      65*     50      75   5days       7      50      60\n"
"       /usr/var       0      50      75               0      50      60\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1765
msgid ""
"In this example, the user is currently 15 kbytes over the soft limit of 50 "
"kbytes on [.filename]#/usr# and has 5 days of grace period left.  The "
"asterisk `*` indicates that the user is currently over the quota limit."
msgstr ""

#. type: Title ===
#: documentation/content/en/books/handbook/disks/_index.adoc:1766
#, no-wrap
msgid "Quotas over NFS"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1770
msgid ""
"Quotas are enforced by the quota subsystem on the NFS server.  The man:rpc."
"rquotad[8] daemon makes quota information available to `quota` on NFS "
"clients, allowing users on those machines to see their quota statistics."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1772
msgid ""
"On the NFS server, enable `rpc.rquotad` by removing the `+#+` from this line "
"in [.filename]*/etc/inetd.conf*:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:1776
#, no-wrap
msgid "rquotad/1      dgram rpc/udp wait root /usr/libexec/rpc.rquotad rpc.rquotad\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1779
msgid "Then, restart `inetd`:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:1783
#, no-wrap
msgid "# service inetd restart\n"
msgstr ""

#. type: Title ==
#: documentation/content/en/books/handbook/disks/_index.adoc:1786
#, no-wrap
msgid "Encrypting Disk Partitions"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1791
msgid ""
"FreeBSD offers excellent online protections against unauthorized data "
"access.  File permissions and crossref:mac[mac,Mandatory Access Control] "
"(MAC) help prevent unauthorized users from accessing data while the "
"operating system is active and the computer is powered up.  However, the "
"permissions enforced by the operating system are irrelevant if an attacker "
"has physical access to a computer and can move the computer's hard drive to "
"another system to copy and analyze the data."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1795
msgid ""
"Regardless of how an attacker may have come into possession of a hard drive "
"or powered-down computer, the GEOM-based cryptographic subsystems built into "
"FreeBSD are able to protect the data on the computer's file systems against "
"even highly-motivated attackers with significant resources.  Unlike "
"encryption methods that encrypt individual files, the built-in `gbde` and "
"`geli` utilities can be used to transparently encrypt entire file systems.  "
"No cleartext ever touches the hard drive's platter."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1798
msgid ""
"This chapter demonstrates how to create an encrypted file system on "
"FreeBSD.  It first demonstrates the process using `gbde` and then "
"demonstrates the same example using `geli`."
msgstr ""

#. type: Title ===
#: documentation/content/en/books/handbook/disks/_index.adoc:1799
#, no-wrap
msgid "Disk Encryption with gbde"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1804
msgid ""
"The objective of the man:gbde[4] facility is to provide a formidable "
"challenge for an attacker to gain access to the contents of a _cold_ storage "
"device.  However, if the computer is compromised while up and running and "
"the storage device is actively attached, or the attacker has access to a "
"valid passphrase, it offers no protection to the contents of the storage "
"device.  Thus, it is important to provide physical security while the system "
"is running and to protect the passphrase used by the encryption mechanism."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1809
msgid ""
"This facility provides several barriers to protect the data stored in each "
"disk sector.  It encrypts the contents of a disk sector using 128-bit AES in "
"CBC mode.  Each sector on the disk is encrypted with a different AES key.  "
"For more information on the cryptographic design, including how the sector "
"keys are derived from the user-supplied passphrase, refer to man:gbde[4]."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1811
msgid ""
"FreeBSD provides a kernel module for gbde which can be loaded with this "
"command:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:1815
#, no-wrap
msgid "# kldload geom_bde\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1818
msgid ""
"If using a custom kernel configuration file, ensure it contains this line:"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1820
msgid "`options GEOM_BDE`"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1822
msgid ""
"The following example demonstrates adding a new hard drive to a system that "
"will hold a single encrypted partition that will be mounted as [.filename]#/"
"private#."
msgstr ""

#. type: Block title
#: documentation/content/en/books/handbook/disks/_index.adoc:1824
#, no-wrap
msgid "Procedure: Encrypting a Partition with gbde"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1826
msgid "Add the New Hard Drive"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1829
msgid ""
"Install the new drive to the system as explained in <<disks-adding>>.  For "
"the purposes of this example, a new hard drive partition has been added as [."
"filename]#/dev/ad4s1c# and [.filename]#/dev/ad0s1*# represents the existing "
"standard FreeBSD partitions."
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:1836
#, no-wrap
msgid ""
"# ls /dev/ad*\n"
"/dev/ad0        /dev/ad0s1b     /dev/ad0s1e     /dev/ad4s1\n"
"/dev/ad0s1      /dev/ad0s1c     /dev/ad0s1f     /dev/ad4s1c\n"
"/dev/ad0s1a     /dev/ad0s1d     /dev/ad4\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1839
msgid "Create a Directory to Hold `gbde` Lock Files"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:1843
#, no-wrap
msgid "# mkdir /etc/gbde\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1848
msgid ""
"The gbde lock file contains information that gbde requires to access "
"encrypted partitions.  Without access to the lock file, gbde will not be "
"able to decrypt the data contained in the encrypted partition without "
"significant manual intervention which is not supported by the software.  "
"Each encrypted partition uses a separate lock file."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1849
msgid "Initialize the `gbde` Partition"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1854
msgid ""
"A gbde partition must be initialized before it can be used.  This "
"initialization needs to be performed only once.  This command will open the "
"default editor, in order to set various configuration options in a "
"template.  For use with the UFS file system, set the sector_size to 2048:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:1867
#, no-wrap
msgid ""
"# gbde init /dev/ad4s1c -i -L /etc/gbde/ad4s1c.lock\n"
"# $FreeBSD: src/sbin/gbde/template.txt,v 1.1.36.1 2009/08/03 08:13:06 kensmith Exp $\n"
"#\n"
"# Sector size is the smallest unit of data which can be read or written.\n"
"# Making it too small decreases performance and decreases available space.\n"
"# Making it too large may prevent filesystems from working.  512 is the\n"
"# minimum and always safe.  For UFS, use the fragment size\n"
"#\n"
"sector_size\t=\t2048\n"
"[...]\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1873
msgid ""
"Once the edit is saved, the user will be asked twice to type the passphrase "
"used to secure the data.  The passphrase must be the same both times.  The "
"ability of gbde to protect data depends entirely on the quality of the "
"passphrase.  For tips on how to select a secure passphrase that is easy to "
"remember, see http://world.std.com/\\~reinhold/diceware.html[http://world."
"std.com/~reinhold/diceware.htm]."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1877
msgid ""
"This initialization creates a lock file for the gbde partition.  In this "
"example, it is stored as [.filename]#/etc/gbde/ad4s1c.lock#.  Lock files "
"must end in \".lock\" in order to be correctly detected by the [.filename]#/"
"etc/rc.d/gbde# start up script."
msgstr ""

#. type: delimited block = 4
#: documentation/content/en/books/handbook/disks/_index.adoc:1882
msgid ""
"Lock files _must_ be backed up together with the contents of any encrypted "
"partitions.  Without the lock file, the legitimate owner will be unable to "
"access the data on the encrypted partition."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1885
msgid "Attach the Encrypted Partition to the Kernel"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:1889
#, no-wrap
msgid "# gbde attach /dev/ad4s1c -l /etc/gbde/ad4s1c.lock\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1893
msgid ""
"This command will prompt to input the passphrase that was selected during "
"the initialization of the encrypted partition.  The new encrypted device "
"will appear in [.filename]#/dev# as [.filename]#/dev/device_name.bde#:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:1900
#, no-wrap
msgid ""
"# ls /dev/ad*\n"
"/dev/ad0        /dev/ad0s1b     /dev/ad0s1e     /dev/ad4s1\n"
"/dev/ad0s1      /dev/ad0s1c     /dev/ad0s1f     /dev/ad4s1c\n"
"/dev/ad0s1a     /dev/ad0s1d     /dev/ad4        /dev/ad4s1c.bde\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1903
msgid "Create a File System on the Encrypted Device"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1907
msgid ""
"Once the encrypted device has been attached to the kernel, a file system can "
"be created on the device.  This example creates a UFS file system with soft "
"updates enabled.  Be sure to specify the partition which has a [.filename]#*."
"bde# extension:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:1911
#, no-wrap
msgid "# newfs -U /dev/ad4s1c.bde\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1914
msgid "Mount the Encrypted Partition"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1916
msgid "Create a mount point and mount the encrypted file system:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:1921
#, no-wrap
msgid ""
"# mkdir /private\n"
"# mount /dev/ad4s1c.bde /private\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1924
msgid "Verify That the Encrypted File System is Available"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1926
msgid "The encrypted file system should now be visible and available for use:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:1937
#, no-wrap
msgid ""
"% df -H\n"
"Filesystem        Size   Used  Avail Capacity  Mounted on\n"
"/dev/ad0s1a      1037M    72M   883M     8%    /\n"
"/devfs            1.0K   1.0K     0B   100%    /dev\n"
"/dev/ad0s1f       8.1G    55K   7.5G     0%    /home\n"
"/dev/ad0s1e      1037M   1.1M   953M     0%    /tmp\n"
"/dev/ad0s1d       6.1G   1.9G   3.7G    35%    /usr\n"
"/dev/ad4s1c.bde   150G   4.1K   138G     0%    /private\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1941
msgid ""
"After each boot, any encrypted file systems must be manually re-attached to "
"the kernel, checked for errors, and mounted, before the file systems can be "
"used.  To configure these steps, add the following lines to [.filename]#/etc/"
"rc.conf#:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:1947
#, no-wrap
msgid ""
"gbde_autoattach_all=\"YES\"\n"
"gbde_devices=\"ad4s1c\"\n"
"gbde_lockdir=\"/etc/gbde\"\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:1952
msgid ""
"This requires that the passphrase be entered at the console at boot time.  "
"After typing the correct passphrase, the encrypted partition will be mounted "
"automatically.  Additional gbde boot options are available and listed in man:"
"rc.conf[5]."
msgstr ""

#. type: delimited block = 4
#: documentation/content/en/books/handbook/disks/_index.adoc:1958
msgid ""
"sysinstall is incompatible with gbde-encrypted devices.  All [.filename]#*."
"bde# devices must be detached from the kernel before starting sysinstall or "
"it will crash during its initial probing for devices.  To detach the "
"encrypted device used in the example, use the following command:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:1962
#, no-wrap
msgid "# gbde detach /dev/ad4s1c\n"
msgstr ""

#. type: Title ===
#: documentation/content/en/books/handbook/disks/_index.adoc:1966
#, no-wrap
msgid "Disk Encryption with `geli`"
msgstr ""

#. type: delimited block = 4
#: documentation/content/en/books/handbook/disks/_index.adoc:1971
msgid ""
"An alternative cryptographic GEOM class is available using `geli`.  This "
"control utility adds some features and uses a different scheme for doing "
"cryptographic work.  It provides the following features:"
msgstr ""

#. type: delimited block = 4
#: documentation/content/en/books/handbook/disks/_index.adoc:1973
msgid ""
"Utilizes the man:crypto[9] framework and automatically uses cryptographic "
"hardware when it is available."
msgstr ""

#. type: delimited block = 4
#: documentation/content/en/books/handbook/disks/_index.adoc:1974
msgid ""
"Supports multiple cryptographic algorithms such as AES, Blowfish, and 3DES."
msgstr ""

#. type: delimited block = 4
#: documentation/content/en/books/handbook/disks/_index.adoc:1975
msgid ""
"Allows the root partition to be encrypted. The passphrase used to access the "
"encrypted root partition will be requested during system boot."
msgstr ""

#. type: delimited block = 4
#: documentation/content/en/books/handbook/disks/_index.adoc:1976
msgid "Allows the use of two independent keys."
msgstr ""

#. type: delimited block = 4
#: documentation/content/en/books/handbook/disks/_index.adoc:1977
msgid "It is fast as it performs simple sector-to-sector encryption."
msgstr ""

#. type: delimited block = 4
#: documentation/content/en/books/handbook/disks/_index.adoc:1978
msgid ""
"Allows backup and restore of master keys. If a user destroys their keys, it "
"is still possible to get access to the data by restoring keys from the "
"backup."
msgstr ""

#. type: delimited block = 4
#: documentation/content/en/books/handbook/disks/_index.adoc:1979
msgid ""
"Allows a disk to attach with a random, one-time key which is useful for swap "
"partitions and temporary file systems."
msgstr ""

#. type: delimited block = 4
#: documentation/content/en/books/handbook/disks/_index.adoc:1981
msgid "More features and usage examples can be found in man:geli[8]."
msgstr ""

#. type: delimited block = 4
#: documentation/content/en/books/handbook/disks/_index.adoc:1987
msgid ""
"The following example describes how to generate a key file which will be "
"used as part of the master key for the encrypted provider mounted under [."
"filename]#/private#.  The key file will provide some random data used to "
"encrypt the master key.  The master key will also be protected by a "
"passphrase.  The provider's sector size will be 4kB.  The example describes "
"how to attach to the `geli` provider, create a file system on it, mount it, "
"work with it, and finally, how to detach it."
msgstr ""

#. type: Block title
#: documentation/content/en/books/handbook/disks/_index.adoc:1989
#, no-wrap
msgid "Procedure: Encrypting a Partition with `geli`"
msgstr ""

#. type: delimited block = 4
#: documentation/content/en/books/handbook/disks/_index.adoc:1991
msgid "Load `geli` Support"
msgstr ""

#. type: delimited block = 4
#: documentation/content/en/books/handbook/disks/_index.adoc:1993
msgid ""
"Support for `geli` is available as a loadable kernel module. To configure "
"the system to automatically load the module at boot time, add the following "
"line to [.filename]#/boot/loader.conf#:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:1997
#, no-wrap
msgid "geom_eli_load=\"YES\"\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:2000
msgid "To load the kernel module now:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:2004
#, no-wrap
msgid "# kldload geom_eli\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:2007
msgid ""
"For a custom kernel, ensure the kernel configuration file contains these "
"lines:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:2012
#, no-wrap
msgid ""
"options GEOM_ELI\n"
"device crypto\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:2015
msgid "Generate the Master Key"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:2022
msgid ""
"The following commands generate a master key that all data will be encrypted "
"with.  This key can never be changed.  Rather than using it directly, it is "
"encrypted with one or more user keys.  The user keys are made up of an "
"optional combination of random bytes from a file, [.filename]#/root/da2."
"key#, and/or a passphrase.  In this case, the data source for the key file "
"is [.filename]#/dev/random#.  This command also configures the sector size "
"of the provider ([.filename]#/dev/da2.eli#) as 4kB, for better performance:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:2029
#, no-wrap
msgid ""
"# dd if=/dev/random of=/root/da2.key bs=64 count=1\n"
"# geli init -K /root/da2.key -s 4096 /dev/da2\n"
"Enter new passphrase:\n"
"Reenter new passphrase:\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:2032
msgid ""
"It is not mandatory to use both a passphrase and a key file as either method "
"of securing the master key can be used in isolation."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:2035
msgid ""
"If the key file is given as \"-\", standard input will be used.  For "
"example, this command generates three key files:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:2039
#, no-wrap
msgid "# cat keyfile1 keyfile2 keyfile3 | geli init -K - /dev/da2\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:2042
msgid "Attach the Provider with the Generated Key"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:2044
msgid ""
"To attach the provider, specify the key file, the name of the disk, and the "
"passphrase:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:2049
#, no-wrap
msgid ""
"# geli attach -k /root/da2.key /dev/da2\n"
"Enter passphrase:\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:2052
msgid "This creates a new device with an [.filename]#.eli# extension:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:2057
#, no-wrap
msgid ""
"# ls /dev/da2*\n"
"/dev/da2  /dev/da2.eli\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:2060
msgid "Create the New File System"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:2062
msgid ""
"Next, format the device with the UFS file system and mount it on an existing "
"mount point:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:2068
#, no-wrap
msgid ""
"# dd if=/dev/random of=/dev/da2.eli bs=1m\n"
"# newfs /dev/da2.eli\n"
"# mount /dev/da2.eli /private\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:2071
msgid "The encrypted file system should now be available for use:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:2082
#, no-wrap
msgid ""
"# df -H\n"
"Filesystem     Size   Used  Avail Capacity  Mounted on\n"
"/dev/ad0s1a    248M    89M   139M    38%    /\n"
"/devfs         1.0K   1.0K     0B   100%    /dev\n"
"/dev/ad0s1f    7.7G   2.3G   4.9G    32%    /usr\n"
"/dev/ad0s1d    989M   1.5M   909M     0%    /tmp\n"
"/dev/ad0s1e    3.9G   1.3G   2.3G    35%    /var\n"
"/dev/da2.eli   150G   4.1K   138G     0%    /private\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:2085
msgid ""
"Once the work on the encrypted partition is done, and the [.filename]#/"
"private# partition is no longer needed, it is prudent to put the device into "
"cold storage by unmounting and detaching the `geli` encrypted partition from "
"the kernel:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:2090
#, no-wrap
msgid ""
"# umount /private\n"
"# geli detach da2.eli\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:2093
msgid ""
"An [.filename]#rc.d# script is provided to simplify the mounting of `geli`-"
"encrypted devices at boot time. For this example, add these lines to [."
"filename]#/etc/rc.conf#:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:2098
#, no-wrap
msgid ""
"geli_devices=\"da2\"\n"
"geli_da2_flags=\"-k /root/da2.key\"\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:2108
msgid ""
"This configures [.filename]#/dev/da2# as a `geli` provider with a master key "
"of [.filename]#/root/da2.key#.  The system will automatically detach the "
"provider from the kernel before the system shuts down.  During the startup "
"process, the script will prompt for the passphrase before attaching the "
"provider.  Other kernel messages might be shown before and after the "
"password prompt.  If the boot process seems to stall, look carefully for the "
"password prompt among the other messages.  Once the correct passphrase is "
"entered, the provider is attached.  The file system is then mounted, "
"typically by an entry in [.filename]#/etc/fstab#.  Refer to crossref:"
"basics[mount-unmount,“Mounting and Unmounting File Systems”] for "
"instructions on how to configure a file system to mount at boot time."
msgstr ""

#. type: Title ==
#: documentation/content/en/books/handbook/disks/_index.adoc:2110
#, no-wrap
msgid "Encrypting Swap"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:2117
msgid ""
"Like the encryption of disk partitions, encryption of swap space is used to "
"protect sensitive information.  Consider an application that deals with "
"passwords.  As long as these passwords stay in physical memory, they are not "
"written to disk and will be cleared after a reboot.  However, if FreeBSD "
"starts swapping out memory pages to free space, the passwords may be written "
"to the disk unencrypted.  Encrypting swap space can be a solution for this "
"scenario."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:2120
msgid ""
"This section demonstrates how to configure an encrypted swap partition using "
"man:gbde[8] or man:geli[8] encryption.  It assumes that [.filename]#/dev/"
"ada0s1b# is the swap partition."
msgstr ""

#. type: Title ===
#: documentation/content/en/books/handbook/disks/_index.adoc:2121
#, no-wrap
msgid "Configuring Encrypted Swap"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:2125
msgid ""
"Swap partitions are not encrypted by default and should be cleared of any "
"sensitive data before continuing.  To overwrite the current swap partition "
"with random garbage, execute the following command:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:2129
#, no-wrap
msgid "# dd if=/dev/random of=/dev/ada0s1b bs=1m\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:2132
msgid ""
"To encrypt the swap partition using man:gbde[8], add the `.bde` suffix to "
"the swap line in [.filename]#/etc/fstab#:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:2137
#, no-wrap
msgid ""
"# Device\t\tMountpoint\tFStype\tOptions\t\tDump\tPass#\n"
"/dev/ada0s1b.bde\tnone\t\tswap\tsw\t\t0\t0\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:2140
msgid ""
"To instead encrypt the swap partition using man:geli[8], use the `.eli` "
"suffix:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:2145
#, no-wrap
msgid ""
"# Device\t\tMountpoint\tFStype\tOptions\t\tDump\tPass#\n"
"/dev/ada0s1b.eli\tnone\t\tswap\tsw\t\t0\t0\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:2150
msgid ""
"By default, man:geli[8] uses the AES algorithm with a key length of 128 "
"bits.  Normally the default settings will suffice.  If desired, these "
"defaults can be altered in the options field in [.filename]#/etc/fstab#. The "
"possible flags are:"
msgstr ""

#. type: Labeled list
#: documentation/content/en/books/handbook/disks/_index.adoc:2151
#, no-wrap
msgid "aalgo"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:2154
msgid ""
"Data integrity verification algorithm used to ensure that the encrypted data "
"has not been tampered with.  See man:geli[8] for a list of supported "
"algorithms."
msgstr ""

#. type: Labeled list
#: documentation/content/en/books/handbook/disks/_index.adoc:2155
#, no-wrap
msgid "ealgo"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:2158
msgid ""
"Encryption algorithm used to protect the data.  See man:geli[8] for a list "
"of supported algorithms."
msgstr ""

#. type: Labeled list
#: documentation/content/en/books/handbook/disks/_index.adoc:2159
#, no-wrap
msgid "keylen"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:2162
msgid ""
"The length of the key used for the encryption algorithm.  See man:geli[8] "
"for the key lengths that are supported by each encryption algorithm."
msgstr ""

#. type: Labeled list
#: documentation/content/en/books/handbook/disks/_index.adoc:2163
#, no-wrap
msgid "sectorsize"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:2167
msgid ""
"The size of the blocks data is broken into before it is encrypted.  Larger "
"sector sizes increase performance at the cost of higher storage overhead.  "
"The recommended size is 4096 bytes."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:2169
msgid ""
"This example configures an encrypted swap partition using the Blowfish "
"algorithm with a key length of 128 bits and a sectorsize of 4 kilobytes:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:2174
#, no-wrap
msgid ""
"# Device\t\tMountpoint\tFStype\tOptions\t\t\t\tDump\tPass#\n"
"/dev/ada0s1b.eli\tnone\t\tswap\tsw,ealgo=blowfish,keylen=128,sectorsize=4096\t0\t0\n"
msgstr ""

#. type: Title ===
#: documentation/content/en/books/handbook/disks/_index.adoc:2176
#, no-wrap
msgid "Encrypted Swap Verification"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:2179
msgid ""
"Once the system has rebooted, proper operation of the encrypted swap can be "
"verified using `swapinfo`."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:2181
msgid "If man:gbde[8] is being used:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:2187
#, no-wrap
msgid ""
"% swapinfo\n"
"Device          1K-blocks     Used    Avail Capacity\n"
"/dev/ada0s1b.bde   542720        0   542720     0\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:2190
msgid "If man:geli[8] is being used:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:2196
#, no-wrap
msgid ""
"% swapinfo\n"
"Device          1K-blocks     Used    Avail Capacity\n"
"/dev/ada0s1b.eli   542720        0   542720     0\n"
msgstr ""

#. type: Title ==
#: documentation/content/en/books/handbook/disks/_index.adoc:2199
#, no-wrap
msgid "Highly Available Storage (HAST)"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:2205
msgid ""
"High availability is one of the main requirements in serious business "
"applications and highly-available storage is a key component in such "
"environments.  In FreeBSD, the Highly Available STorage (HAST) framework "
"allows transparent storage of the same data across several physically "
"separated machines connected by a TCP/IP network.  HAST can be understood as "
"a network-based RAID1 (mirror), and is similar to the DRBD(R) storage system "
"used in the GNU/Linux(R) platform.  In combination with other high-"
"availability features of FreeBSD like CARP, HAST makes it possible to build "
"a highly-available storage cluster that is resistant to hardware failures."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:2207
msgid "The following are the main features of HAST:"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:2209
msgid "Can be used to mask I/O errors on local hard drives."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:2210
msgid ""
"File system agnostic as it works with any file system supported by FreeBSD."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:2211
msgid ""
"Efficient and quick resynchronization as only the blocks that were modified "
"during the downtime of a node are synchronized."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:2212
msgid ""
"Can be used in an already deployed environment to add additional redundancy."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:2213
msgid ""
"Together with CARP, Heartbeat, or other tools, it can be used to build a "
"robust and durable storage system."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:2215
msgid "After reading this section, you will know:"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:2217
msgid "What HAST is, how it works, and which features it provides."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:2218
msgid "How to set up and use HAST on FreeBSD."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:2219
msgid "How to integrate CARP and man:devd[8] to build a robust storage system."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:2221
msgid "Before reading this section, you should:"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:2223
msgid ""
"Understand UNIX(R) and FreeBSD basics (crossref:basics[basics,FreeBSD "
"Basics])."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:2224
msgid ""
"Know how to configure network interfaces and other core FreeBSD subsystems "
"(crossref:config[config-tuning,Configuration and Tuning])."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:2225
msgid ""
"Have a good understanding of FreeBSD networking (crossref:partiv[network-"
"communication,\"Network Communication\"])."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:2227
msgid ""
"The HAST project was sponsored by The FreeBSD Foundation with support from "
"http://www.omc.net/[http://www.omc.net/] and http://www.transip.nl/[http://"
"www.transip.nl/]."
msgstr ""

#. type: Title ===
#: documentation/content/en/books/handbook/disks/_index.adoc:2228
#, no-wrap
msgid "HAST Operation"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:2232
msgid ""
"HAST provides synchronous block-level replication between two physical "
"machines: the _primary_ node and the _secondary_ node.  These two machines "
"together are referred to as a cluster."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:2236
msgid ""
"Since HAST works in a primary-secondary configuration, it allows only one of "
"the cluster nodes to be active at any given time.  The primary node, also "
"called _active_, is the one which will handle all the I/O requests to HAST-"
"managed devices.  The secondary node is automatically synchronized from the "
"primary node."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:2238
msgid ""
"The physical components of the HAST system are the local disk on primary "
"node, and the disk on the remote, secondary node."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:2242
msgid ""
"HAST operates synchronously on a block level, making it transparent to file "
"systems and applications.  HAST provides regular GEOM providers in [."
"filename]#/dev/hast/# for use by other tools or applications.  There is no "
"difference between using HAST-provided devices and raw disks or partitions."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:2246
msgid ""
"Each write, delete, or flush operation is sent to both the local disk and to "
"the remote disk over TCP/IP.  Each read operation is served from the local "
"disk, unless the local disk is not up-to-date or an I/O error occurs.  In "
"such cases, the read operation is sent to the secondary node."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:2250
msgid ""
"HAST tries to provide fast failure recovery.  For this reason, it is "
"important to reduce synchronization time after a node's outage.  To provide "
"fast synchronization, HAST manages an on-disk bitmap of dirty extents and "
"only synchronizes those during a regular synchronization, with an exception "
"of the initial sync."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:2253
msgid ""
"There are many ways to handle synchronization.  HAST implements several "
"replication modes to handle different synchronization methods:"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:2255
msgid ""
"_memsync_: This mode reports a write operation as completed when the local "
"write operation is finished and when the remote node acknowledges data "
"arrival, but before actually storing the data. The data on the remote node "
"will be stored directly after sending the acknowledgement. This mode is "
"intended to reduce latency, but still provides good reliability. This mode "
"is the default."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:2256
msgid ""
"_fullsync_: This mode reports a write operation as completed when both the "
"local write and the remote write complete. This is the safest and the "
"slowest replication mode."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:2257
msgid ""
"_async_: This mode reports a write operation as completed when the local "
"write completes. This is the fastest and the most dangerous replication "
"mode. It should only be used when replicating to a distant node where "
"latency is too high for other modes."
msgstr ""

#. type: Title ===
#: documentation/content/en/books/handbook/disks/_index.adoc:2258
#, no-wrap
msgid "HAST Configuration"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:2261
msgid "The HAST framework consists of several components:"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:2263
msgid ""
"The man:hastd[8] daemon which provides data synchronization. When this "
"daemon is started, it will automatically load `geom_gate.ko`."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:2264
msgid "The userland management utility, man:hastctl[8]."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:2265
msgid ""
"The man:hast.conf[5] configuration file. This file must exist before "
"starting hastd."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:2267
msgid ""
"Users who prefer to statically build `GEOM_GATE` support into the kernel "
"should add this line to the custom kernel configuration file, then rebuild "
"the kernel using the instructions in crossref:kernelconfig[kernelconfig,"
"Configuring the FreeBSD Kernel]:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:2271
#, no-wrap
msgid "options\tGEOM_GATE\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:2277
msgid ""
"The following example describes how to configure two nodes in primary-"
"secondary operation using HAST to replicate the data between the two.  The "
"nodes will be called `hasta`, with an IP address of `172.16.0.1`, and "
"`hastb`, with an IP address of `172.16.0.2`.  Both nodes will have a "
"dedicated hard drive [.filename]#/dev/ad6# of the same size for HAST "
"operation.  The HAST pool, sometimes referred to as a resource or the GEOM "
"provider in [.filename]#/dev/hast/#, will be called `test`."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:2281
msgid ""
"Configuration of HAST is done using [.filename]#/etc/hast.conf#.  This file "
"should be identical on both nodes.  The simplest configuration is:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:2294
#, no-wrap
msgid ""
"resource test {\n"
"\ton hasta {\n"
"\t\tlocal /dev/ad6\n"
"\t\tremote 172.16.0.2\n"
"\t}\n"
"\ton hastb {\n"
"\t\tlocal /dev/ad6\n"
"\t\tremote 172.16.0.1\n"
"\t}\n"
"}\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:2297
msgid "For more advanced configuration, refer to man:hast.conf[5]."
msgstr ""

#. type: delimited block = 4
#: documentation/content/en/books/handbook/disks/_index.adoc:2301
msgid ""
"It is also possible to use host names in the `remote` statements if the "
"hosts are resolvable and defined either in [.filename]#/etc/hosts# or in the "
"local DNS."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:2305
msgid ""
"Once the configuration exists on both nodes, the HAST pool can be created.  "
"Run these commands on both nodes to place the initial metadata onto the "
"local disk and to start man:hastd[8]:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:2310
#, no-wrap
msgid ""
"# hastctl create test\n"
"# service hastd onestart\n"
msgstr ""

#. type: delimited block = 4
#: documentation/content/en/books/handbook/disks/_index.adoc:2316
msgid ""
"It is _not_ possible to use GEOM providers with an existing file system or "
"to convert an existing storage to a HAST-managed pool.  This procedure needs "
"to store some metadata on the provider and there will not be enough required "
"space available on an existing provider."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:2320
msgid ""
"A HAST node's `primary` or `secondary` role is selected by an administrator, "
"or software like Heartbeat, using man:hastctl[8].  On the primary node, "
"`hasta`, issue this command:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:2324
#, no-wrap
msgid "# hastctl role primary test\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:2327
msgid "Run this command on the secondary node, `hastb`:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:2331
#, no-wrap
msgid "# hastctl role secondary test\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:2334
msgid "Verify the result by running `hastctl` on each node:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:2338
#, no-wrap
msgid "# hastctl status test\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:2344
msgid ""
"Check the `status` line in the output.  If it says `degraded`, something is "
"wrong with the configuration file.  It should say `complete` on each node, "
"meaning that the synchronization between the nodes has started.  The "
"synchronization completes when `hastctl status` reports 0 bytes of `dirty` "
"extents."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:2349
msgid ""
"The next step is to create a file system on the GEOM provider and mount it.  "
"This must be done on the `primary` node.  Creating the file system can take "
"a few minutes, depending on the size of the hard drive.  This example "
"creates a UFS file system on [.filename]#/dev/hast/test#:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:2355
#, no-wrap
msgid ""
"# newfs -U /dev/hast/test\n"
"# mkdir /hast/test\n"
"# mount /dev/hast/test /hast/test\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:2359
msgid ""
"Once the HAST framework is configured properly, the final step is to make "
"sure that HAST is started automatically during system boot.  Add this line "
"to [.filename]#/etc/rc.conf#:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:2363
#, no-wrap
msgid "hastd_enable=\"YES\"\n"
msgstr ""

#. type: Title ====
#: documentation/content/en/books/handbook/disks/_index.adoc:2365
#, no-wrap
msgid "Failover Configuration"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:2369
msgid ""
"The goal of this example is to build a robust storage system which is "
"resistant to the failure of any given node.  If the primary node fails, the "
"secondary node is there to take over seamlessly, check and mount the file "
"system, and continue to work without missing a single bit of data."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:2375
msgid ""
"To accomplish this task, the Common Address Redundancy Protocol (CARP) is "
"used to provide for automatic failover at the IP layer.  CARP allows "
"multiple hosts on the same network segment to share an IP address.  Set up "
"CARP on both nodes of the cluster according to the documentation available "
"in crossref:advanced-networking[carp,“Common Address Redundancy Protocol "
"(CARP)”].  In this example, each node will have its own management IP "
"address and a shared IP address of _172.16.0.254_.  The primary HAST node of "
"the cluster must be the primary CARP node."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:2379
msgid ""
"The HAST pool created in the previous section is now ready to be exported to "
"the other hosts on the network.  This can be accomplished by exporting it "
"through NFS or Samba, using the shared IP address _172.16.0.254_.  The only "
"problem which remains unresolved is an automatic failover should the primary "
"node fail."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:2383
msgid ""
"In the event of CARP interfaces going up or down, the FreeBSD operating "
"system generates a man:devd[8] event, making it possible to watch for state "
"changes on the CARP interfaces.  A state change on the CARP interface is an "
"indication that one of the nodes failed or came back online.  These state "
"change events make it possible to run a script which will automatically "
"handle the HAST failover."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:2385
msgid ""
"To catch state changes on the CARP interfaces, add this configuration to [."
"filename]#/etc/devd.conf# on each node:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:2394
#, no-wrap
msgid ""
"notify 30 {\n"
"\tmatch \"system\" \"IFNET\";\n"
"\tmatch \"subsystem\" \"carp0\";\n"
"\tmatch \"type\" \"LINK_UP\";\n"
"\taction \"/usr/local/sbin/carp-hast-switch primary\";\n"
"};\n"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:2401
#, no-wrap
msgid ""
"notify 30 {\n"
"\tmatch \"system\" \"IFNET\";\n"
"\tmatch \"subsystem\" \"carp0\";\n"
"\tmatch \"type\" \"LINK_DOWN\";\n"
"\taction \"/usr/local/sbin/carp-hast-switch secondary\";\n"
"};\n"
msgstr ""

#. type: delimited block = 4
#: documentation/content/en/books/handbook/disks/_index.adoc:2406
msgid ""
"If the systems are running FreeBSD 10 or higher, replace [.filename]#carp0# "
"with the name of the CARP-configured interface."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:2409
msgid ""
"Restart man:devd[8] on both nodes to put the new configuration into effect:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:2413
#, no-wrap
msgid "# service devd restart\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:2417
msgid ""
"When the specified interface state changes by going up or down , the system "
"generates a notification, allowing the man:devd[8] subsystem to run the "
"specified automatic failover script, [.filename]#/usr/local/sbin/carp-hast-"
"switch#.  For further clarification about this configuration, refer to man:"
"devd.conf[5]."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:2419
msgid "Here is an example of an automated failover script:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:2423
#, no-wrap
msgid "#!/bin/sh\n"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:2427
#, no-wrap
msgid ""
"# Original script by Freddie Cash <fjwcash@gmail.com>\n"
"# Modified by Michael W. Lucas <mwlucas@BlackHelicopters.org>\n"
"# and Viktor Petersson <vpetersson@wireload.net>\n"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:2430
#, no-wrap
msgid ""
"# The names of the HAST resources, as listed in /etc/hast.conf\n"
"resources=\"test\"\n"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:2434
#, no-wrap
msgid ""
"# delay in mounting HAST resource after becoming primary\n"
"# make your best guess\n"
"delay=3\n"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:2438
#, no-wrap
msgid ""
"# logging\n"
"log=\"local0.debug\"\n"
"name=\"carp-hast\"\n"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:2440
#, no-wrap
msgid "# end of user configurable stuff\n"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:2445
#, no-wrap
msgid ""
"case \"$1\" in\n"
"\tprimary)\n"
"\t\tlogger -p $log -t $name \"Switching to primary provider for ${resources}.\"\n"
"\t\tsleep ${delay}\n"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:2451
#, no-wrap
msgid ""
"\t\t# Wait for any \"hastd secondary\" processes to stop\n"
"\t\tfor disk in ${resources}; do\n"
"\t\t\twhile $( pgrep -lf \"hastd: ${disk} \\(secondary\\)\" > /dev/null 2>&1 ); do\n"
"\t\t\t\tsleep 1\n"
"\t\t\tdone\n"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:2459
#, no-wrap
msgid ""
"\t\t\t# Switch role for each disk\n"
"\t\t\thastctl role primary ${disk}\n"
"\t\t\tif [ $? -ne 0 ]; then\n"
"\t\t\t\tlogger -p $log -t $name \"Unable to change role to primary for resource ${disk}.\"\n"
"\t\t\t\texit 1\n"
"\t\t\tfi\n"
"\t\tdone\n"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:2466
#, no-wrap
msgid ""
"\t\t# Wait for the /dev/hast/* devices to appear\n"
"\t\tfor disk in ${resources}; do\n"
"\t\t\tfor I in $( jot 60 ); do\n"
"\t\t\t\t[ -c \"/dev/hast/${disk}\" ] && break\n"
"\t\t\t\tsleep 0.5\n"
"\t\t\tdone\n"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:2472
#, no-wrap
msgid ""
"\t\t\tif [ ! -c \"/dev/hast/${disk}\" ]; then\n"
"\t\t\t\tlogger -p $log -t $name \"GEOM provider /dev/hast/${disk} did not appear.\"\n"
"\t\t\t\texit 1\n"
"\t\t\tfi\n"
"\t\tdone\n"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:2474
#, no-wrap
msgid "\t\tlogger -p $log -t $name \"Role for HAST resources ${resources} switched to primary.\"\n"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:2481
#, no-wrap
msgid ""
"\t\tlogger -p $log -t $name \"Mounting disks.\"\n"
"\t\tfor disk in ${resources}; do\n"
"\t\t\tmkdir -p /hast/${disk}\n"
"\t\t\tfsck -p -y -t ufs /dev/hast/${disk}\n"
"\t\t\tmount /dev/hast/${disk} /hast/${disk}\n"
"\t\tdone\n"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:2483
#, no-wrap
msgid "\t;;\n"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:2486
#, no-wrap
msgid ""
"\tsecondary)\n"
"\t\tlogger -p $log -t $name \"Switching to secondary provider for ${resources}.\"\n"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:2504
#, no-wrap
msgid ""
"\t\t# Switch roles for the HAST resources\n"
"\t\tfor disk in ${resources}; do\n"
"\t\t\tif ! mount | grep -q \"^/dev/hast/${disk} on \"\n"
"\t\t\tthen\n"
"\t\t\telse\n"
"\t\t\t\tumount -f /hast/${disk}\n"
"\t\t\tfi\n"
"\t\t\tsleep $delay\n"
"\t\t\thastctl role secondary ${disk} 2>&1\n"
"\t\t\tif [ $? -ne 0 ]; then\n"
"\t\t\t\tlogger -p $log -t $name \"Unable to switch role to secondary for resource ${disk}.\"\n"
"\t\t\t\texit 1\n"
"\t\t\tfi\n"
"\t\t\tlogger -p $log -t $name \"Role switched to secondary for resource ${disk}.\"\n"
"\t\tdone\n"
"\t;;\n"
"esac\n"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:2507
msgid ""
"In a nutshell, the script takes these actions when a node becomes primary:"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:2509
msgid "Promotes the HAST pool to primary on the other node."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:2510
msgid "Checks the file system under the HAST pool."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:2511
msgid "Mounts the pool."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:2513
msgid "When a node becomes secondary:"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:2515
msgid "Unmounts the HAST pool."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:2516
msgid "Degrades the HAST pool to secondary."
msgstr ""

#. type: delimited block = 4
#: documentation/content/en/books/handbook/disks/_index.adoc:2521
msgid ""
"This is just an example script which serves as a proof of concept.  It does "
"not handle all the possible scenarios and can be extended or altered in any "
"way, for example, to start or stop required services."
msgstr ""

#. type: delimited block = 4
#: documentation/content/en/books/handbook/disks/_index.adoc:2527
msgid ""
"For this example, a standard UFS file system was used.  To reduce the time "
"needed for recovery, a journal-enabled UFS or ZFS file system can be used "
"instead."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:2530
msgid ""
"More detailed information with additional examples can be found at http://"
"wiki.FreeBSD.org/HAST[http://wiki.FreeBSD.org/HAST]."
msgstr ""

#. type: Title ===
#: documentation/content/en/books/handbook/disks/_index.adoc:2531
#, no-wrap
msgid "Troubleshooting"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:2536
msgid ""
"HAST should generally work without issues.  However, as with any other "
"software product, there may be times when it does not work as supposed.  The "
"sources of the problems may be different, but the rule of thumb is to ensure "
"that the time is synchronized between the nodes of the cluster."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:2540
msgid ""
"When troubleshooting HAST, the debugging level of man:hastd[8] should be "
"increased by starting `hastd` with `-d`.  This argument may be specified "
"multiple times to further increase the debugging level.  Consider also using "
"`-F`, which starts `hastd` in the foreground."
msgstr ""

#. type: Title ====
#: documentation/content/en/books/handbook/disks/_index.adoc:2542
#, no-wrap
msgid "Recovering from the Split-brain Condition"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:2547
msgid ""
"_Split-brain_ occurs when the nodes of the cluster are unable to communicate "
"with each other, and both are configured as primary.  This is a dangerous "
"condition because it allows both nodes to make incompatible changes to the "
"data.  This problem must be corrected manually by the system administrator."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/handbook/disks/_index.adoc:2551
msgid ""
"The administrator must either decide which node has more important changes, "
"or perform the merge manually.  Then, let HAST perform full synchronization "
"of the node which has the broken data.  To do this, issue these commands on "
"the node which needs to be resynchronized:"
msgstr ""

#. type: delimited block . 4
#: documentation/content/en/books/handbook/disks/_index.adoc:2557
#, no-wrap
msgid ""
"# hastctl role init test\n"
"# hastctl create test\n"
"# hastctl role secondary test\n"
msgstr ""