Go to main content

手册页部分 8:系统管理命令

退出打印视图

更新时间: 2022年7月27日 星期三
 
 

prtvtoc(8)

名称

prtvtoc - 报告有关磁盘几何参数和分区的信息

用法概要

prtvtoc [-fhs] [-t vfstab] [-m mnttab] device

描述

The prtvtoc command allows the contents of the disk label to be viewed.

device 名称可以是以 /dev/rdsk/c?t?d?s2 形式显示的原始设备的文件名,也可以是以 /dev/dsk/c?t?d?s2 形式显示的块设备的文件名。The command must be run by a user with read access to the given device file, which is normally limited to the root user.

选项

支持以下选项:

–f

报告磁盘空闲空间,包括空闲空间的起始块地址、块数和未使用的分区。

–h

在常规输出中忽略标题。

–m mnttab

使用 mnttab 作为挂载的文件系统的列表,而不使用 /etc/mnttab

–s

在常规输出中忽略除列标题之外的所有标题。

–t vfstab

使用 vfstab 作为文件系统缺省值的列表,而不使用 /etc/vfstab

示例

示例 1 使用 prtvtoc 命令

The following example uses the prtvtoc command on a 558.91-gigabyte hard disk:

example# prtvtoc /dev/rdsk/c0t5000CCA0438594D4d0s2
* /dev/rdsk/c0t5000CCA0438594D4d0s2 partition map
*
* Dimensions:
*     512 bytes/sector
*     668 sectors/track
*      27 tracks/cylinder
*   18036 sectors/cylinder
*   64988 cylinders
*   64986 accessible cylinders
*
* Label:
*   SMI/VTOC
*
* Flags:
*   1: unmountable
*  10: read-only
*
*                          First     Sector    Last
* Partition  Tag  Flags    Sector     Count    Sector  Mount Directory
       0      2    00          0    270540    270539
       1      3    01     270540    270540    541079
       2      5    01          0 1172087496 1172087495
       6      4    00     541080 1171546416 1172087495
example#

上面 Tag 列中的数据表示分区类型,如下所示:

名称
Number
UNASSIGNED
0x00
BOOT
0x01
ROOT
0x02
SWAP
0x03
USR
0x04
BACKUP
0x05
STAND
0x06
VAR
0x07
HOME
0x08
ALTSCTR
0x09
CACHE
0x0a
RESERVED
0x0b
SYSTEM
0x0c
BOOT
0x18

上面 Flags 列中的数据表示分区是如何挂载的,如下所示:

名称
Number
MOUNTABLE, READ AND WRITE
0x00
NOT MOUNTABLE
0x01
MOUNTABLE, READ ONLY
0x10
示例 2 使用 prtvtoc 命令和 –f 选项

The following example uses the prtvtoc command with the –f option on a 558.91-gigabyte hard disk:

example# prtvtoc –f /dev/rdsk/c0t5000CCA056443D34d0
FREE_START=34 FREE_SIZE=222 FREE_COUNT=1 FREE_PART=134567
示例 3 在超过 1 TB 的磁盘上使用 prtvtoc 命令

以下示例在一个超过 1 TB 的磁盘上使用 prtvtoc 命令:

example# prtvtoc /dev/rdsk/c0t600144F00010E0352FB45F06DC2A0001d0
* /dev/rdsk/c0t600144F00010E0352FB45F06DC2A0001d0 partition map
*
* Dimensions:
*     512 bytes/sector
* 3221225472 sectors
* 3221225405 accessible sectors
*
* Label:
*   EFI/GPT
*
* Flags:
*   1: unmountable
*  10: read-only
*
* Unallocated space:
*       First     Sector    Last
*       Sector     Count    Sector
*          34        14        47
*   3221209040        15 3221209054
*
*                          First     Sector    Last
* Partition  Tag  Flags    Sector     Count    Sector  Mount Directory
       0      4    00         48 3221208992 3221209039
       8     11    00  3221209055     16384 3221225438

属性

有关下列属性的说明,请参见 attributes(7)

属性类型
属性值
可用性
system/core-os

另请参见

attributes(7), devinfo(8), fmthard(8), format(8), mount(8)

警告

mount 命令不检查 "not mountable"(不可挂载)位。