o Start each sentence on a new line. No content changes.

Suggested by:	jhb
MFC after:	1 week
This commit is contained in:
Maxim Konovalov 2011-01-13 06:18:00 +00:00
parent c521792b98
commit 8f3d01269c
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=217343

View File

@ -422,8 +422,9 @@ about its use.
.It Cm restore .It Cm restore
Restore the partition table from backup previously created by Restore the partition table from backup previously created by
.Cm backup .Cm backup
action and given from standard input. Only partition table action and given from standard input.
may be restored. This action does not affect content of partitions. Only partition table may be restored.
This action does not affect content of partitions.
This mean that you should copy your data from backup after restoring This mean that you should copy your data from backup after restoring
partition table and write bootcode again if it is needed. partition table and write bootcode again if it is needed.
.Pp .Pp
@ -703,20 +704,23 @@ action.
.Sh RECOVERING .Sh RECOVERING
The GEOM class PART supports recovering of partition tables only for GPT. The GEOM class PART supports recovering of partition tables only for GPT.
The GUID partition table has a primary and secondary (backup) copy of The GUID partition table has a primary and secondary (backup) copy of
metadata for redundance. They are stored in the begining and in the end metadata for redundance.
of device respectively. Therefore it is acceptable to have some corruptions They are stored in the begining and in the end of device respectively.
in the metadata that are not fatal to work with GPT. When kernel detects Therefore it is acceptable to have some corruptions in the metadata that
corrupt metadata it marks this table as corrupt and reports about corruption. are not fatal to work with GPT.
When kernel detects corrupt metadata it marks this table as corrupt and
reports about corruption.
Any changes in corrupt table are prohibited except Any changes in corrupt table are prohibited except
.Cm destroy .Cm destroy
and and
.Cm recover . .Cm recover .
.Pp .Pp
In case when only first sector is corrupt kernel can not detect GPT even In case when only first sector is corrupt kernel can not detect GPT even
if partition table is not corrupt. You can write protective MBR with if partition table is not corrupt.
You can write protective MBR with
.Xr dd 1 .Xr dd 1
command to restore ability of GPT detection. The copy of protective MBR is command to restore ability of GPT detection.
usually located in the The copy of protective MBR is usually located in the
.Pa /boot/pmbr .Pa /boot/pmbr
file. file.
.Pp .Pp
@ -743,25 +747,27 @@ and
will report about corrupt table. will report about corrupt table.
.Pp .Pp
In case when the size of device has changed (e.g. volume expansion) the In case when the size of device has changed (e.g. volume expansion) the
secondary GPT header will become located not in the last sector. This is secondary GPT header will become located not in the last sector.
not a metadata corruption, but it is dangerous because any corruption of This is not a metadata corruption, but it is dangerous because any
the primary GPT will lead to lost of partition table. Kernel reports about corruption of the primary GPT will lead to lost of partition table.
this problem with message: Kernel reports about this problem with message:
.Bd -literal -offset indent .Bd -literal -offset indent
GEOM: provider: the secondary GPT header is not in the last LBA. GEOM: provider: the secondary GPT header is not in the last LBA.
.Ed .Ed
.Pp .Pp
A corrupt table can be recovered with A corrupt table can be recovered with
.Cm gpart recover .Cm gpart recover
command. This command does reconstruction of corrupt metadata using command.
known valid metadata. Also it can relocate secondary GPT to the end of This command does reconstruction of corrupt metadata using
device. known valid metadata.
Also it can relocate secondary GPT to the end of device.
.Pp .Pp
.Pa NOTE : .Pa NOTE :
The GEOM class PART can detect the same partition table on different GEOM The GEOM class PART can detect the same partition table on different GEOM
providers and some of them will be marked as corrupt. Be careful when choosing providers and some of them will be marked as corrupt.
a provider for recovering. If you choose incorrectly you can destroy the Be careful when choosing a provider for recovering.
metadata of another GEOM class, e.g. GEOM MIRROR or GEOM LABEL. If you choose incorrectly you can destroy the metadata of another GEOM class,
e.g. GEOM MIRROR or GEOM LABEL.
.Sh EXIT STATUS .Sh EXIT STATUS
Exit status is 0 on success, and 1 if the command fails. Exit status is 0 on success, and 1 if the command fails.
.Sh EXAMPLES .Sh EXAMPLES