# SOME DESCRIPTIVE TITLE # Copyright (C) YEAR The FreeBSD Project # This file is distributed under the same license as the FreeBSD Documentation package. # Vladlen Popolitov , 2025, 2026. msgid "" msgstr "" "Project-Id-Version: FreeBSD Documentation VERSION\n" "POT-Creation-Date: 2025-11-08 16:17+0000\n" "PO-Revision-Date: 2026-03-05 04:45+0000\n" "Last-Translator: Vladlen Popolitov \n" "Language-Team: Russian \n" "Language: ru\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && " "n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" "X-Generator: Weblate 4.17\n" #. type: YAML Front Matter: description #: documentation/content/en/books/handbook/geom/_index.adoc:1 #, no-wrap msgid "In FreeBSD, the GEOM framework permits access and control to classes, such as Master Boot Records and BSD labels, through the use of providers, or the disk devices in /dev." msgstr "В FreeBSD инфраструктура GEOM предоставляет доступ и управление классами, такими как главная загрузочная запись (MBR) и метки BSD, через использование провайдеров или устройств дисков в `/dev`." #. type: YAML Front Matter: part #: documentation/content/en/books/handbook/geom/_index.adoc:1 #, no-wrap msgid "Part III. System Administration" msgstr "Часть III. Администрирование системы" #. type: YAML Front Matter: title #: documentation/content/en/books/handbook/geom/_index.adoc:1 #, no-wrap msgid "Chapter 21. GEOM: Modular Disk Transformation Framework" msgstr "Глава 21. GEOM: Модульная инфраструктура трансформации дискового пространства" #. type: Title = #: documentation/content/en/books/handbook/geom/_index.adoc:15 #, no-wrap msgid "GEOM: Modular Disk Transformation Framework" msgstr "GEOM: Модульная инфраструктура трансформации дискового пространства" #. type: Title == #: documentation/content/en/books/handbook/geom/_index.adoc:53 #, no-wrap msgid "Synopsis" msgstr "Обзор" #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:57 msgid "" "In FreeBSD, the GEOM framework permits access and control to classes, such " "as Master Boot Records and BSD labels, through the use of providers, or the " "disk devices in [.filename]#/dev#. By supporting various software RAID " "configurations, GEOM transparently provides access to the operating system " "and operating system utilities." msgstr "" "В FreeBSD система GEOM обеспечивает доступ и управление классами, такими как " "главная загрузочная запись (MBR) и метки BSD, через использование " "провайдеров или дисковых устройств в [.filename]#/dev#. Поддерживая " "различные конфигурации программного RAID, GEOM прозрачно предоставляет " "доступ операционной системе и системным утилитам." #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:61 msgid "" "This chapter covers the use of disks under the GEOM framework in FreeBSD. " "This includes the major RAID control utilities which use the framework for " "configuration. This chapter is not a definitive guide to RAID " "configurations and only GEOM-supported RAID classifications are discussed." msgstr "" "В этой главе рассматривается использование дисков в рамках системы GEOM в " "FreeBSD. Это включает основные утилиты управления RAID, которые используют " "данную систему для настройки. Данная глава не является исчерпывающим " "руководством по конфигурациям RAID и рассматривает только поддерживаемые " "GEOM классификации RAID." #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:63 msgid "Read this chapter to learn:" msgstr "Прочтите эту главу, чтобы узнать:" #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:65 msgid "What type of RAID support is available through GEOM." msgstr "Какой тип поддержки RAID доступен через GEOM." #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:66 msgid "" "How to use the base utilities to configure, maintain, and manipulate the " "various RAID levels." msgstr "" "Как использовать базовые утилиты для настройки, обслуживания и управления " "различными уровнями RAID." #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:67 msgid "" "How to mirror, stripe, encrypt, and remotely connect disk devices through " "GEOM." msgstr "" "Как зеркалировать, чередовать, шифровать и удалённо подключать дисковые " "устройства с помощью GEOM." #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:68 msgid "How to troubleshoot disks attached to the GEOM framework." msgstr "Как устранять неполадки с дисками, подключенными к системе GEOM." #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:70 msgid "Before reading this chapter:" msgstr "Прежде чем читать эту главу, необходимо:" #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:72 msgid "" "Understand how FreeBSD treats disk devices (crossref:disks[disks,Storage])." msgstr "" "Понимание того, как FreeBSD работает с дисковыми устройствами (crossref:" "disks[disks,Хранение данных])." #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:73 msgid "" "Know how to configure and install a new kernel (crossref:" "kernelconfig[kernelconfig,Configuring the FreeBSD Kernel])." msgstr "" "Знать, как настроить и установить новый ядро (crossref:" "kernelconfig[kernelconfig,Настройка ядра FreeBSD])." #. type: Title == #: documentation/content/en/books/handbook/geom/_index.adoc:75 #, no-wrap msgid "RAID0 - Striping" msgstr "RAID0 - Striping" #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:80 msgid "" "Striping combines several disk drives into a single volume. Striping can be " "performed through the use of hardware RAID controllers. The GEOM disk " "subsystem provides software support for disk striping, also known as RAID0, " "without the need for a RAID disk controller." msgstr "" "Чередование объединяет несколько дисков в один том. Чередование может быть " "выполнено с использованием аппаратных RAID-контроллеров. Подсистема GEOM " "предоставляет программную поддержку чередования дисков, также известного как " "RAID0, без необходимости в RAID-контроллере." #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:84 msgid "" "In RAID0, data is split into blocks that are written across all the drives " "in the array. As seen in the following illustration, instead of having to " "wait on the system to write 256k to one disk, RAID0 can simultaneously write " "64k to each of the four disks in the array, offering superior I/O " "performance. This performance can be enhanced further by using multiple " "disk controllers." msgstr "" "В RAID0 данные разбиваются на блоки, которые записываются на все диски " "массива. Как показано на следующей иллюстрации, вместо ожидания записи 256 " "КБ на один диск, RAID0 может одновременно записать по 64 КБ на каждый из " "четырёх дисков массива, обеспечивая высокую производительность ввода-вывода. " "Эту производительность можно дополнительно повысить, используя несколько " "контроллеров дисков." #. type: Positional ($1) AttributeList argument for macro 'image' #: documentation/content/en/books/handbook/geom/_index.adoc:85 #, no-wrap msgid "Disk Striping Illustration" msgstr "Иллюстрация чередования дисков" #. type: Target for macro image #: documentation/content/en/books/handbook/geom/_index.adoc:85 #, no-wrap msgid "striping.png" msgstr "striping.png" #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:88 msgid "" "Each disk in a RAID0 stripe must be of the same size, since I/O requests are " "interleaved to read or write to multiple disks in parallel." msgstr "" "Каждый диск в дисковой последовательности RAID0 должен быть одинакового " "размера, поскольку запросы ввода-вывода чередуются для чтения или записи на " "несколько дисков параллельно." #. type: delimited block = 4 #: documentation/content/en/books/handbook/geom/_index.adoc:94 msgid "" "RAID0 does _not_ provide any redundancy. This means that if one disk in the " "array fails, all of the data on the disks is lost. If the data is " "important, implement a backup strategy that regularly saves backups to a " "remote system or device." msgstr "" "RAID0 _не_ обеспечивает избыточности. Это означает, что если один диск в " "массиве выйдет из строя, все данные на дисках будут потеряны. Если данные " "важны, реализуйте стратегию резервного копирования, которая регулярно " "сохраняет резервные копии на удалённую систему или устройство." #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:98 msgid "" "The process for creating a software, GEOM-based RAID0 on a FreeBSD system " "using commodity disks is as follows. Once the stripe is created, refer to " "man:gstripe[8] for more information on how to control an existing stripe." msgstr "" "Процесс создания программного RAID0 на основе GEOM в системе FreeBSD с " "использованием обычных дисков выглядит следующим образом. После создания " "дисковой последовательности обратитесь к man:gstripe[8] для получения " "дополнительной информации о том, как управлять существующей дисковой " "последовательностью." #. type: delimited block * 4 #: documentation/content/en/books/handbook/geom/_index.adoc:102 #, no-wrap msgid "*Procedure: Creating a Stripe of Unformatted ATA Disks*\n" msgstr "*Процедура: Создание последовательности неформатированных ATA-дисков*\n" #. type: delimited block * 4 #: documentation/content/en/books/handbook/geom/_index.adoc:104 msgid "Load the [.filename]#geom_stripe.ko# module:" msgstr "Загрузите модуль [.filename]#geom_stripe.ko#:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/geom/_index.adoc:108 #, no-wrap msgid "# kldload geom_stripe\n" msgstr "# kldload geom_stripe\n" #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:111 msgid "" "Ensure that a suitable mount point exists. If this volume will become a root " "partition, then temporarily use another mount point such as [.filename]#/" "mnt#." msgstr "" "Убедитесь, что существует подходящая точка монтирования. Если этот том будет " "использоваться как корневой раздел, временно используйте другую точку " "монтирования, например, [.filename]#/mnt#." #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:112 msgid "" "Determine the device names for the disks which will be striped, and create " "the new stripe device. For example, to stripe two unused and unpartitioned " "ATA disks with device names of [.filename]#/dev/ad2# and [.filename]#/dev/" "ad3#:" msgstr "" "Определите имена устройств для дисков, которые будут объединены в дисковую " "последовательность, и создайте новое устройство для последовательности. " "Например, для объединения в последовательность двух неиспользуемых и " "неразмеченных ATA-дисков с именами устройств [.filename]#/dev/ad2# и [." "filename]#/dev/ad3#:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/geom/_index.adoc:119 #, no-wrap msgid "" "# gstripe label -v st0 /dev/ad2 /dev/ad3\n" "Metadata value stored on /dev/ad2.\n" "Metadata value stored on /dev/ad3.\n" "Done.\n" msgstr "" "# gstripe label -v st0 /dev/ad2 /dev/ad3\n" "Metadata value stored on /dev/ad2.\n" "Metadata value stored on /dev/ad3.\n" "Done.\n" #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:122 msgid "" "Write a standard label, also known as a partition table, on the new volume " "and install the default bootstrap code:" msgstr "" "Запишите стандартную метку, также известную как таблица разделов, на новый " "том и установите код начальной загрузки по умолчанию:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/geom/_index.adoc:126 #, no-wrap msgid "# bsdlabel -wB /dev/stripe/st0\n" msgstr "# bsdlabel -wB /dev/stripe/st0\n" #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:129 msgid "" "This process should create two other devices in [.filename]#/dev/stripe# in " "addition to [.filename]#st0#. Those include [.filename]#st0a# and [." "filename]#st0c#. At this point, a UFS file system can be created on [." "filename]#st0a# using `newfs`:" msgstr "" "Этот процесс должен создать два дополнительных устройства в [.filename]#/dev/" "stripe# помимо [.filename]#st0# — [.filename]#st0a# и [.filename]#st0c#. На " "этом этапе можно создать файловую систему UFS на [.filename]#st0a# с помощью " "команды `newfs`:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/geom/_index.adoc:133 #, no-wrap msgid "# newfs -U /dev/stripe/st0a\n" msgstr "# newfs -U /dev/stripe/st0a\n" #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:137 msgid "" "Many numbers will glide across the screen, and after a few seconds, the " "process will be complete. The volume has been created and is ready to be " "mounted." msgstr "" "По экрану пройдёт множество чисел, и через несколько секунд процесс " "завершится. Том создан и готов к монтированию." #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:138 msgid "To manually mount the created disk stripe:" msgstr "Чтобы вручную смонтировать созданную дисковую последовательность:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/geom/_index.adoc:142 #, no-wrap msgid "# mount /dev/stripe/st0a /mnt\n" msgstr "# mount /dev/stripe/st0a /mnt\n" #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:145 msgid "" "To mount this striped file system automatically during the boot process, " "place the volume information in [.filename]#/etc/fstab#. In this example, a " "permanent mount point, named [.filename]#stripe#, is created:" msgstr "" "Для автоматического монтирования этой чередующейся файловой системы во время " "загрузки добавьте информацию о томе в [.filename]#/etc/fstab#. В этом " "примере создается постоянная точка монтирования с именем [.filename]#stripe#:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/geom/_index.adoc:151 #, no-wrap msgid "" "# mkdir /stripe\n" "# echo \"/dev/stripe/st0a /stripe ufs rw 2 2\" \\\n" ">> /etc/fstab\n" msgstr "" "# mkdir /stripe\n" "# echo \"/dev/stripe/st0a /stripe ufs rw 2 2\" \\\n" ">> /etc/fstab\n" #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:154 msgid "" "The [.filename]#geom_stripe.ko# module must also be automatically loaded " "during system initialization, by adding a line to [.filename]#/boot/loader." "conf#:" msgstr "" "Модуль [.filename]#geom_stripe.ko# также должен автоматически загружаться " "при инициализации системы, добавив строку в [.filename]#/boot/loader.conf#:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/geom/_index.adoc:158 #, no-wrap msgid "# echo 'geom_stripe_load=\"YES\"' >> /boot/loader.conf\n" msgstr "# echo 'geom_stripe_load=\"YES\"' >> /boot/loader.conf\n" #. type: Title == #: documentation/content/en/books/handbook/geom/_index.adoc:162 #, no-wrap msgid "RAID1 - Mirroring" msgstr "RAID1 - Зеркалирование" #. type: delimited block * 4 #: documentation/content/en/books/handbook/geom/_index.adoc:169 msgid "" "RAID1, or _mirroring_, is the technique of writing the same data to more " "than one disk drive. Mirrors are usually used to guard against data loss " "due to drive failure. Each drive in a mirror contains an identical copy of " "the data. When an individual drive fails, the mirror continues to work, " "providing data from the drives that are still functioning. The computer " "keeps running, and the administrator has time to replace the failed drive " "without user interruption." msgstr "" "RAID1, или _зеркалирование_, — это техника записи одних и тех же данных на " "несколько дисковых накопителей. Зеркала обычно используются для защиты от " "потери данных из-за выхода диска из строя. Каждый диск в зеркале содержит " "идентичную копию данных. При отказе одного из дисков зеркало продолжает " "работать, предоставляя данные с оставшихся исправных дисков. Компьютер " "продолжает функционировать, а администратор имеет возможность заменить " "вышедший из строя диск без прерывания работы пользователей." #. type: delimited block * 4 #: documentation/content/en/books/handbook/geom/_index.adoc:174 msgid "" "Two common situations are illustrated in these examples. The first creates " "a mirror out of two new drives and uses it as a replacement for an existing " "single drive. The second example creates a mirror on a single new drive, " "copies the old drive's data to it, then inserts the old drive into the " "mirror. While this procedure is slightly more complicated, it only requires " "one new drive." msgstr "" "В этих примерах показаны две распространённые ситуации. Первый пример " "создаёт зеркало из двух новых дисков и использует его для замены " "существующего одиночного диска. Второй пример создаёт зеркало на одном новом " "диске, копирует на него данные со старого диска, а затем добавляет старый " "диск в зеркало. Хотя эта процедура немного сложнее, она требует только " "одного нового диска." #. type: delimited block * 4 #: documentation/content/en/books/handbook/geom/_index.adoc:179 msgid "" "Traditionally, the two drives in a mirror are identical in model and " "capacity, but man:gmirror[8] does not require that. Mirrors created with " "dissimilar drives will have a capacity equal to that of the smallest drive " "in the mirror. Extra space on larger drives will be unused. Drives " "inserted into the mirror later must have at least as much capacity as the " "smallest drive already in the mirror." msgstr "" "Традиционно два диска в зеркале имеют одинаковую модель и объём, но " "man:gmirror[8] не требует этого. Зеркала, созданные с разными дисками, будут " "иметь объём, равный объёму наименьшего диска в зеркале. Дополнительное место " "на более крупных дисках останется неиспользуемым. Диски, добавляемые в " "зеркало позже, должны иметь объём не меньше, чем у наименьшего диска, уже " "находящегося в зеркале." #. type: delimited block = 4 #: documentation/content/en/books/handbook/geom/_index.adoc:183 msgid "" "The mirroring procedures shown here are non-destructive, but as with any " "major disk operation, make a full backup first." msgstr "" "Приведённые здесь процедуры зеркалирования являются неразрушающими, но, как " "и при любых операциях с дисками, сначала создайте полную резервную копию." #. type: delimited block = 4 #: documentation/content/en/books/handbook/geom/_index.adoc:189 msgid "" "While man:dump[8] is used in these procedures to copy file systems, it does " "not work on file systems with soft updates journaling. See man:tunefs[8] " "for information on detecting and disabling soft updates journaling." msgstr "" "В этих процедурах используется man:dump[8] для копирования файловых систем, " "однако он не работает с файловыми системами, использующими журналирование " "мягких обновлений. Информацию о том, как обнаружить и отключить " "журналирование мягких обновлений, смотрите в man:tunefs[8]." #. type: Title === #: documentation/content/en/books/handbook/geom/_index.adoc:192 #, no-wrap msgid "Metadata Issues" msgstr "Проблемы с метаданными" #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:197 msgid "" "Many disk systems store metadata at the end of each disk. Old metadata " "should be erased before reusing the disk for a mirror. Most problems are " "caused by two particular types of leftover metadata: GPT partition tables " "and old metadata from a previous mirror." msgstr "" "Многие дисковые системы хранят метаданные в конце каждого диска. Старые " "метаданные следует стереть перед повторным использованием диска для зеркала. " "Большинство проблем вызвано двумя конкретными типами оставшихся метаданных: " "таблицами разделов GPT и старыми метаданными от предыдущего зеркала." #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:200 msgid "" "GPT metadata can be erased with man:gpart[8]. This example erases both " "primary and backup GPT partition tables from disk [.filename]#ada8#:" msgstr "" "Метаданные GPT можно удалить с помощью man:gpart[8]. В этом примере " "удаляются как основная, так и резервная таблицы разделов GPT с диска [." "filename]#ada8#:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/geom/_index.adoc:204 #, no-wrap msgid "# gpart destroy -F ada8\n" msgstr "# gpart destroy -F ada8\n" #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:208 msgid "" "A disk can be removed from an active mirror and the metadata erased in one " "step using man:gmirror[8]. Here, the example disk [.filename]#ada8# is " "removed from the active mirror [.filename]#gm4#:" msgstr "" "Диск может быть удален из активного зеркала, а его метаданные стерты за один " "шаг с помощью man:gmirror[8]. В этом примере диск [.filename]#ada8# " "удаляется из активного зеркала [.filename]#gm4#:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/geom/_index.adoc:212 #, no-wrap msgid "# gmirror remove gm4 ada8\n" msgstr "# gmirror remove gm4 ada8\n" #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:215 msgid "" "If the mirror is not running, but old mirror metadata is still on the disk, " "use `gmirror clear` to remove it:" msgstr "" "Если зеркало не запущено, но старые метаданные зеркала остались на диске, " "используйте `gmirror clear` для их удаления:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/geom/_index.adoc:219 #, no-wrap msgid "# gmirror clear ada8\n" msgstr "# gmirror clear ada8\n" #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:224 msgid "" "man:gmirror[8] stores one block of metadata at the end of the disk. As GPT " "partition schemes also store metadata at the end of the disk, mirroring " "entire GPT disks with man:gmirror[8] is not recommended. MBR partitioning " "is used here because it only stores a partition table at the start of the " "disk and does not conflict with the mirror metadata." msgstr "" "man:gmirror[8] хранит один блок метаданных в конце диска. Поскольку схемы " "разделов GPT также хранят метаданные в конце диска, зеркалирование целых GPT-" "дисков с помощью man:gmirror[8] не рекомендуется. Здесь используется " "разделение MBR, так как оно хранит таблицу разделов только в начале диска и " "не конфликтует с метаданными зеркала." #. type: Title === #: documentation/content/en/books/handbook/geom/_index.adoc:226 #, no-wrap msgid "Creating a Mirror with Two New Disks" msgstr "Создание зеркала с двумя новыми дисками" #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:231 msgid "" "In this example, FreeBSD has already been installed on a single disk, [." "filename]#ada0#. Two new disks, [.filename]#ada1# and [.filename]#ada2#, " "have been connected to the system. A new mirror will be created on these " "two disks and used to replace the old single disk." msgstr "" "В этом примере FreeBSD уже установлена на одном диске [.filename]#ada0#. К " "системе подключены два новых диска — [.filename]#ada1# и [.filename]#ada2#. " "На этих дисках будет создано новое зеркало, которое заменит старый одиночный " "диск." #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:234 msgid "" "The [.filename]#geom_mirror.ko# kernel module must either be built into the " "kernel or loaded at boot- or run-time. Manually load the kernel module now:" msgstr "" "Модуль ядра [.filename]#geom_mirror.ko# должен быть либо встроен в ядро, " "либо загружен при загрузке или во время работы. Вручную загрузите модуль " "ядра сейчас:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/geom/_index.adoc:238 #: documentation/content/en/books/handbook/geom/_index.adoc:360 #, no-wrap msgid "# gmirror load\n" msgstr "# gmirror load\n" #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:241 msgid "Create the mirror with the two new drives:" msgstr "Создайте зеркало с двумя новыми дисками:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/geom/_index.adoc:245 #, no-wrap msgid "# gmirror label -v gm0 /dev/ada1 /dev/ada2\n" msgstr "# gmirror label -v gm0 /dev/ada1 /dev/ada2\n" #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:249 msgid "" "[.filename]#gm0# is a user-chosen device name assigned to the new mirror. " "After the mirror has been started, this device name appears in [.filename]#/" "dev/mirror/#." msgstr "" "[.filename]#gm0# — это выбранное пользователем имя устройства, назначенное " "новому зеркалу. После запуска зеркала это имя устройства появляется в [." "filename]#/dev/mirror/#." #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:253 msgid "" "MBR and bsdlabel partition tables can now be created on the mirror with man:" "gpart[8]. This example uses a traditional file system layout, with " "partitions for [.filename]#/#, swap, [.filename]#/var#, [.filename]#/tmp#, " "and [.filename]#/usr#. A single [.filename]#/# and a swap partition will " "also work." msgstr "" "Теперь таблицы разделов MBR и bsdlabel можно создавать на зеркале с помощью " "man:gpart[8]. В этом примере используется традиционная структура файловой " "системы с разделами для [.filename]#/#, swap, [.filename]#/var#, [." "filename]#/tmp# и [.filename]#/usr#. Также подойдёт одиночный раздел [." "filename]#/# и раздел подкачки." #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:255 msgid "" "Partitions on the mirror do not have to be the same size as those on the " "existing disk, but they must be large enough to hold all the data already " "present on [.filename]#ada0#." msgstr "" "Разделы на зеркале не обязательно должны быть такого же размера, как и на " "существующем диске, но они должны быть достаточно большими, чтобы вместить " "все данные, уже находящиеся на [.filename]#ada0#." #. type: delimited block . 4 #: documentation/content/en/books/handbook/geom/_index.adoc:265 #, no-wrap msgid "" "# gpart create -s MBR mirror/gm0\n" "# gpart add -t freebsd -a 4k mirror/gm0\n" "# gpart show mirror/gm0\n" "=> 63 156301423 mirror/gm0 MBR (74G)\n" " 63 63 - free - (31k)\n" " 126 156301299 1 freebsd (74G)\n" " 156301425 61 - free - (30k)\n" msgstr "" "# gpart create -s MBR mirror/gm0\n" "# gpart add -t freebsd -a 4k mirror/gm0\n" "# gpart show mirror/gm0\n" "=> 63 156301423 mirror/gm0 MBR (74G)\n" " 63 63 - free - (31k)\n" " 126 156301299 1 freebsd (74G)\n" " 156301425 61 - free - (30k)\n" #. type: delimited block . 4 #: documentation/content/en/books/handbook/geom/_index.adoc:284 #, no-wrap msgid "" "# gpart create -s BSD mirror/gm0s1\n" "# gpart add -t freebsd-ufs -a 4k -s 2g mirror/gm0s1\n" "# gpart add -t freebsd-swap -a 4k -s 4g mirror/gm0s1\n" "# gpart add -t freebsd-ufs -a 4k -s 2g mirror/gm0s1\n" "# gpart add -t freebsd-ufs -a 4k -s 1g mirror/gm0s1\n" "# gpart add -t freebsd-ufs -a 4k mirror/gm0s1\n" "# gpart show mirror/gm0s1\n" "=> 0 156301299 mirror/gm0s1 BSD (74G)\n" " 0 2 - free - (1.0k)\n" " 2 4194304 1 freebsd-ufs (2.0G)\n" " 4194306 8388608 2 freebsd-swap (4.0G)\n" " 12582914 4194304 4 freebsd-ufs (2.0G)\n" " 16777218 2097152 5 freebsd-ufs (1.0G)\n" " 18874370 137426928 6 freebsd-ufs (65G)\n" " 156301298 1 - free - (512B)\n" msgstr "" "# gpart create -s BSD mirror/gm0s1\n" "# gpart add -t freebsd-ufs -a 4k -s 2g mirror/gm0s1\n" "# gpart add -t freebsd-swap -a 4k -s 4g mirror/gm0s1\n" "# gpart add -t freebsd-ufs -a 4k -s 2g mirror/gm0s1\n" "# gpart add -t freebsd-ufs -a 4k -s 1g mirror/gm0s1\n" "# gpart add -t freebsd-ufs -a 4k mirror/gm0s1\n" "# gpart show mirror/gm0s1\n" "=> 0 156301299 mirror/gm0s1 BSD (74G)\n" " 0 2 - free - (1.0k)\n" " 2 4194304 1 freebsd-ufs (2.0G)\n" " 4194306 8388608 2 freebsd-swap (4.0G)\n" " 12582914 4194304 4 freebsd-ufs (2.0G)\n" " 16777218 2097152 5 freebsd-ufs (1.0G)\n" " 18874370 137426928 6 freebsd-ufs (65G)\n" " 156301298 1 - free - (512B)\n" #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:287 #: documentation/content/en/books/handbook/geom/_index.adoc:505 msgid "" "Make the mirror bootable by installing bootcode in the MBR and bsdlabel and " "setting the active slice:" msgstr "" "Сделайте зеркало загружаемым, установив загрузочный код в MBR и bsdlabel, а " "также настроив активный раздел:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/geom/_index.adoc:293 #: documentation/content/en/books/handbook/geom/_index.adoc:511 #, no-wrap msgid "" "# gpart bootcode -b /boot/mbr mirror/gm0\n" "# gpart set -a active -i 1 mirror/gm0\n" "# gpart bootcode -b /boot/boot mirror/gm0s1\n" msgstr "" "# gpart bootcode -b /boot/mbr mirror/gm0\n" "# gpart set -a active -i 1 mirror/gm0\n" "# gpart bootcode -b /boot/boot mirror/gm0s1\n" #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:296 msgid "Format the file systems on the new mirror, enabling soft-updates." msgstr "" "Отформатируйте файловые системы на новом зеркале, включив мягкие обновления." #. type: delimited block . 4 #: documentation/content/en/books/handbook/geom/_index.adoc:303 #, no-wrap msgid "" "# newfs -U /dev/mirror/gm0s1a\n" "# newfs -U /dev/mirror/gm0s1d\n" "# newfs -U /dev/mirror/gm0s1e\n" "# newfs -U /dev/mirror/gm0s1f\n" msgstr "" "# newfs -U /dev/mirror/gm0s1a\n" "# newfs -U /dev/mirror/gm0s1d\n" "# newfs -U /dev/mirror/gm0s1e\n" "# newfs -U /dev/mirror/gm0s1f\n" #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:306 msgid "" "File systems from the original [.filename]#ada0# disk can now be copied onto " "the mirror with man:dump[8] and man:restore[8]." msgstr "" "Файловые системы с исходного диска [.filename]#ada0# теперь можно " "скопировать на зеркало с помощью man:dump[8] и man:restore[8]." #. type: delimited block . 4 #: documentation/content/en/books/handbook/geom/_index.adoc:317 #, no-wrap msgid "" "# mount /dev/mirror/gm0s1a /mnt\n" "# dump -C16 -b64 -0aL -f - / | (cd /mnt && restore -rf -)\n" "# mount /dev/mirror/gm0s1d /mnt/var\n" "# mount /dev/mirror/gm0s1e /mnt/tmp\n" "# mount /dev/mirror/gm0s1f /mnt/usr\n" "# dump -C16 -b64 -0aL -f - /var | (cd /mnt/var && restore -rf -)\n" "# dump -C16 -b64 -0aL -f - /tmp | (cd /mnt/tmp && restore -rf -)\n" "# dump -C16 -b64 -0aL -f - /usr | (cd /mnt/usr && restore -rf -)\n" msgstr "" "# mount /dev/mirror/gm0s1a /mnt\n" "# dump -C16 -b64 -0aL -f - / | (cd /mnt && restore -rf -)\n" "# mount /dev/mirror/gm0s1d /mnt/var\n" "# mount /dev/mirror/gm0s1e /mnt/tmp\n" "# mount /dev/mirror/gm0s1f /mnt/usr\n" "# dump -C16 -b64 -0aL -f - /var | (cd /mnt/var && restore -rf -)\n" "# dump -C16 -b64 -0aL -f - /tmp | (cd /mnt/tmp && restore -rf -)\n" "# dump -C16 -b64 -0aL -f - /usr | (cd /mnt/usr && restore -rf -)\n" #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:320 msgid "" "Edit [.filename]#/mnt/etc/fstab# to point to the new mirror file systems:" msgstr "" "Отредактируйте файл [.filename]#/mnt/etc/fstab#, чтобы он указывал на " "файловые системы нового зеркала:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/geom/_index.adoc:329 #, no-wrap msgid "" "# Device\t\tMountpoint\tFStype\tOptions\tDump\tPass#\n" "/dev/mirror/gm0s1a\t/\t\tufs\trw\t1\t1\n" "/dev/mirror/gm0s1b\tnone\t\tswap\tsw\t0\t0\n" "/dev/mirror/gm0s1d\t/var\t\tufs\trw\t2\t2\n" "/dev/mirror/gm0s1e\t/tmp\t\tufs\trw\t2\t2\n" "/dev/mirror/gm0s1f\t/usr\t\tufs\trw\t2\t2\n" msgstr "" "# Device\t\tMountpoint\tFStype\tOptions\tDump\tPass#\n" "/dev/mirror/gm0s1a\t/\t\tufs\trw\t1\t1\n" "/dev/mirror/gm0s1b\tnone\t\tswap\tsw\t0\t0\n" "/dev/mirror/gm0s1d\t/var\t\tufs\trw\t2\t2\n" "/dev/mirror/gm0s1e\t/tmp\t\tufs\trw\t2\t2\n" "/dev/mirror/gm0s1f\t/usr\t\tufs\trw\t2\t2\n" #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:332 msgid "" "If the [.filename]#geom_mirror.ko# kernel module has not been built into the " "kernel, [.filename]#/mnt/boot/loader.conf# is edited to load the module at " "boot:" msgstr "" "Если модуль ядра [.filename]#geom_mirror.ko# не встроен в ядро, файл [." "filename]#/mnt/boot/loader.conf# редактируется для загрузки модуля при " "старте системы:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/geom/_index.adoc:336 #: documentation/content/en/books/handbook/geom/_index.adoc:539 #: documentation/content/en/books/handbook/geom/_index.adoc:652 #, no-wrap msgid "geom_mirror_load=\"YES\"\n" msgstr "geom_mirror_load=\"YES\"\n" #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:341 msgid "" "Reboot the system to test the new mirror and verify that all data has been " "copied. The BIOS will see the mirror as two individual drives rather than a " "mirror. Since the drives are identical, it does not matter which is " "selected to boot." msgstr "" "Перезагрузите систему, чтобы проверить новое зеркало и убедиться, что все " "данные скопированы. BIOS увидит зеркало как два отдельных диска, а не как " "зеркало. Поскольку диски идентичны, не имеет значения, какой из них выбран " "для загрузки." #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:344 msgid "" "See crossref:geom[gmirror-troubleshooting, Troubleshooting] if there are " "problems booting. Powering down and disconnecting the original [." "filename]#ada0# disk will allow it to be kept as an offline backup." msgstr "" "См. crossref:geom[gmirror-troubleshooting, Устранение неполадок], если " "возникли проблемы с загрузкой. Отключение питания и извлечение исходного " "диска [.filename]#ada0# позволит сохранить его в качестве автономной " "резервной копии." #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:346 msgid "In use, the mirror will behave just like the original single drive." msgstr "" "При использовании зеркало будет вести себя так же, как исходный одиночный " "диск." #. type: Title === #: documentation/content/en/books/handbook/geom/_index.adoc:348 #, no-wrap msgid "Creating a Mirror with an Existing Drive" msgstr "Создание зеркала с существующим диском" #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:354 msgid "" "In this example, FreeBSD has already been installed on a single disk, [." "filename]#ada0#. A new disk, [.filename]#ada1#, has been connected to the " "system. A one-disk mirror will be created on the new disk, the existing " "system copied onto it, and then the old disk will be inserted into the " "mirror. This slightly complex procedure is required because `gmirror` needs " "to put a 512-byte block of metadata at the end of each disk, and the " "existing [.filename]#ada0# has usually had all of its space already " "allocated." msgstr "" "В этом примере FreeBSD уже установлена на одном диске [.filename]#ada0#. К " "системе подключён новый диск [.filename]#ada1#. На новом диске будет создано " "однодисковое зеркало, существующая система скопирована на него, после чего " "старый диск будет добавлен в зеркало. Эта несколько сложная процедура " "необходима, потому что `gmirror` требует размещения 512-байтового блока " "метаданных в конце каждого диска, а на существующем [.filename]#ada0# обычно " "всё пространство уже занято." #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:356 msgid "Load the [.filename]#geom_mirror.ko# kernel module:" msgstr "Загрузите модуль ядра [.filename]#geom_mirror.ko#:" #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:363 msgid "Check the media size of the original disk with `diskinfo`:" msgstr "Проверьте размер носителя исходного диска с помощью `diskinfo`:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/geom/_index.adoc:370 #, no-wrap msgid "" "# diskinfo -v ada0 | head -n3\n" "/dev/ada0\n" " 512 # sectorsize\n" " 1000204821504 # mediasize in bytes (931G)\n" msgstr "" "# diskinfo -v ada0 | head -n3\n" "/dev/ada0\n" " 512 # sectorsize\n" " 1000204821504 # mediasize in bytes (931G)\n" #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:377 msgid "" "Create a mirror on the new disk. To make certain that the mirror capacity " "is not any larger than the original [.filename]#ada0# drive, man:gnop[8] is " "used to create a fake drive of the same size. This drive does not store any " "data, but is used only to limit the size of the mirror. When man:gmirror[8] " "creates the mirror, it will restrict the capacity to the size of [." "filename]#gzero.nop#, even if the new [.filename]#ada1# drive has more " "space. Note that the _1000204821504_ in the second line is equal to [." "filename]#ada0#'s media size as shown by `diskinfo` above." msgstr "" "Создайте зеркало на новом диске. Чтобы убедиться, что объём зеркала не " "превышает объём исходного диска [.filename]#ada0#, используется man:gnop[8] " "для создания виртуального диска того же размера. Этот диск не хранит данных, " "а служит только для ограничения размера зеркала. Когда man:gmirror[8] " "создает зеркало, он ограничит объём до размера [.filename]#gzero.nop#, даже " "если новый диск [.filename]#ada1# имеет больше места. Обратите внимание, что " "число _1000204821504_ во второй строке соответствует размеру носителя [." "filename]#ada0#, показанному командой `diskinfo` выше." #. type: delimited block . 4 #: documentation/content/en/books/handbook/geom/_index.adoc:384 #, no-wrap msgid "" "# geom zero load\n" "# gnop create -s 1000204821504 gzero\n" "# gmirror label -v gm0 gzero.nop ada1\n" "# gmirror forget gm0\n" msgstr "" "# geom zero load\n" "# gnop create -s 1000204821504 gzero\n" "# gmirror label -v gm0 gzero.nop ada1\n" "# gmirror forget gm0\n" #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:389 msgid "" "Since [.filename]#gzero.nop# does not store any data, the mirror does not " "see it as connected. The mirror is told to \"forget\" unconnected " "components, removing references to [.filename]#gzero.nop#. The result is a " "mirror device containing only a single disk, [.filename]#ada1#." msgstr "" "Поскольку [.filename]#gzero.nop# не хранит никаких данных, зеркало не " "считает его подключенным. Зеркалу указывается «забыть» неподключенные " "компоненты, удаляя ссылки на [.filename]#gzero.nop#. В результате получается " "зеркальное устройство, содержащее только один диск — [.filename]#ada1#." #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:393 msgid "" "After creating [.filename]#gm0#, view the partition table on [." "filename]#ada0#. This output is from a 1 TB drive. If there is some " "unallocated space at the end of the drive, the contents may be copied " "directly from [.filename]#ada0# to the new mirror." msgstr "" "После создания [.filename]#gm0# просмотрите таблицу разделов на [." "filename]#ada0#. Этот вывод сделан для диска объёмом 1 ТБ. Если в конце " "диска осталось нераспределенное пространство, содержимое можно скопировать " "напрямую с [.filename]#ada0# на новое зеркало." #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:395 msgid "" "However, if the output shows that all of the space on the disk is allocated, " "as in the following listing, there is no space available for the 512-byte " "mirror metadata at the end of the disk." msgstr "" "Однако, если вывод показывает, что всё пространство на диске занято, как в " "следующем примере, то для метаданных зеркала размером 512 байт в конце диска " "не остаётся места." #. type: delimited block . 4 #: documentation/content/en/books/handbook/geom/_index.adoc:401 #, no-wrap msgid "" "# gpart show ada0\n" "=> 63 1953525105 ada0 MBR (931G)\n" " 63 1953525105 1 freebsd [active] (931G)\n" msgstr "" "# gpart show ada0\n" "=> 63 1953525105 ada0 MBR (931G)\n" " 63 1953525105 1 freebsd [active] (931G)\n" #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:405 msgid "" "In this case, the partition table must be edited to reduce the capacity by " "one sector on [.filename]#mirror/gm0#. The procedure will be explained " "later." msgstr "" "В этом случае необходимо отредактировать таблицу разделов, уменьшив ёмкость " "на один сектор для [.filename]#mirror/gm0#. Процедура будет описана далее." #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:407 msgid "" "In either case, partition tables on the primary disk should be first copied " "using `gpart backup` and `gpart restore`." msgstr "" "В любом случае таблицы разделов на основном диске следует сначала " "скопировать с помощью `gpart backup` и `gpart restore`." #. type: delimited block . 4 #: documentation/content/en/books/handbook/geom/_index.adoc:412 #, no-wrap msgid "" "# gpart backup ada0 > table.ada0\n" "# gpart backup ada0s1 > table.ada0s1\n" msgstr "" "# gpart backup ada0 > table.ada0\n" "# gpart backup ada0s1 > table.ada0s1\n" #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:416 msgid "" "These commands create two files, [.filename]#table.ada0# and [." "filename]#table.ada0s1#. This example is from a 1 TB drive:" msgstr "" "Эти команды создают два файла, [.filename]#table.ada0# и [.filename]#table." "ada0s1#. Этот пример приведен для диска объёмом 1 ТБ:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/geom/_index.adoc:422 #, no-wrap msgid "" "# cat table.ada0\n" "MBR 4\n" "1 freebsd 63 1953525105 [active]\n" msgstr "" "# cat table.ada0\n" "MBR 4\n" "1 freebsd 63 1953525105 [active]\n" #. type: delimited block . 4 #: documentation/content/en/books/handbook/geom/_index.adoc:434 #, no-wrap msgid "" "# cat table.ada0s1\n" "BSD 8\n" "1 freebsd-ufs 0 4194304\n" "2 freebsd-swap 4194304 33554432\n" "4 freebsd-ufs 37748736 50331648\n" "5 freebsd-ufs 88080384 41943040\n" "6 freebsd-ufs 130023424 838860800\n" "7 freebsd-ufs 968884224 984640881\n" msgstr "" "# cat table.ada0s1\n" "BSD 8\n" "1 freebsd-ufs 0 4194304\n" "2 freebsd-swap 4194304 33554432\n" "4 freebsd-ufs 37748736 50331648\n" "5 freebsd-ufs 88080384 41943040\n" "6 freebsd-ufs 130023424 838860800\n" "7 freebsd-ufs 968884224 984640881\n" #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:439 msgid "" "If no free space is shown at the end of the disk, the size of both the slice " "and the last partition must be reduced by one sector. Edit the two files, " "reducing the size of both the slice and last partition by one. These are " "the last numbers in each listing." msgstr "" "Если в конце диска не отображается свободное пространство, размер и раздела, " "и последнего раздела должен быть уменьшен на один сектор. Отредактируйте два " "файла, уменьшив размер и раздела, и последнего раздела на единицу. Это " "последние числа в каждом списке." #. type: delimited block . 4 #: documentation/content/en/books/handbook/geom/_index.adoc:445 #, no-wrap msgid "" "# cat table.ada0\n" "MBR 4\n" "1 freebsd 63 1953525104 [active]\n" msgstr "" "# cat table.ada0\n" "MBR 4\n" "1 freebsd 63 1953525104 [active]\n" #. type: delimited block . 4 #: documentation/content/en/books/handbook/geom/_index.adoc:457 #, no-wrap msgid "" "# cat table.ada0s1\n" "BSD 8\n" "1 freebsd-ufs 0 4194304\n" "2 freebsd-swap 4194304 33554432\n" "4 freebsd-ufs 37748736 50331648\n" "5 freebsd-ufs 88080384 41943040\n" "6 freebsd-ufs 130023424 838860800\n" "7 freebsd-ufs 968884224 984640880\n" msgstr "" "# cat table.ada0s1\n" "BSD 8\n" "1 freebsd-ufs 0 4194304\n" "2 freebsd-swap 4194304 33554432\n" "4 freebsd-ufs 37748736 50331648\n" "5 freebsd-ufs 88080384 41943040\n" "6 freebsd-ufs 130023424 838860800\n" "7 freebsd-ufs 968884224 984640880\n" #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:460 msgid "" "If at least one sector was unallocated at the end of the disk, these two " "files can be used without modification." msgstr "" "Если хотя бы один сектор в конце диска был нераспределен, эти два файла " "можно использовать без изменений." #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:462 msgid "Now restore the partition table into [.filename]#mirror/gm0#:" msgstr "Теперь восстановите таблицу разделов в [.filename]#mirror/gm0#:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/geom/_index.adoc:467 #, no-wrap msgid "" "# gpart restore mirror/gm0 < table.ada0\n" "# gpart restore mirror/gm0s1 < table.ada0s1\n" msgstr "" "# gpart restore mirror/gm0 < table.ada0\n" "# gpart restore mirror/gm0s1 < table.ada0s1\n" #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:471 msgid "" "Check the partition table with `gpart show`. This example has [." "filename]#gm0s1a# for [.filename]#/#, [.filename]#gm0s1d# for [.filename]#/" "var#, [.filename]#gm0s1e# for [.filename]#/usr#, [.filename]#gm0s1f# for [." "filename]#/data1#, and [.filename]#gm0s1g# for [.filename]#/data2#." msgstr "" "Проверьте таблицу разделов с помощью `gpart show`. В этом примере [." "filename]#gm0s1a# для [.filename]#/#, [.filename]#gm0s1d# для [.filename]#/" "var#, [.filename]#gm0s1e# для [.filename]#/usr#, [.filename]#gm0s1f# для [." "filename]#/data1# и [.filename]#gm0s1g# для [.filename]#/data2#." #. type: delimited block . 4 #: documentation/content/en/books/handbook/geom/_index.adoc:478 #, no-wrap msgid "" "# gpart show mirror/gm0\n" "=> 63 1953525104 mirror/gm0 MBR (931G)\n" " 63 1953525042 1 freebsd [active] (931G)\n" " 1953525105 62 - free - (31k)\n" msgstr "" "# gpart show mirror/gm0\n" "=> 63 1953525104 mirror/gm0 MBR (931G)\n" " 63 1953525042 1 freebsd [active] (931G)\n" " 1953525105 62 - free - (31k)\n" #. type: delimited block . 4 #: documentation/content/en/books/handbook/geom/_index.adoc:488 #, no-wrap msgid "" "# gpart show mirror/gm0s1\n" "=> 0 1953525042 mirror/gm0s1 BSD (931G)\n" " 0 2097152 1 freebsd-ufs (1.0G)\n" " 2097152 16777216 2 freebsd-swap (8.0G)\n" " 18874368 41943040 4 freebsd-ufs (20G)\n" " 60817408 20971520 5 freebsd-ufs (10G)\n" " 81788928 629145600 6 freebsd-ufs (300G)\n" " 710934528 1242590514 7 freebsd-ufs (592G)\n" " 1953525042 63 - free - (31k)\n" msgstr "" "# gpart show mirror/gm0s1\n" "=> 0 1953525042 mirror/gm0s1 BSD (931G)\n" " 0 2097152 1 freebsd-ufs (1.0G)\n" " 2097152 16777216 2 freebsd-swap (8.0G)\n" " 18874368 41943040 4 freebsd-ufs (20G)\n" " 60817408 20971520 5 freebsd-ufs (10G)\n" " 81788928 629145600 6 freebsd-ufs (300G)\n" " 710934528 1242590514 7 freebsd-ufs (592G)\n" " 1953525042 63 - free - (31k)\n" #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:491 msgid "" "Both the slice and the last partition must have at least one free block at " "the end of the disk." msgstr "" "Как срез, так и последний раздел должны иметь как минимум один свободный " "блок в конце диска." #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:494 msgid "" "Create file systems on these new partitions. The number of partitions will " "vary to match the original disk, [.filename]#ada0#." msgstr "" "Создайте файловые системы на этих новых разделах. Количество разделов может " "варьироваться в соответствии с исходным диском, [.filename]#ada0#." #. type: delimited block . 4 #: documentation/content/en/books/handbook/geom/_index.adoc:502 #, no-wrap msgid "" "# newfs -U /dev/mirror/gm0s1a\n" "# newfs -U /dev/mirror/gm0s1d\n" "# newfs -U /dev/mirror/gm0s1e\n" "# newfs -U /dev/mirror/gm0s1f\n" "# newfs -U /dev/mirror/gm0s1g\n" msgstr "" "# newfs -U /dev/mirror/gm0s1a\n" "# newfs -U /dev/mirror/gm0s1d\n" "# newfs -U /dev/mirror/gm0s1e\n" "# newfs -U /dev/mirror/gm0s1f\n" "# newfs -U /dev/mirror/gm0s1g\n" #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:515 msgid "" "Adjust [.filename]#/etc/fstab# to use the new partitions on the mirror. " "Back up this file first by copying it to [.filename]#/etc/fstab.orig#." msgstr "" "Настройте [.filename]#/etc/fstab# для использования новых разделов на " "зеркале. Сначала создайте резервную копию этого файла, скопировав его в [." "filename]#/etc/fstab.orig#." #. type: delimited block . 4 #: documentation/content/en/books/handbook/geom/_index.adoc:519 #, no-wrap msgid "# cp /etc/fstab /etc/fstab.orig\n" msgstr "# cp /etc/fstab /etc/fstab.orig\n" #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:522 msgid "" "Edit [.filename]#/etc/fstab#, replacing [.filename]#/dev/ada0# with [." "filename]#mirror/gm0#." msgstr "" "Отредактируйте файл [.filename]#/etc/fstab#, заменив [.filename]#/dev/ada0# " "на [.filename]#mirror/gm0#." #. type: delimited block . 4 #: documentation/content/en/books/handbook/geom/_index.adoc:532 #, no-wrap msgid "" "# Device\t\tMountpoint\tFStype\tOptions\tDump\tPass#\n" "/dev/mirror/gm0s1a\t/\t\tufs\trw\t1\t1\n" "/dev/mirror/gm0s1b\tnone\t\tswap\tsw\t0\t0\n" "/dev/mirror/gm0s1d\t/var\t\tufs\trw\t2\t2\n" "/dev/mirror/gm0s1e\t/usr\t\tufs\trw\t2\t2\n" "/dev/mirror/gm0s1f\t/data1\t\tufs\trw\t2\t2\n" "/dev/mirror/gm0s1g\t/data2\t\tufs\trw\t2\t2\n" msgstr "" "# Device\t\tMountpoint\tFStype\tOptions\tDump\tPass#\n" "/dev/mirror/gm0s1a\t/\t\tufs\trw\t1\t1\n" "/dev/mirror/gm0s1b\tnone\t\tswap\tsw\t0\t0\n" "/dev/mirror/gm0s1d\t/var\t\tufs\trw\t2\t2\n" "/dev/mirror/gm0s1e\t/usr\t\tufs\trw\t2\t2\n" "/dev/mirror/gm0s1f\t/data1\t\tufs\trw\t2\t2\n" "/dev/mirror/gm0s1g\t/data2\t\tufs\trw\t2\t2\n" #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:535 msgid "" "If the [.filename]#geom_mirror.ko# kernel module has not been built into the " "kernel, edit [.filename]#/boot/loader.conf# to load it at boot:" msgstr "" "Если модуль ядра [.filename]#geom_mirror.ko# не встроен в ядро, " "отредактируйте [.filename]#/boot/loader.conf# для его загрузки при старте " "системы:" #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:543 msgid "" "File systems from the original disk can now be copied onto the mirror with " "man:dump[8] and man:restore[8]. Each file system dumped with `dump -L` will " "create a snapshot first, which can take some time." msgstr "" "Файловые системы с исходного диска теперь можно скопировать на зеркало с " "помощью man:dump[8] и man:restore[8]. Каждая файловая система, сохранённая с " "помощью `dump -L`, сначала создаст снимок, что может занять некоторое время." #. type: delimited block . 4 #: documentation/content/en/books/handbook/geom/_index.adoc:556 #, no-wrap msgid "" "# mount /dev/mirror/gm0s1a /mnt\n" "# dump -C16 -b64 -0aL -f - / | (cd /mnt && restore -rf -)\n" "# mount /dev/mirror/gm0s1d /mnt/var\n" "# mount /dev/mirror/gm0s1e /mnt/usr\n" "# mount /dev/mirror/gm0s1f /mnt/data1\n" "# mount /dev/mirror/gm0s1g /mnt/data2\n" "# dump -C16 -b64 -0aL -f - /usr | (cd /mnt/usr && restore -rf -)\n" "# dump -C16 -b64 -0aL -f - /var | (cd /mnt/var && restore -rf -)\n" "# dump -C16 -b64 -0aL -f - /data1 | (cd /mnt/data1 && restore -rf -)\n" "# dump -C16 -b64 -0aL -f - /data2 | (cd /mnt/data2 && restore -rf -)\n" msgstr "" "# mount /dev/mirror/gm0s1a /mnt\n" "# dump -C16 -b64 -0aL -f - / | (cd /mnt && restore -rf -)\n" "# mount /dev/mirror/gm0s1d /mnt/var\n" "# mount /dev/mirror/gm0s1e /mnt/usr\n" "# mount /dev/mirror/gm0s1f /mnt/data1\n" "# mount /dev/mirror/gm0s1g /mnt/data2\n" "# dump -C16 -b64 -0aL -f - /usr | (cd /mnt/usr && restore -rf -)\n" "# dump -C16 -b64 -0aL -f - /var | (cd /mnt/var && restore -rf -)\n" "# dump -C16 -b64 -0aL -f - /data1 | (cd /mnt/data1 && restore -rf -)\n" "# dump -C16 -b64 -0aL -f - /data2 | (cd /mnt/data2 && restore -rf -)\n" #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:561 msgid "" "Restart the system, booting from [.filename]#ada1#. If everything is " "working, the system will boot from [.filename]#mirror/gm0#, which now " "contains the same data as [.filename]#ada0# had previously. See crossref:" "geom[gmirror-troubleshooting, Troubleshooting] if there are problems booting." msgstr "" "Перезагрузите систему, загрузившись с [.filename]#ada1#. Если всё работает " "правильно, система загрузится с [.filename]#mirror/gm0#, который теперь " "содержит те же данные, что ранее были на [.filename]#ada0#. Обратитесь к " "разделу crossref:geom[gmirror-troubleshooting, Устранение неполадок], если " "возникли проблемы с загрузкой." #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:563 msgid "" "At this point, the mirror still consists of only the single [." "filename]#ada1# disk." msgstr "" "На этом этапе зеркало всё ещё состоит только из одного диска [." "filename]#ada1#." #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:565 msgid "" "After booting from [.filename]#mirror/gm0# successfully, the final step is " "inserting [.filename]#ada0# into the mirror." msgstr "" "После успешной загрузки с [.filename]#mirror/gm0# последним шагом будет " "добавление [.filename]#ada0# в зеркало." #. type: delimited block = 4 #: documentation/content/en/books/handbook/geom/_index.adoc:571 msgid "" "When [.filename]#ada0# is inserted into the mirror, its former contents will " "be overwritten by data from the mirror. Make certain that [." "filename]#mirror/gm0# has the same contents as [.filename]#ada0# before " "adding [.filename]#ada0# to the mirror. If the contents previously copied " "by man:dump[8] and man:restore[8] are not identical to what was on [." "filename]#ada0#, revert [.filename]#/etc/fstab# to mount the file systems on " "[.filename]#ada0#, reboot, and start the whole procedure again." msgstr "" "Когда диск [.filename]#ada0# добавляется в зеркало, его прежнее содержимое " "будет перезаписано данными из зеркала. Убедитесь, что [.filename]#mirror/" "gm0# имеет такое же содержимое, как [.filename]#ada0#, перед добавлением [." "filename]#ada0# в зеркало. Если данные, ранее скопированные с помощью man:" "dump[8] и man:restore[8], не идентичны тому, что было на [.filename]#ada0#, " "верните [.filename]#/etc/fstab# к монтированию файловых систем на [." "filename]#ada0#, перезагрузите систему и начните всю процедуру заново." #. type: delimited block . 4 #: documentation/content/en/books/handbook/geom/_index.adoc:577 #, no-wrap msgid "" "# gmirror insert gm0 ada0\n" "GEOM_MIRROR: Device gm0: rebuilding provider ada0\n" msgstr "" "# gmirror insert gm0 ada0\n" "GEOM_MIRROR: Device gm0: rebuilding provider ada0\n" #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:581 msgid "" "Synchronization between the two disks will start immediately. Use `gmirror " "status` to view the progress." msgstr "" "Синхронизация между двумя дисками начнется немедленно. Для просмотра " "прогресса используйте команду `gmirror status`." #. type: delimited block . 4 #: documentation/content/en/books/handbook/geom/_index.adoc:588 #, no-wrap msgid "" "# gmirror status\n" " Name Status Components\n" "mirror/gm0 DEGRADED ada1 (ACTIVE)\n" " ada0 (SYNCHRONIZING, 64%)\n" msgstr "" "# gmirror status\n" " Name Status Components\n" "mirror/gm0 DEGRADED ada1 (ACTIVE)\n" " ada0 (SYNCHRONIZING, 64%)\n" #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:591 msgid "After a while, synchronization will finish." msgstr "Через некоторое время синхронизация завершится." #. type: delimited block . 4 #: documentation/content/en/books/handbook/geom/_index.adoc:599 #, no-wrap msgid "" "GEOM_MIRROR: Device gm0: rebuilding provider ada0 finished.\n" "# gmirror status\n" " Name Status Components\n" "mirror/gm0 COMPLETE ada1 (ACTIVE)\n" " ada0 (ACTIVE)\n" msgstr "" "GEOM_MIRROR: Device gm0: rebuilding provider ada0 finished.\n" "# gmirror status\n" " Name Status Components\n" "mirror/gm0 COMPLETE ada1 (ACTIVE)\n" " ada0 (ACTIVE)\n" #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:603 msgid "" "[.filename]#mirror/gm0# now consists of the two disks [.filename]#ada0# and " "[.filename]#ada1#, and the contents are automatically synchronized with each " "other. In use, [.filename]#mirror/gm0# will behave just like the original " "single drive." msgstr "" "[.filename]#mirror/gm0# теперь состоит из двух дисков [.filename]#ada0# и [." "filename]#ada1#, и их содержимое автоматически синхронизируется между собой. " "При использовании [.filename]#mirror/gm0# будет вести себя так же, как " "исходный одиночный диск." #. type: Title === #: documentation/content/en/books/handbook/geom/_index.adoc:605 #, no-wrap msgid "Troubleshooting" msgstr "Устранение неполадок" #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:609 msgid "" "If the system no longer boots, BIOS settings may have to be changed to boot " "from one of the new mirrored drives. Either mirror drive can be used for " "booting, as they contain identical data." msgstr "" "Если система больше не загружается, возможно, потребуется изменить настройки " "BIOS для загрузки с одного из новых зеркалированных дисков. Для загрузки " "можно использовать любой из зеркальных дисков, так как они содержат " "идентичные данные." #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:611 msgid "" "If the boot stops with this message, something is wrong with the mirror " "device:" msgstr "" "Если загрузка останавливается с таким сообщением, значит, что-то не так с " "зеркальным устройством:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/geom/_index.adoc:615 #, no-wrap msgid "Mounting from ufs:/dev/mirror/gm0s1a failed with error 19.\n" msgstr "Mounting from ufs:/dev/mirror/gm0s1a failed with error 19.\n" #. type: delimited block . 4 #: documentation/content/en/books/handbook/geom/_index.adoc:619 #, no-wrap msgid "" "Loader variables:\n" " vfs.root.mountfrom=ufs:/dev/mirror/gm0s1a\n" " vfs.root.mountfrom.options=rw\n" msgstr "" "Loader variables:\n" " vfs.root.mountfrom=ufs:/dev/mirror/gm0s1a\n" " vfs.root.mountfrom.options=rw\n" #. type: delimited block . 4 #: documentation/content/en/books/handbook/geom/_index.adoc:624 #, no-wrap msgid "" "Manual root filesystem specification:\n" " : [options]\n" " Mount using filesystem \n" " and with the specified (optional) option list.\n" msgstr "" "Manual root filesystem specification:\n" " : [options]\n" " Mount using filesystem \n" " and with the specified (optional) option list.\n" #. type: delimited block . 4 #: documentation/content/en/books/handbook/geom/_index.adoc:629 #, no-wrap msgid "" " e.g. ufs:/dev/da0s1a\n" " zfs:tank\n" " cd9660:/dev/acd0 ro\n" " (which is equivalent to: mount -t cd9660 -o ro /dev/acd0 /)\n" msgstr "" " e.g. ufs:/dev/da0s1a\n" " zfs:tank\n" " cd9660:/dev/acd0 ro\n" " (which is equivalent to: mount -t cd9660 -o ro /dev/acd0 /)\n" #. type: delimited block . 4 #: documentation/content/en/books/handbook/geom/_index.adoc:633 #, no-wrap msgid "" " ? List valid disk boot devices\n" " . Yield 1 second (for background tasks)\n" " Abort manual input\n" msgstr "" " ? List valid disk boot devices\n" " . Yield 1 second (for background tasks)\n" " Abort manual input\n" #. type: delimited block . 4 #: documentation/content/en/books/handbook/geom/_index.adoc:635 #, no-wrap msgid "mountroot>\n" msgstr "mountroot>\n" #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:640 msgid "" "Forgetting to load the [.filename]#geom_mirror.ko# module in [.filename]#/" "boot/loader.conf# can cause this problem. To fix it, boot from a FreeBSD " "installation media and choose `Shell` at the first prompt. Then load the " "mirror module and mount the mirror device:" msgstr "" "Проблема может быть вызвана тем, что забыли загрузить модуль [." "filename]#geom_mirror.ko# , не добавив его в [.filename]#/boot/loader.conf#. " "Чтобы исправить её, загрузитесь с установочного носителя FreeBSD и выберите " "`Shell` при первом запросе. Затем загрузите модуль mirror и смонтируйте " "зеркальное устройство:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/geom/_index.adoc:645 #, no-wrap msgid "" "# gmirror load\n" "# mount /dev/mirror/gm0s1a /mnt\n" msgstr "" "# gmirror load\n" "# mount /dev/mirror/gm0s1a /mnt\n" #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:648 msgid "" "Edit [.filename]#/mnt/boot/loader.conf#, adding a line to load the mirror " "module:" msgstr "" "Отредактируйте файл [.filename]#/mnt/boot/loader.conf#, добавив строку для " "загрузки модуля mirror:" #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:655 msgid "Save the file and reboot." msgstr "Сохраните файл и перезагрузите систему." #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:661 msgid "" "Other problems that cause `error 19` require more effort to fix. Although " "the system should boot from [.filename]#ada0#, another prompt to select a " "shell will appear if [.filename]#/etc/fstab# is incorrect. Enter `ufs:/dev/" "ada0s1a` at the boot loader prompt and press kbd:[Enter]. Undo the edits in " "[.filename]#/etc/fstab# then mount the file systems from the original disk " "([.filename]#ada0#) instead of the mirror. Reboot the system and try the " "procedure again." msgstr "" "Другие проблемы, вызывающие `ошибку 19`, требуют больше усилий для " "исправления. Хотя система должна загружаться с [.filename]#ada0#, появится " "ещё один запрос на выбор оболочки, если [.filename]#/etc/fstab# указан " "неверно. Введите `ufs:/dev/ada0s1a` в строке загрузчика и нажмите kbd:" "[Enter]. Отмените изменения в [.filename]#/etc/fstab#, затем смонтируйте " "файловые системы с исходного диска ([.filename]#ada0#) вместо зеркала. " "Перезагрузите систему и повторите процедуру снова." #. type: delimited block . 4 #: documentation/content/en/books/handbook/geom/_index.adoc:667 #, no-wrap msgid "" "Enter full pathname of shell or RETURN for /bin/sh:\n" "# cp /etc/fstab.orig /etc/fstab\n" "# reboot\n" msgstr "" "Enter full pathname of shell or RETURN for /bin/sh:\n" "# cp /etc/fstab.orig /etc/fstab\n" "# reboot\n" #. type: Title === #: documentation/content/en/books/handbook/geom/_index.adoc:669 #, no-wrap msgid "Recovering from Disk Failure" msgstr "Восстановление после отказа диска" #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:673 msgid "" "The benefit of disk mirroring is that an individual disk can fail without " "causing the mirror to lose any data. In the above example, if [." "filename]#ada0# fails, the mirror will continue to work, providing data from " "the remaining working drive, [.filename]#ada1#." msgstr "" "Преимущество зеркалирования дисков заключается в том, что при отказе одного " "диска зеркало не теряет данных. В приведённом примере, если [." "filename]#ada0# выйдет из строя, зеркало продолжит работать, предоставляя " "данные с оставшегося рабочего диска [.filename]#ada1#." #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:677 msgid "" "To replace the failed drive, shut down the system and physically replace the " "failed drive with a new drive of equal or greater capacity. Manufacturers " "use somewhat arbitrary values when rating drives in gigabytes, and the only " "way to really be sure is to compare the total count of sectors shown by " "`diskinfo -v`. A drive with larger capacity than the mirror will work, " "although the extra space on the new drive will not be used." msgstr "" "Для замены вышедшего из строя диска завершите работу системы и физически " "замените неисправный диск новым диском равной или большей ёмкости. " "Производители используют довольно произвольные значения при указании ёмкости " "дисков в гигабайтах, и единственный способ точно убедиться в этом — сравнить " "общее количество секторов, отображаемое командой `diskinfo -v`. Диск с " "большей ёмкостью, чем у зеркала, будет работать, хотя дополнительное " "пространство на новом диске использоваться не будет." #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:680 msgid "" "After the computer is powered back up, the mirror will be running in a " "\"degraded\" mode with only one drive. The mirror is told to forget drives " "that are not currently connected:" msgstr "" "После перезагрузки компьютера зеркало будет работать в \"деградированном\" " "режиме с одним диском. Необходимо указать зеркалу забыть диски, которые в " "данный момент не подключены:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/geom/_index.adoc:684 #, no-wrap msgid "# gmirror forget gm0\n" msgstr "# gmirror forget gm0\n" #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:689 msgid "" "Any old metadata should be cleared from the replacement disk using the " "instructions in crossref:geom[geom-mirror-metadata, Metadata Issues]. Then " "the replacement disk, [.filename]#ada4# for this example, is inserted into " "the mirror:" msgstr "" "Любые старые метаданные должны быть удалены с заменяемого диска, следуя " "инструкциям в crossref:geom[geom-mirror-metadata, Проблемы с метаданными]. " "Затем заменяющий диск, [.filename]#ada4# в данном примере, добавляется в " "зеркало:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/geom/_index.adoc:693 #, no-wrap msgid "# gmirror insert gm0 /dev/ada4\n" msgstr "# gmirror insert gm0 /dev/ada4\n" #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:698 msgid "" "Resynchronization begins when the new drive is inserted into the mirror. " "This process of copying mirror data to a new drive can take a while. " "Performance of the mirror will be greatly reduced during the copy, so " "inserting new drives is best done when there is low demand on the computer." msgstr "" "Синхронизация начинается при установке нового диска в зеркало. Этот процесс " "копирования данных зеркала на новый диск может занять некоторое время. " "Производительность зеркала значительно снизится во время копирования, " "поэтому добавление новых дисков лучше выполнять при низкой нагрузке на " "компьютер." #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:701 msgid "" "Progress can be monitored with `gmirror status`, which shows drives that are " "being synchronized and the percentage of completion. During " "resynchronization, the status will be `DEGRADED`, changing to `COMPLETE` " "when the process is finished." msgstr "" "Ход выполнения можно отслеживать с помощью `gmirror status`, который " "показывает диски, находящиеся в процессе синхронизации, и процент " "завершения. Во время повторной синхронизации статус будет `DEGRADED`, а по " "завершении процесса изменится на `COMPLETE`." #. type: Title == #: documentation/content/en/books/handbook/geom/_index.adoc:703 #, no-wrap msgid "RAID3 - Byte-level Striping with Dedicated Parity" msgstr "RAID3 - чередование на уровне байтов с выделенной чётностью" #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:711 msgid "" "RAID3 is a method used to combine several disk drives into a single volume " "with a dedicated parity disk. In a RAID3 system, data is split up into a " "number of bytes that are written across all the drives in the array except " "for one disk which acts as a dedicated parity disk. This means that disk " "reads from a RAID3 implementation access all disks in the array. " "Performance can be enhanced by using multiple disk controllers. The RAID3 " "array provides a fault tolerance of 1 drive, while providing a capacity of 1 " "- 1/n times the total capacity of all drives in the array, where n is the " "number of hard drives in the array. Such a configuration is mostly suitable " "for storing data of larger sizes such as multimedia files." msgstr "" "RAID3 — это метод объединения нескольких дисков в один том с выделенным " "диском чётности. В системе RAID3 данные разбиваются на байты, которые " "записываются на все диски массива, за исключением одного диска, выполняющего " "роль выделенного диска чётности. Это означает, что операции чтения в RAID3 " "обращаются ко всем дискам массива. Производительность может быть повышена за " "счет использования нескольких контроллеров дисков. Массив RAID3 обеспечивает " "отказоустойчивость на уровне одного диска, а его емкость составляет 1 - 1/n " "от общей емкости всех дисков массива, где n — количество жёстких дисков в " "массиве. Такая конфигурация в основном подходит для хранения данных большого " "объёма, таких как мультимедийные файлы." #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:715 msgid "" "At least 3 physical hard drives are required to build a RAID3 array. Each " "disk must be of the same size, since I/O requests are interleaved to read or " "write to multiple disks in parallel. Also, due to the nature of RAID3, the " "number of drives must be equal to 3, 5, 9, 17, and so on, or 2^n + 1." msgstr "" "Для создания массива RAID3 требуется как минимум 3 физических жёстких диска. " "Каждый диск должен быть одинакового размера, так как запросы ввода-вывода " "чередуются для чтения или записи на несколько дисков параллельно. Кроме " "того, из-за особенностей RAID3 количество дисков должно быть равно 3, 5, 9, " "17 и так далее, то есть соответствовать формуле 2^n + 1." #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:717 msgid "" "This section demonstrates how to create a software RAID3 on a FreeBSD system." msgstr "" "Этот раздел демонстрирует, как создать программный RAID3 в системе FreeBSD." #. type: delimited block = 4 #: documentation/content/en/books/handbook/geom/_index.adoc:721 msgid "" "While it is theoretically possible to boot from a RAID3 array on FreeBSD, " "that configuration is uncommon and is not advised." msgstr "" "Хотя теоретически возможно загружаться с массива RAID3 в FreeBSD, такая " "конфигурация встречается редко и не рекомендуется." #. type: Title === #: documentation/content/en/books/handbook/geom/_index.adoc:723 #, no-wrap msgid "Creating a Dedicated RAID3 Array" msgstr "Создание выделенного массива RAID3" #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:727 msgid "" "In FreeBSD, support for RAID3 is implemented by the man:graid3[8] GEOM " "class. Creating a dedicated RAID3 array on FreeBSD requires the following " "steps." msgstr "" "В FreeBSD поддержка RAID3 реализована классом GEOM man:graid3[8]. Создание " "выделенного массива RAID3 в FreeBSD требует выполнения следующих шагов." #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:730 msgid "" "First, load the [.filename]#geom_raid3.ko# kernel module by issuing one of " "the following commands:" msgstr "" "Сначала загрузите модуль ядра [.filename]#geom_raid3.ko#, выполнив одну из " "следующих команд:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/geom/_index.adoc:734 #, no-wrap msgid "# graid3 load\n" msgstr "# graid3 load\n" #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:737 msgid "or:" msgstr "или:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/geom/_index.adoc:741 #, no-wrap msgid "# kldload geom_raid3\n" msgstr "# kldload geom_raid3\n" #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:744 msgid "" "Ensure that a suitable mount point exists. This command creates a new " "directory to use as the mount point:" msgstr "" "Убедитесь, что существует подходящая точка монтирования. Эта команда создает " "новый каталог для использования в качестве точки монтирования:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/geom/_index.adoc:748 #, no-wrap msgid "# mkdir /multimedia\n" msgstr "# mkdir /multimedia\n" #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:751 msgid "" "Determine the device names for the disks which will be added to the array, " "and create the new RAID3 device. The final device listed will act as the " "dedicated parity disk. This example uses three unpartitioned ATA drives: [." "filename]#ada1# and [.filename]#ada2# for data, and [.filename]#ada3# for " "parity." msgstr "" "Определите имена устройств для дисков, которые будут добавлены в массив, и " "создайте новое устройство RAID3. Последнее указанное устройство будет " "использоваться в качестве выделенного диска чётности. В этом примере " "используются три неразделенных ATA-диска: [.filename]#ada1# и [." "filename]#ada2# для данных, а [.filename]#ada3# для чётности." #. type: delimited block . 4 #: documentation/content/en/books/handbook/geom/_index.adoc:759 #, no-wrap msgid "" "# graid3 label -v gr0 /dev/ada1 /dev/ada2 /dev/ada3\n" "Metadata value stored on /dev/ada1.\n" "Metadata value stored on /dev/ada2.\n" "Metadata value stored on /dev/ada3.\n" "Done.\n" msgstr "" "# graid3 label -v gr0 /dev/ada1 /dev/ada2 /dev/ada3\n" "Metadata value stored on /dev/ada1.\n" "Metadata value stored on /dev/ada2.\n" "Metadata value stored on /dev/ada3.\n" "Done.\n" #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:762 msgid "" "Partition the newly created [.filename]#gr0# device and put a UFS file " "system on it:" msgstr "" "Разделите только что созданное устройство [.filename]#gr0# и разместите на " "нём файловую систему UFS:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/geom/_index.adoc:768 #, no-wrap msgid "" "# gpart create -s GPT /dev/raid3/gr0\n" "# gpart add -t freebsd-ufs /dev/raid3/gr0\n" "# newfs -j /dev/raid3/gr0p1\n" msgstr "" "# gpart create -s GPT /dev/raid3/gr0\n" "# gpart add -t freebsd-ufs /dev/raid3/gr0\n" "# newfs -j /dev/raid3/gr0p1\n" #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:772 msgid "" "Many numbers will glide across the screen, and after a bit of time, the " "process will be complete. The volume has been created and is ready to be " "mounted:" msgstr "" "По экрану пройдёт множество чисел, и через некоторое время процесс " "завершится. Том создан и готов к монтированию:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/geom/_index.adoc:776 #, no-wrap msgid "# mount /dev/raid3/gr0p1 /multimedia/\n" msgstr "# mount /dev/raid3/gr0p1 /multimedia/\n" #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:779 msgid "The RAID3 array is now ready to use." msgstr "Массив RAID3 теперь готов к использованию." #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:781 msgid "" "Additional configuration is needed to retain this setup across system " "reboots." msgstr "" "Для сохранения данной конфигурации после перезагрузки системы требуется " "дополнительная настройка." #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:784 msgid "" "The [.filename]#geom_raid3.ko# module must be loaded before the array can be " "mounted. To automatically load the kernel module during system " "initialization, add the following line to [.filename]#/boot/loader.conf#:" msgstr "" "Модуль [.filename]#geom_raid3.ko# должен быть загружен перед монтированием " "массива. Для автоматической загрузки модуля ядра во время инициализации " "системы добавьте следующую строку в [.filename]#/boot/loader.conf#:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/geom/_index.adoc:788 #, no-wrap msgid "geom_raid3_load=\"YES\"\n" msgstr "geom_raid3_load=\"YES\"\n" #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:791 msgid "" "The following volume information must be added to [.filename]#/etc/fstab# in " "order to automatically mount the array's file system during the system boot " "process:" msgstr "" "Следующую информацию о разделе необходимо добавить в [.filename]#/etc/" "fstab#, чтобы автоматически монтировать файловую систему массива во время " "загрузки системы:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/geom/_index.adoc:795 #, no-wrap msgid "/dev/raid3/gr0p1\t/multimedia\tufs\trw\t2\t2\n" msgstr "/dev/raid3/gr0p1\t/multimedia\tufs\trw\t2\t2\n" #. type: Title == #: documentation/content/en/books/handbook/geom/_index.adoc:798 #, no-wrap msgid "Software RAID Devices" msgstr "Устройства с программным RAID" #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:803 msgid "" "Some motherboards and expansion cards add some simple hardware, usually just " "a ROM, that allows the computer to boot from a RAID array. After booting, " "access to the RAID array is handled by software running on the computer's " "main processor. This \"hardware-assisted software RAID\" gives RAID arrays " "that are not dependent on any particular operating system, and which are " "functional even before an operating system is loaded." msgstr "" "Некоторые материнские платы и карты расширения добавляют простые аппаратные " "компоненты, обычно только ПЗУ, что позволяет компьютеру загружаться с RAID-" "массива. После загрузки доступ к RAID-массиву обеспечивается программным " "обеспечением, работающим на основном процессоре компьютера. Такой " "\"аппаратно-ускоренный программный RAID\" создаёт массивы, не зависящие от " "конкретной операционной системы и функционирующие ещё до её загрузки." #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:806 msgid "" "Several levels of RAID are supported, depending on the hardware in use. See " "man:graid[8] for a complete list." msgstr "" "Несколько уровней RAID поддерживаются в зависимости от используемого " "оборудования. Полный список см. в man:graid[8]." #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:809 msgid "" "man:graid[8] requires the [.filename]#geom_raid.ko# kernel module, which is " "included in the [.filename]#GENERIC# kernel starting with FreeBSD 9.1. If " "needed, it can be loaded manually with `graid load`." msgstr "" "man:graid[8] требует наличия модуля ядра [.filename]#geom_raid.ko#, который " "включён в ядро [.filename]#GENERIC# начиная с FreeBSD 9.1. При необходимости " "его можно загрузить вручную командой `graid load`." #. type: Title === #: documentation/content/en/books/handbook/geom/_index.adoc:811 #, no-wrap msgid "Creating an Array" msgstr "Создание массива" #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:816 msgid "" "Software RAID devices often have a menu that can be entered by pressing " "special keys when the computer is booting. The menu can be used to create " "and delete RAID arrays. man:graid[8] can also create arrays directly from " "the command line." msgstr "" "В устройствах с программным RAID часто есть меню, которое можно вызвать, " "нажав специальные клавиши при загрузке компьютера. Это меню позволяет " "создавать и удалять RAID-массивы. man:graid[8] также может создавать массивы " "напрямую из командной строки." #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:820 msgid "" "`graid label` is used to create a new array. The motherboard used for this " "example has an Intel software RAID chipset, so the Intel metadata format is " "specified. The new array is given a label of [.filename]#gm0#, it is a " "mirror (RAID1), and uses drives [.filename]#ada0# and [.filename]#ada1#." msgstr "" "`graid label` используется для создания нового массива. В данном примере " "используется материнская плата с чипсетом Intel software RAID, поэтому " "указан формат метаданных Intel. Новый массив получает метку [." "filename]#gm0#, это зеркало (RAID1), и использует диски [.filename]#ada0# и " "[.filename]#ada1#." #. type: delimited block = 4 #: documentation/content/en/books/handbook/geom/_index.adoc:825 msgid "" "Some space on the drives will be overwritten when they are made into a new " "array. Back up existing data first!" msgstr "" "Некоторое пространство на дисках будет перезаписано при создании нового " "массива. Предварительно создайте резервную копию существующих данных!" #. type: delimited block . 4 #: documentation/content/en/books/handbook/geom/_index.adoc:839 #, no-wrap msgid "" "# graid label Intel gm0 RAID1 ada0 ada1\n" "GEOM_RAID: Intel-a29ea104: Array Intel-a29ea104 created.\n" "GEOM_RAID: Intel-a29ea104: Disk ada0 state changed from NONE to ACTIVE.\n" "GEOM_RAID: Intel-a29ea104: Subdisk gm0:0-ada0 state changed from NONE to ACTIVE.\n" "GEOM_RAID: Intel-a29ea104: Disk ada1 state changed from NONE to ACTIVE.\n" "GEOM_RAID: Intel-a29ea104: Subdisk gm0:1-ada1 state changed from NONE to ACTIVE.\n" "GEOM_RAID: Intel-a29ea104: Array started.\n" "GEOM_RAID: Intel-a29ea104: Volume gm0 state changed from STARTING to OPTIMAL.\n" "Intel-a29ea104 created\n" "GEOM_RAID: Intel-a29ea104: Provider raid/r0 for volume gm0 created.\n" msgstr "" "# graid label Intel gm0 RAID1 ada0 ada1\n" "GEOM_RAID: Intel-a29ea104: Array Intel-a29ea104 created.\n" "GEOM_RAID: Intel-a29ea104: Disk ada0 state changed from NONE to ACTIVE.\n" "GEOM_RAID: Intel-a29ea104: Subdisk gm0:0-ada0 state changed from NONE to ACTIVE.\n" "GEOM_RAID: Intel-a29ea104: Disk ada1 state changed from NONE to ACTIVE.\n" "GEOM_RAID: Intel-a29ea104: Subdisk gm0:1-ada1 state changed from NONE to ACTIVE.\n" "GEOM_RAID: Intel-a29ea104: Array started.\n" "GEOM_RAID: Intel-a29ea104: Volume gm0 state changed from STARTING to OPTIMAL.\n" "Intel-a29ea104 created\n" "GEOM_RAID: Intel-a29ea104: Provider raid/r0 for volume gm0 created.\n" #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:842 msgid "A status check shows the new mirror is ready for use:" msgstr "" "Проверка состояния показывает, что новое зеркало готово к использованию:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/geom/_index.adoc:849 #: documentation/content/en/books/handbook/geom/_index.adoc:1025 #, no-wrap msgid "" "# graid status\n" " Name Status Components\n" "raid/r0 OPTIMAL ada0 (ACTIVE (ACTIVE))\n" " ada1 (ACTIVE (ACTIVE))\n" msgstr "" "# graid status\n" " Name Status Components\n" "raid/r0 OPTIMAL ada0 (ACTIVE (ACTIVE))\n" " ada1 (ACTIVE (ACTIVE))\n" #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:854 msgid "" "The array device appears in [.filename]#/dev/raid/#. The first array is " "called [.filename]#r0#. Additional arrays, if present, will be [." "filename]#r1#, [.filename]#r2#, and so on." msgstr "" "Устройство массива отображается в [.filename]#/dev/raid/#. Первый массив " "называется [.filename]#r0#. Дополнительные массивы, если они есть, будут " "называться [.filename]#r1#, [.filename]#r2# и так далее." #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:858 msgid "" "The BIOS menu on some of these devices can create arrays with special " "characters in their names. To avoid problems with those special characters, " "arrays are given simple numbered names like [.filename]#r0#. To show the " "actual labels, like [.filename]#gm0# in the example above, use man:sysctl[8]:" msgstr "" "В меню BIOS на некоторых из этих устройств можно создавать массивы со " "специальными символами в их именах. Чтобы избежать проблем с этими " "специальными символами, массивам присваиваются простые числовые имена, " "например, [.filename]#r0#. Для отображения фактических меток, таких как [." "filename]#gm0# в примере выше, используйте man:sysctl[8]:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/geom/_index.adoc:862 #, no-wrap msgid "# sysctl kern.geom.raid.name_format=1\n" msgstr "# sysctl kern.geom.raid.name_format=1\n" #. type: Title === #: documentation/content/en/books/handbook/geom/_index.adoc:865 #, no-wrap msgid "Multiple Volumes" msgstr "Несколько томов" #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:871 msgid "" "Some software RAID devices support more than one _volume_ on an array. " "Volumes work like partitions, allowing space on the physical drives to be " "split and used in different ways. For example, Intel software RAID devices " "support two volumes. This example creates a 40 G mirror for safely storing " "the operating system, followed by a 20 G RAID0 (stripe) volume for fast " "temporary storage:" msgstr "" "Некоторые устройства программного RAID поддерживают более одного _тома_ в " "массиве. Тома работают подобно разделам, позволяя разделять пространство на " "физических дисках и использовать его различными способами. Например, " "устройства программного RAID от Intel поддерживают два тома. В этом примере " "создаётся зеркало размером 40 ГБ для безопасного хранения операционной " "системы, а затем том RAID0 (чередующийся) размером 20 ГБ для быстрого " "временного хранения:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/geom/_index.adoc:876 #, no-wrap msgid "" "# graid label -S 40G Intel gm0 RAID1 ada0 ada1\n" "# graid add -S 20G gm0 RAID0\n" msgstr "" "# graid label -S 40G Intel gm0 RAID1 ada0 ada1\n" "# graid add -S 20G gm0 RAID0\n" #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:880 msgid "" "Volumes appear as additional [.filename]#rX# entries in [.filename]#/dev/" "raid/#. An array with two volumes will show [.filename]#r0# and [." "filename]#r1#." msgstr "" "Тома появляются как дополнительные записи [.filename]#rX# в каталоге [." "filename]#/dev/raid/#. Массив с двумя томами будет отображать [." "filename]#r0# и [.filename]#r1#." #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:882 msgid "" "See man:graid[8] for the number of volumes supported by different software " "RAID devices." msgstr "" "См. man:graid[8] для информации о количестве томов, поддерживаемых " "различными устройствами программного RAID." #. type: Title === #: documentation/content/en/books/handbook/geom/_index.adoc:884 #, no-wrap msgid "Converting a Single Drive to a Mirror" msgstr "Преобразование одиночного диска в зеркало" #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:888 msgid "" "Under certain specific conditions, it is possible to convert an existing " "single drive to a man:graid[8] array without reformatting. To avoid data " "loss during the conversion, the existing drive must meet these minimum " "requirements:" msgstr "" "При определённых условиях возможно преобразовать существующий одиночный диск " "в массив man:graid[8] без переформатирования. Чтобы избежать потери данных " "во время преобразования, существующий диск должен соответствовать следующим " "минимальным требованиям:" #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:890 msgid "" "The drive must be partitioned with the MBR partitioning scheme. GPT or other " "partitioning schemes with metadata at the end of the drive will be " "overwritten and corrupted by the man:graid[8] metadata." msgstr "" "Диск должен быть размечен с использованием схемы разделов MBR. Схемы " "разделов GPT или другие схемы с метаданными в конце диска будут перезаписаны " "и повреждены метаданными man:graid[8]." #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:891 msgid "" "There must be enough unpartitioned and unused space at the end of the drive " "to hold the man:graid[8] metadata. This metadata varies in size, but the " "largest occupies 64 M, so at least that much free space is recommended." msgstr "" "Для размещения метаданных man:graid[8] в конце диска должно быть достаточно " "неразмеченного и неиспользуемого пространства. Размер этих метаданных может " "варьироваться, но самые большие занимают 64 МБ, поэтому рекомендуется иметь " "как минимум столько свободного места." #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:894 msgid "" "If the drive meets these requirements, start by making a full backup. Then " "create a single-drive mirror with that drive:" msgstr "" "Если диск соответствует этим требованиям, начните с создания полной " "резервной копии. Затем создайте зеркало с одним диском на этом диске:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/geom/_index.adoc:898 #, no-wrap msgid "# graid label Intel gm0 RAID1 ada0 NONE\n" msgstr "# graid label Intel gm0 RAID1 ada0 NONE\n" #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:902 msgid "" "man:graid[8] metadata was written to the end of the drive in the unused " "space. A second drive can now be inserted into the mirror:" msgstr "" "Метаданные `man:graid[8]` были записаны в конец диска в неиспользуемое " "пространство. Теперь можно вставить второй диск в зеркало:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/geom/_index.adoc:906 #, no-wrap msgid "# graid insert raid/r0 ada1\n" msgstr "# graid insert raid/r0 ada1\n" #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:910 msgid "" "Data from the original drive will immediately begin to be copied to the " "second drive. The mirror will operate in degraded status until the copy is " "complete." msgstr "" "Данные с исходного диска начнут немедленно копироваться на второй диск. " "Зеркало будет работать в деградировавшем состоянии до завершения копирования." #. type: Title === #: documentation/content/en/books/handbook/geom/_index.adoc:912 #, no-wrap msgid "Inserting New Drives into the Array" msgstr "Добавление новых дисков к массиву" #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:917 msgid "" "Drives can be inserted into an array as replacements for drives that have " "failed or are missing. If there are no failed or missing drives, the new " "drive becomes a spare. For example, inserting a new drive into a working " "two-drive mirror results in a two-drive mirror with one spare drive, not a " "three-drive mirror." msgstr "" "Диски могут быть добавлены в массив в качестве замены отказавших или " "отсутствующих дисков. Если нет отказавших или отсутствующих дисков, новый " "диск становится запасным. Например, добавление нового диска в рабочее " "зеркало из двух дисков приведет к зеркалу из двух дисков с одним запасным, а " "не к зеркалу из трёх дисков." #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:920 msgid "" "In the example mirror array, data immediately begins to be copied to the " "newly-inserted drive. Any existing information on the new drive will be " "overwritten." msgstr "" "В примере зеркального массива данные сразу же начинают копироваться на " "только что вставленный диск. Любая существующая информация на новом диске " "будет перезаписана." #. type: delimited block . 4 #: documentation/content/en/books/handbook/geom/_index.adoc:928 #, no-wrap msgid "" "# graid insert raid/r0 ada1\n" "GEOM_RAID: Intel-a29ea104: Disk ada1 state changed from NONE to ACTIVE.\n" "GEOM_RAID: Intel-a29ea104: Subdisk gm0:1-ada1 state changed from NONE to NEW.\n" "GEOM_RAID: Intel-a29ea104: Subdisk gm0:1-ada1 state changed from NEW to REBUILD.\n" "GEOM_RAID: Intel-a29ea104: Subdisk gm0:1-ada1 rebuild start at 0.\n" msgstr "" "# graid insert raid/r0 ada1\n" "GEOM_RAID: Intel-a29ea104: Disk ada1 state changed from NONE to ACTIVE.\n" "GEOM_RAID: Intel-a29ea104: Subdisk gm0:1-ada1 state changed from NONE to NEW.\n" "GEOM_RAID: Intel-a29ea104: Subdisk gm0:1-ada1 state changed from NEW to REBUILD.\n" "GEOM_RAID: Intel-a29ea104: Subdisk gm0:1-ada1 rebuild start at 0.\n" #. type: Title === #: documentation/content/en/books/handbook/geom/_index.adoc:931 #, no-wrap msgid "Removing Drives from the Array" msgstr "Удаление дисков из массива" #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:934 msgid "" "Individual drives can be permanently removed from a from an array and their " "metadata erased:" msgstr "" "Отдельные диски можно навсегда удалить из массива и стереть их метаданные:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/geom/_index.adoc:941 #, no-wrap msgid "" "# graid remove raid/r0 ada1\n" "GEOM_RAID: Intel-a29ea104: Disk ada1 state changed from ACTIVE to OFFLINE.\n" "GEOM_RAID: Intel-a29ea104: Subdisk gm0:1-[unknown] state changed from ACTIVE to NONE.\n" "GEOM_RAID: Intel-a29ea104: Volume gm0 state changed from OPTIMAL to DEGRADED.\n" msgstr "" "# graid remove raid/r0 ada1\n" "GEOM_RAID: Intel-a29ea104: Disk ada1 state changed from ACTIVE to OFFLINE.\n" "GEOM_RAID: Intel-a29ea104: Subdisk gm0:1-[unknown] state changed from ACTIVE to NONE.\n" "GEOM_RAID: Intel-a29ea104: Volume gm0 state changed from OPTIMAL to DEGRADED.\n" #. type: Title === #: documentation/content/en/books/handbook/geom/_index.adoc:944 #, no-wrap msgid "Stopping the Array" msgstr "Остановка массива" #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:948 msgid "" "An array can be stopped without removing metadata from the drives. The " "array will be restarted when the system is booted." msgstr "" "Массив можно остановить без удаления метаданных с дисков. Массив будет " "перезапущен при загрузке системы." #. type: delimited block . 4 #: documentation/content/en/books/handbook/geom/_index.adoc:952 #, no-wrap msgid "# graid stop raid/r0\n" msgstr "# graid stop raid/r0\n" #. type: Title === #: documentation/content/en/books/handbook/geom/_index.adoc:955 #, no-wrap msgid "Checking Array Status" msgstr "Проверка состояния массива" #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:959 msgid "" "Array status can be checked at any time. After a drive was added to the " "mirror in the example above, data is being copied from the original drive to " "the new drive:" msgstr "" "Статус массива можно проверить в любое время. После добавления диска в " "зеркало в приведённом выше примере данные копируются с исходного диска на " "новый:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/geom/_index.adoc:966 #, no-wrap msgid "" "# graid status\n" " Name Status Components\n" "raid/r0 DEGRADED ada0 (ACTIVE (ACTIVE))\n" " ada1 (ACTIVE (REBUILD 28%))\n" msgstr "" "# graid status\n" " Name Status Components\n" "raid/r0 DEGRADED ada0 (ACTIVE (ACTIVE))\n" " ada1 (ACTIVE (REBUILD 28%))\n" #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:970 msgid "" "Some types of arrays, like `RAID0` or `CONCAT`, may not be shown in the " "status report if disks have failed. To see these partially-failed arrays, " "add `-ga`:" msgstr "" "Некоторые типы массивов, такие как `RAID0` или `CONCAT`, могут не " "отображаться в отчёте о состоянии при выходе дисков из строя. Чтобы увидеть " "эти частично неработоспособные массивы, добавьте `-ga`:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/geom/_index.adoc:976 #, no-wrap msgid "" "# graid status -ga\n" " Name Status Components\n" "Intel-e2d07d9a BROKEN ada6 (ACTIVE (ACTIVE))\n" msgstr "" "# graid status -ga\n" " Name Status Components\n" "Intel-e2d07d9a BROKEN ada6 (ACTIVE (ACTIVE))\n" #. type: Title === #: documentation/content/en/books/handbook/geom/_index.adoc:979 #, no-wrap msgid "Deleting Arrays" msgstr "Удаление массивов" #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:983 msgid "" "Arrays are destroyed by deleting all of the volumes from them. When the " "last volume present is deleted, the array is stopped and metadata is removed " "from the drives:" msgstr "" "Массивы уничтожаются путём удаления всех томов из них. Когда удаляется " "последний оставшийся том, массив останавливается, а метаданные удаляются с " "дисков:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/geom/_index.adoc:987 #: documentation/content/en/books/handbook/geom/_index.adoc:1032 #, no-wrap msgid "# graid delete raid/r0\n" msgstr "# graid delete raid/r0\n" #. type: Title === #: documentation/content/en/books/handbook/geom/_index.adoc:990 #, no-wrap msgid "Deleting Unexpected Arrays" msgstr "Удаление неожиданных массивов" #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:995 msgid "" "Drives may unexpectedly contain man:graid[8] metadata, either from previous " "use or manufacturer testing. man:graid[8] will detect these drives and " "create an array, interfering with access to the individual drive. To remove " "the unwanted metadata:" msgstr "" "Диски могут неожиданно содержать метаданные man:graid[8], оставшиеся от " "предыдущего использования или тестирования производителем. man:graid[8] " "обнаружит эти диски и создаст массив, что помешает доступу к отдельному " "диску. Для удаления нежелательных метаданных:" #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:998 msgid "" "Boot the system. At the boot menu, select `2` for the loader prompt. Enter:" msgstr "" "Загрузите систему. В меню загрузки выберите `2` для перехода в приглашение " "загрузчика. Введите:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/geom/_index.adoc:1003 #, no-wrap msgid "" "OK set kern.geom.raid.enable=0\n" "OK boot\n" msgstr "" "OK set kern.geom.raid.enable=0\n" "OK boot\n" #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:1006 msgid "The system will boot with man:graid[8] disabled." msgstr "Система загрузится с отключенным man:graid[8]." #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:1007 msgid "Back up all data on the affected drive." msgstr "Создайте резервную копию всех данных на затронутом диске." #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:1008 msgid "As a workaround, man:graid[8] array detection can be disabled by adding" msgstr "" "В качестве обходного решения обнаружение массива man:graid[8] можно " "отключить, добавив" #. type: delimited block . 4 #: documentation/content/en/books/handbook/geom/_index.adoc:1012 #, no-wrap msgid "kern.geom.raid.enable=0\n" msgstr "kern.geom.raid.enable=0\n" #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:1015 msgid "to [.filename]#/boot/loader.conf#." msgstr "в файл [.filename]#/boot/loader.conf#." #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:1018 msgid "" "To permanently remove the man:graid[8] metadata from the affected drive, " "boot a FreeBSD installation CD-ROM or memory stick, and select `Shell`. Use " "`status` to find the name of the array, typically `raid/r0`:" msgstr "" "Для постоянного удаления метаданных man:graid[8] с затронутого диска " "загрузитесь с установочного CD-ROM или USB-накопителя FreeBSD и выберите " "`Shell`. Используйте команду `status`, чтобы найти имя массива, обычно это " "`raid/r0`:" #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:1028 msgid "Delete the volume by name:" msgstr "Удалите том по имени:" #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:1036 msgid "" "If there is more than one volume shown, repeat the process for each volume. " "After the last array has been deleted, the volume will be destroyed." msgstr "" "Если отображается более одного тома, повторите процесс для каждого тома. " "После удаления последнего массива том будет уничтожен." #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:1039 msgid "" "Reboot and verify data, restoring from backup if necessary. After the " "metadata has been removed, the `kern.geom.raid.enable=0` entry in [." "filename]#/boot/loader.conf# can also be removed." msgstr "" "Перезагрузите систему и проверьте данные, восстановив их из резервной копии " "при необходимости. После удаления метаданных запись `kern.geom.raid." "enable=0` в файле [.filename]#/boot/loader.conf# также можно удалить." #. type: Title == #: documentation/content/en/books/handbook/geom/_index.adoc:1041 #, no-wrap msgid "GEOM Gate Network" msgstr "Сетевые устройства GEOM Gate" #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:1046 msgid "" "GEOM provides a simple mechanism for providing remote access to devices such " "as disks, CDs, and file systems through the use of the GEOM Gate network " "daemon, ggated. The system with the device runs the server daemon which " "handles requests made by clients using ggatec. The devices should not " "contain any sensitive data as the connection between the client and the " "server is not encrypted." msgstr "" "GEOM предоставляет простой механизм для удаленного доступа к устройствам, " "таким как диски, компакт-диски и файловые системы, с использованием сетевого " "демона GEOM Gate - ggated. Система с устройством запускает серверный демон, " "который обрабатывает запросы от клиентов, использующих ggatec. Устройства не " "должны содержать конфиденциальных данных, так как соединение между клиентом " "и сервером не шифруется." #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:1050 msgid "" "Similar to NFS, which is discussed in crossref:network-servers[network-nfs," "\"Network File System (NFS)\"], ggated is configured using an exports file. " "This file specifies which systems are permitted to access the exported " "resources and what level of access they are offered. For example, to give " "the client `192.168.1.5` read and write access to the fourth slice on the " "first SCSI disk, create [.filename]#/etc/gg.exports# with this line:" msgstr "" "Аналогично NFS, который рассматривается в crossref:network-servers[network-" "nfs,\"Network File System (NFS)\"], ggated настраивается с использованием " "файла экспорта. Этот файл определяет, каким системам разрешён доступ к " "экспортируемым ресурсам и какой уровень доступа им предоставляется. " "Например, чтобы предоставить клиенту `192.168.1.5` права на чтение и запись " "для четвёртого раздела первого SCSI-диска, создайте файл [.filename]#/etc/gg." "exports# со следующей строкой:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/geom/_index.adoc:1054 #, no-wrap msgid "192.168.1.5 RW /dev/da0s4d\n" msgstr "192.168.1.5 RW /dev/da0s4d\n" #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:1058 msgid "" "Before exporting the device, ensure it is not currently mounted. Then, " "start ggated:" msgstr "" "Перед экспортом устройства убедитесь, что оно не смонтировано. Затем " "запустите `ggated`:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/geom/_index.adoc:1062 #, no-wrap msgid "# ggated\n" msgstr "# ggated\n" #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:1066 msgid "" "Several options are available for specifying an alternate listening port or " "changing the default location of the exports file. Refer to man:ggated[8] " "for details." msgstr "" "Для указания альтернативного порта прослушивания или изменения расположения " "файла экспорта по умолчанию доступно несколько вариантов. Подробности см. в " "man:ggated[8]." #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:1071 msgid "" "To access the exported device on the client machine, first use `ggatec` to " "specify the IP address of the server and the device name of the exported " "device. If successful, this command will display a `ggate` device name to " "mount. Mount that specified device name on a free mount point. This " "example connects to the [.filename]#/dev/da0s4d# partition on `192.168.1.1`, " "then mounts [.filename]#/dev/ggate0# on [.filename]#/mnt#:" msgstr "" "Для доступа к экспортированному устройству на клиентской машине сначала " "используйте `ggatec`, указав IP-адрес сервера и имя экспортированного " "устройства. В случае успеха эта команда выведет имя устройства `ggate`, " "которое нужно смонтировать. Смонтируйте указанное имя устройства на " "свободную точку монтирования. В этом примере выполняется подключение к " "разделу [.filename]#/dev/da0s4d# на `192.168.1.1`, затем монтируется [." "filename]#/dev/ggate0# в [.filename]#/mnt#:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/geom/_index.adoc:1077 #, no-wrap msgid "" "# ggatec create -o rw 192.168.1.1 /dev/da0s4d\n" "ggate0\n" "# mount /dev/ggate0 /mnt\n" msgstr "" "# ggatec create -o rw 192.168.1.1 /dev/da0s4d\n" "ggate0\n" "# mount /dev/ggate0 /mnt\n" #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:1081 msgid "" "The device on the server may now be accessed through [.filename]#/mnt# on " "the client. For more details about `ggatec` and a few usage examples, refer " "to man:ggatec[8]." msgstr "" "Устройство на сервере теперь может быть доступно через [.filename]#/mnt# на " "клиенте. Для получения дополнительной информации о `ggatec` и нескольких " "примеров использования обратитесь к man:ggatec[8]." #. type: delimited block = 4 #: documentation/content/en/books/handbook/geom/_index.adoc:1086 msgid "" "The mount will fail if the device is currently mounted on either the server " "or any other client on the network. If simultaneous access is needed to " "network resources, use NFS instead." msgstr "" "Монтирование завершится ошибкой, если устройство в данный момент " "смонтировано на сервере или любом другом клиенте в сети. Если требуется " "одновременный доступ к сетевым ресурсам, используйте NFS." #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:1089 msgid "" "When the device is no longer needed, unmount it with `umount` so that the " "resource is available to other clients." msgstr "" "Когда устройство больше не требуется, размонтируйте его с помощью `umount`, " "чтобы ресурс стал доступен другим клиентам." #. type: Title == #: documentation/content/en/books/handbook/geom/_index.adoc:1091 #, no-wrap msgid "Labeling Disk Devices" msgstr "Маркировка дисковых устройств" #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:1097 msgid "" "During system initialization, the FreeBSD kernel creates device nodes as " "devices are found. This method of probing for devices raises some issues. " "For instance, what if a new disk device is added via USB? It is likely that " "a flash device may be handed the device name of [.filename]#da0# and the " "original [.filename]#da0# shifted to [.filename]#da1#. This will cause " "issues mounting file systems if they are listed in [.filename]#/etc/fstab# " "which may also prevent the system from booting." msgstr "" "Во время инициализации системы ядро FreeBSD создает узлы устройств по мере " "их обнаружения. Такой метод поиска устройств вызывает некоторые проблемы. " "Например, что если новое дисковое устройство будет добавлено через USB? " "Вполне вероятно, что флеш-накопитель может получить имя устройства [." "filename]#da0#, а исходное устройство [.filename]#da0# сместится на [." "filename]#da1#. Это вызовет проблемы с монтированием файловых систем, если " "они указаны в [.filename]#/etc/fstab#, что также может помешать загрузке " "системы." #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:1102 msgid "" "One solution is to chain SCSI devices in order so a new device added to the " "SCSI card will be issued unused device numbers. But what about USB devices " "which may replace the primary SCSI disk? This happens because USB devices " "are usually probed before the SCSI card. One solution is to only insert " "these devices after the system has been booted. Another method is to use " "only a single ATA drive and never list the SCSI devices in [.filename]#/etc/" "fstab#." msgstr "" "Одно из решений — последовательное подключение SCSI-устройств, чтобы новое " "устройство, добавленное к SCSI-карте, получало неиспользуемые номера. Но что " "делать с USB-устройствами, которые могут заменить основной SCSI-диск? Это " "происходит потому, что USB-устройства обычно определяются раньше SCSI-карты. " "Один из вариантов — подключать такие устройства только после загрузки " "системы. Другой способ — использовать только один ATA-диск и никогда не " "указывать SCSI-устройства в [.filename]#/etc/fstab#." #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:1106 msgid "" "A better solution is to use `glabel` to label the disk devices and use the " "labels in [.filename]#/etc/fstab#. Since `glabel` stores the label in the " "last sector of a given provider, the label will remain persistent across " "reboots. By using this label as a device, the file-system may always be " "mounted regardless of what device node it is accessed through." msgstr "" "Лучшим решением будет использование `glabel` для маркировки дисковых " "устройств и применение меток в [.filename]#/etc/fstab#. Поскольку `glabel` " "сохраняет метку в последнем секторе заданного провайдера, метка останется " "неизменной после перезагрузки. Используя эту метку в качестве устройства, " "файловую систему можно всегда монтировать, независимо от того, через какой " "узел устройства к ней обращаются." #. type: delimited block = 4 #: documentation/content/en/books/handbook/geom/_index.adoc:1111 msgid "" "`glabel` can create both transient and permanent labels. Only permanent " "labels are consistent across reboots. Refer to man:glabel[8] for more " "information on the differences between labels." msgstr "" "`glabel` может создавать как временные, так и постоянные метки. Только " "постоянные метки сохраняются после перезагрузки. Дополнительную информацию о " "различиях между метками можно найти в man:glabel[8]." #. type: Title === #: documentation/content/en/books/handbook/geom/_index.adoc:1113 #, no-wrap msgid "Label Types and Examples" msgstr "Типы меток и примеры" #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:1121 msgid "" "Permanent labels can be a generic or a file system label. Permanent file " "system labels can be created with man:tunefs[8] or man:newfs[8]. These " "types of labels are created in a sub-directory of [.filename]#/dev#, and " "will be named according to the file system type. For example, UFS2 file " "system labels will be created in [.filename]#/dev/ufs#. Generic permanent " "labels can be created with `glabel label`. These are not file system " "specific and will be created in [.filename]#/dev/label#." msgstr "" "Постоянные метки могут быть общими или метками файловой системы. Постоянные " "метки файловой системы можно создать с помощью man:tunefs[8] или man:" "newfs[8]. Такие метки создаются в подкаталоге [.filename]#/dev# и именуются " "в соответствии с типом файловой системы. Например, метки файловой системы " "UFS2 будут созданы в [.filename]#/dev/ufs#. Общие постоянные метки можно " "создать с помощью `glabel label`. Они не привязаны к конкретной файловой " "системе и будут размещены в [.filename]#/dev/label#." #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:1125 msgid "" "Temporary labels are destroyed at the next reboot. These labels are created " "in [.filename]#/dev/label# and are suited to experimentation. A temporary " "label can be created using `glabel create`." msgstr "" "Временные метки удаляются при следующей перезагрузке. Эти метки создаются в " "[.filename]#/dev/label# и подходят для экспериментов. Временную метку можно " "создать с помощью `glabel create`." #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:1127 msgid "" "To create a permanent label for a UFS2 file system without destroying any " "data, issue the following command:" msgstr "" "Чтобы создать постоянную метку для файловой системы UFS2 без уничтожения " "данных, выполните следующую команду:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/geom/_index.adoc:1131 #, no-wrap msgid "# tunefs -L home /dev/da3\n" msgstr "# tunefs -L home /dev/da3\n" #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:1134 msgid "" "A label should now exist in [.filename]#/dev/ufs# which may be added to [." "filename]#/etc/fstab#:" msgstr "" "Теперь в [.filename]#/dev/ufs# должна существовать метка, которую можно " "добавить в [.filename]#/etc/fstab#:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/geom/_index.adoc:1138 #, no-wrap msgid "/dev/ufs/home\t\t/home ufs rw 2 2\n" msgstr "/dev/ufs/home\t\t/home ufs rw 2 2\n" #. type: delimited block = 4 #: documentation/content/en/books/handbook/geom/_index.adoc:1143 msgid "The file system must not be mounted while attempting to run `tunefs`." msgstr "" "Файловая система не должна быть смонтирована при попытке запуска `tunefs`." #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:1146 msgid "Now the file system may be mounted:" msgstr "Теперь файловую систему можно смонтировать:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/geom/_index.adoc:1150 #, no-wrap msgid "# mount /home\n" msgstr "# mount /home\n" #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:1153 msgid "" "From this point on, so long as the [.filename]#geom_label.ko# kernel module " "is loaded at boot with [.filename]#/boot/loader.conf# or the `GEOM_LABEL` " "kernel option is present, the device node may change without any ill effect " "on the system." msgstr "" "Начиная с этого момента, при условии, что модуль ядра [.filename]#geom_label." "ko# загружается при загрузке через [.filename]#/boot/loader.conf# или " "присутствует опция ядра `GEOM_LABEL`, изменение узла устройства не окажет " "негативного влияния на систему." #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:1156 msgid "" "File systems may also be created with a default label by using the `-L` flag " "with `newfs`. Refer to man:newfs[8] for more information." msgstr "" "Файловые системы также могут быть созданы с меткой по умолчанию с " "использованием флага `-L` в `newfs`. Подробнее см. в man:newfs[8]." #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:1158 msgid "The following command can be used to destroy the label:" msgstr "Следующая команда может быть использована для удаления метки:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/geom/_index.adoc:1162 #, no-wrap msgid "# glabel destroy home\n" msgstr "# glabel destroy home\n" #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:1165 msgid "The following example shows how to label the partitions of a boot disk." msgstr "" "Следующий пример показывает, как назначить метки разделам загрузочного диска." #. type: Block title #: documentation/content/en/books/handbook/geom/_index.adoc:1166 #, no-wrap msgid "Labeling Partitions on the Boot Disk" msgstr "Разметка разделов на загрузочном диске" #. type: delimited block = 4 #: documentation/content/en/books/handbook/geom/_index.adoc:1172 msgid "" "By permanently labeling the partitions on the boot disk, the system should " "be able to continue to boot normally, even if the disk is moved to another " "controller or transferred to a different system. For this example, it is " "assumed that a single ATA disk is used, which is currently recognized by the " "system as [.filename]#ad0#. It is also assumed that the standard FreeBSD " "partition scheme is used, with [.filename]#/#, [.filename]#/var#, [." "filename]#/usr# and [.filename]#/tmp#, as well as a swap partition." msgstr "" "Постоянная маркировка разделов на загрузочном диске позволяет системе " "продолжать нормальную загрузку, даже если диск будет перемещен на другой " "контроллер или перенесён в другую систему. В этом примере предполагается, " "что используется один ATA-диск, который система в настоящее время распознает " "как [.filename]#ad0#. Также предполагается, что используется стандартная " "схема разделов FreeBSD с [.filename]#/#, [.filename]#/var#, [.filename]#/usr#" ", [.filename]#/tmp#, а также разделом подкачки." #. type: delimited block = 4 #: documentation/content/en/books/handbook/geom/_index.adoc:1175 msgid "" "Reboot the system, and at the man:loader[8] prompt, press kbd:[4] to boot " "into single user mode. Then enter the following commands:" msgstr "" "Перезагрузите систему, и на запросе man:loader[8] нажмите kbd:[4], чтобы " "загрузиться в однопользовательском режиме. Затем введите следующие команды:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/geom/_index.adoc:1189 #, no-wrap msgid "" "# glabel label rootfs /dev/ad0s1a\n" "GEOM_LABEL: Label for provider /dev/ad0s1a is label/rootfs\n" "# glabel label var /dev/ad0s1d\n" "GEOM_LABEL: Label for provider /dev/ad0s1d is label/var\n" "# glabel label usr /dev/ad0s1f\n" "GEOM_LABEL: Label for provider /dev/ad0s1f is label/usr\n" "# glabel label tmp /dev/ad0s1e\n" "GEOM_LABEL: Label for provider /dev/ad0s1e is label/tmp\n" "# glabel label swap /dev/ad0s1b\n" "GEOM_LABEL: Label for provider /dev/ad0s1b is label/swap\n" "# exit\n" msgstr "" "# glabel label rootfs /dev/ad0s1a\n" "GEOM_LABEL: Label for provider /dev/ad0s1a is label/rootfs\n" "# glabel label var /dev/ad0s1d\n" "GEOM_LABEL: Label for provider /dev/ad0s1d is label/var\n" "# glabel label usr /dev/ad0s1f\n" "GEOM_LABEL: Label for provider /dev/ad0s1f is label/usr\n" "# glabel label tmp /dev/ad0s1e\n" "GEOM_LABEL: Label for provider /dev/ad0s1e is label/tmp\n" "# glabel label swap /dev/ad0s1b\n" "GEOM_LABEL: Label for provider /dev/ad0s1b is label/swap\n" "# exit\n" #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:1194 msgid "" "The system will continue with multi-user boot. After the boot completes, " "edit [.filename]#/etc/fstab# and replace the conventional device names, with " "their respective labels. The final [.filename]#/etc/fstab# will look like " "this:" msgstr "" "Система продолжит загрузку в многопользовательском режиме. После завершения " "загрузки отредактируйте файл [.filename]#/etc/fstab# и замените стандартные " "имена устройств на соответствующие метки. Итоговый файл [.filename]#/etc/" "fstab# будет выглядеть следующим образом:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/geom/_index.adoc:1203 #, no-wrap msgid "" "# Device Mountpoint FStype Options Dump Pass#\n" "/dev/label/swap none swap sw 0 0\n" "/dev/label/rootfs / ufs rw 1 1\n" "/dev/label/tmp /tmp ufs rw 2 2\n" "/dev/label/usr /usr ufs rw 2 2\n" "/dev/label/var /var ufs rw 2 2\n" msgstr "" "# Device Mountpoint FStype Options Dump Pass#\n" "/dev/label/swap none swap sw 0 0\n" "/dev/label/rootfs / ufs rw 1 1\n" "/dev/label/tmp /tmp ufs rw 2 2\n" "/dev/label/usr /usr ufs rw 2 2\n" "/dev/label/var /var ufs rw 2 2\n" #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:1207 msgid "" "The system can now be rebooted. If everything went well, it will come up " "normally and `mount` will show:" msgstr "" "Систему теперь можно перезагрузить. Если всё прошло успешно, она загрузится " "в обычном режиме, и команда `mount` покажет:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/geom/_index.adoc:1216 #, no-wrap msgid "" "# mount\n" "/dev/label/rootfs on / (ufs, local)\n" "devfs on /dev (devfs, local)\n" "/dev/label/tmp on /tmp (ufs, local, soft-updates)\n" "/dev/label/usr on /usr (ufs, local, soft-updates)\n" "/dev/label/var on /var (ufs, local, soft-updates)\n" msgstr "" "# mount\n" "/dev/label/rootfs on / (ufs, local)\n" "devfs on /dev (devfs, local)\n" "/dev/label/tmp on /tmp (ufs, local, soft-updates)\n" "/dev/label/usr on /usr (ufs, local, soft-updates)\n" "/dev/label/var on /var (ufs, local, soft-updates)\n" #. type: delimited block = 4 #: documentation/content/en/books/handbook/geom/_index.adoc:1224 msgid "" "The man:glabel[8] class supports a label type for UFS file systems, based on " "the unique file system id, `ufsid`. These labels may be found in [." "filename]#/dev/ufsid# and are created automatically during system startup. " "It is possible to use `ufsid` labels to mount partitions using [.filename]#/" "etc/fstab#. Use `glabel status` to receive a list of file systems and their " "corresponding `ufsid` labels:" msgstr "" "Класс man:glabel[8] поддерживает тип метки для файловых систем UFS, " "основанный на уникальном идентификаторе файловой системы, `ufsid`. Эти метки " "могут быть найдены в [.filename]#/dev/ufsid# и создаются автоматически во " "время запуска системы. Можно использовать метки `ufsid` для монтирования " "разделов с помощью [.filename]#/etc/fstab#. Для получения списка файловых " "систем и соответствующих им меток `ufsid` используйте команду `glabel " "status`:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/geom/_index.adoc:1231 #, no-wrap msgid "" "% glabel status\n" " Name Status Components\n" "ufsid/486b6fc38d330916 N/A ad4s1d\n" "ufsid/486b6fc16926168e N/A ad4s1f\n" msgstr "" "% glabel status\n" " Name Status Components\n" "ufsid/486b6fc38d330916 N/A ad4s1d\n" "ufsid/486b6fc16926168e N/A ad4s1f\n" #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:1235 msgid "" "In the above example, [.filename]#ad4s1d# represents [.filename]#/var#, " "while [.filename]#ad4s1f# represents [.filename]#/usr#. Using the `ufsid` " "values shown, these partitions may now be mounted with the following entries " "in [.filename]#/etc/fstab#:" msgstr "" "В приведённом выше примере [.filename]#ad4s1d# соответствует [.filename]#/" "var#, а [.filename]#ad4s1f# — [.filename]#/usr#. Используя указанные " "значения `ufsid`, эти разделы можно смонтировать, добавив следующие строки в " "[.filename]#/etc/fstab#:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/geom/_index.adoc:1240 #, no-wrap msgid "" "/dev/ufsid/486b6fc38d330916 /var ufs rw 2 2\n" "/dev/ufsid/486b6fc16926168e /usr ufs rw 2 2\n" msgstr "" "/dev/ufsid/486b6fc38d330916 /var ufs rw 2 2\n" "/dev/ufsid/486b6fc16926168e /usr ufs rw 2 2\n" #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:1243 msgid "" "Any partitions with `ufsid` labels can be mounted in this way, eliminating " "the need to manually create permanent labels, while still enjoying the " "benefits of device name independent mounting." msgstr "" "Любые разделы с метками `ufsid` могут быть смонтированы таким образом, что " "устраняет необходимость вручную создавать постоянные метки, сохраняя при " "этом преимущества монтирования, независимого от имён устройств." #. type: Title == #: documentation/content/en/books/handbook/geom/_index.adoc:1245 #, no-wrap msgid "UFS Journaling Through GEOM" msgstr "Журналирование UFS через GEOM" #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:1251 msgid "" "Support for journals on UFS file systems is available on FreeBSD. The " "implementation is provided through the GEOM subsystem and is configured " "using `gjournal`. Unlike other file system journaling implementations, the " "`gjournal` method is block based and not implemented as part of the file " "system. It is a GEOM extension." msgstr "" "Поддержка журналирования для файловых систем UFS доступна в FreeBSD. " "Реализация предоставляется через подсистему GEOM и настраивается с помощью " "`gjournal`. В отличие от других реализаций журналирования файловых систем, " "метод `gjournal` работает на уровне блоков и не является частью файловой " "системы. Это расширение GEOM." #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:1254 msgid "" "Journaling stores a log of file system transactions, such as changes that " "make up a complete disk write operation, before meta-data and file writes " "are committed to the disk. This transaction log can later be replayed to " "redo file system transactions, preventing file system inconsistencies." msgstr "" "В журналировании хранится журнал транзакций файловой системы, таких как " "изменения, составляющие полную операцию записи на диск, до того как " "метаданные и записи файлов будут записаны на диск. Этот журнал транзакций " "может быть позднее воспроизведен для повторного выполнения операций файловой " "системы, предотвращая её рассогласование." #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:1259 msgid "" "This method provides another mechanism to protect against data loss and " "inconsistencies of the file system. Unlike Soft Updates, which tracks and " "enforces meta-data updates, and snapshots, which create an image of the file " "system, a log is stored in disk space specifically for this task. For " "better performance, the journal may be stored on another disk. In this " "configuration, the journal provider or storage device should be listed after " "the device to enable journaling on." msgstr "" "Этот метод предоставляет ещё один механизм защиты от потери данных и " "нарушения целостности файловой системы. В отличие от мягких обновлений, " "которые отслеживают и контролируют обновления метаданных, и снимков, " "создающих образ файловой системы, журнал хранится в отдельном месте на " "диске, специально выделенном для этой задачи. Для повышения " "производительности журнал может храниться на другом диске. В такой " "конфигурации провайдер журнала или устройство хранения должны быть указаны " "после устройства, для которого включается ведение журнала." #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:1262 msgid "" "The [.filename]#GENERIC# kernel provides support for `gjournal`. To " "automatically load the [.filename]#geom_journal.ko# kernel module at boot " "time, add the following line to [.filename]#/boot/loader.conf#:" msgstr "" "Ядро [.filename]#GENERIC# предоставляет поддержку `gjournal`. Чтобы " "автоматически загружать модуль ядра [.filename]#geom_journal.ko# при " "загрузке, добавьте следующую строку в [.filename]#/boot/loader.conf#:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/geom/_index.adoc:1266 #, no-wrap msgid "geom_journal_load=\"YES\"\n" msgstr "geom_journal_load=\"YES\"\n" #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:1269 msgid "" "If a custom kernel is used, ensure the following line is in the kernel " "configuration file:" msgstr "" "Если используется собственный вариант ядра, убедитесь, что следующая строка " "присутствует в конфигурационном файле ядра:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/geom/_index.adoc:1273 #, no-wrap msgid "options\tGEOM_JOURNAL\n" msgstr "options\tGEOM_JOURNAL\n" #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:1277 msgid "" "Once the module is loaded, a journal can be created on a new file system " "using the following steps. In this example, [.filename]#da4# is a new SCSI " "disk:" msgstr "" "После загрузки модуля журнал можно создать на новой файловой системе, " "выполнив следующие шаги. В этом примере [.filename]#da4# — это новый SCSI-" "диск:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/geom/_index.adoc:1282 #, no-wrap msgid "" "# gjournal load\n" "# gjournal label /dev/da4\n" msgstr "" "# gjournal load\n" "# gjournal label /dev/da4\n" #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:1285 msgid "" "This will load the module and create a [.filename]#/dev/da4.journal# device " "node on [.filename]#/dev/da4#." msgstr "" "Это загрузит модуль и создаст узел устройства [.filename]#/dev/da4.journal# " "на [.filename]#/dev/da4#." #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:1287 msgid "" "A UFS file system may now be created on the journaled device, then mounted " "on an existing mount point:" msgstr "" "Файловая система UFS теперь может быть создана на журналируемом устройстве, " "а затем смонтирована в существующей точке монтирования:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/geom/_index.adoc:1292 #, no-wrap msgid "" "# newfs -O 2 -J /dev/da4.journal\n" "# mount /dev/da4.journal /mnt\n" msgstr "" "# newfs -O 2 -J /dev/da4.journal\n" "# mount /dev/da4.journal /mnt\n" #. type: delimited block = 4 #: documentation/content/en/books/handbook/geom/_index.adoc:1298 msgid "" "In the case of several slices, a journal will be created for each individual " "slice. For instance, if [.filename]#ad4s1# and [.filename]#ad4s2# are both " "slices, then `gjournal` will create [.filename]#ad4s1.journal# and [." "filename]#ad4s2.journal#." msgstr "" "В случае нескольких разделов журнал будет создан для каждого отдельного " "раздела. Например, если [.filename]#ad4s1# и [.filename]#ad4s2# являются " "разделами, то `gjournal` создаст [.filename]#ad4s1.journal# и [." "filename]#ad4s2.journal#." #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:1304 msgid "" "Journaling may also be enabled on current file systems by using `tunefs`. " "However, _always_ make a backup before attempting to alter an existing file " "system. In most cases, `gjournal` will fail if it is unable to create the " "journal, but this does not protect against data loss incurred as a result of " "misusing `tunefs`. Refer to man:gjournal[8] and man:tunefs[8] for more " "information about these commands." msgstr "" "Журналирование также можно включить на существующих файловых системах с " "помощью `tunefs`. Однако _всегда_ делайте резервную копию перед изменением " "существующей файловой системы. В большинстве случаев `gjournal` завершится с " "ошибкой, если не сможет создать журнал, но это не защищает от потери данных " "из-за неправильного использования `tunefs`. Дополнительную информацию об " "этих командах можно найти в man:gjournal[8] и man:tunefs[8]." #. type: Plain text #: documentation/content/en/books/handbook/geom/_index.adoc:1306 msgid "" "It is possible to journal the boot disk of a FreeBSD system. Refer to the " "article extref:{gjournal-desktop}[Implementing UFS Journaling on a Desktop " "PC] for detailed instructions." msgstr "" "Возможно журналирование загрузочного диска в системе FreeBSD. Подробные " "инструкции приведены в статье extref:{gjournal-desktop}[Реализация " "журналирования UFS на настольном ПК]."