Copyright 1989 AT&T All Rights Reserved. Copyright (c) 2002, Sun Microsystems, Inc. All Rights Reserved
The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
prtvtoc [-fhs] [-t vfstab] [-m mnttab] device
The prtvtoc command allows the contents of the label to be viewed. The command can be used only by the super-user.
The device name can be the file name of a raw device in the form of /dev/rdsk/c?t?d?s2 or can be the file name of a block device in the form of /dev/dsk/c?t?d?s2.
The following options are supported: -f
Report on the disk free space, including the starting block address of the free space, number of blocks, and unused partitions.
Omit the headers from the normal output.
Omit all headers but the column header from the normal output.
Example 1 Using the prtvtoc Command
The following example uses the prtvtoc command on a 424-megabyte hard disk:
example# prtvtoc /dev/rdsk/c0t3d0s2 * /dev/rdsk/c0t3d0s2 partition map * * Dimension: * 512 bytes/sector * 80 sectors/track * 9 tracks/cylinder * 720 sectors/cylinder * 2500 cylinders * 1151 accessible cylinders * * Flags: * 1: unmountable * 10: read-only * * First Sector Last * Partition Tag Flags Sector Count Sector Mount Directory 0 2 00 0 76320 76319 / 1 3 01 76320 132480 208799 2 5 00 0 828720 828719 5 6 00 208800 131760 340559 /opt 6 4 00 340560 447120 787679 /usr 7 8 00 787680 41040 828719 /export/home example#
The data in the Tag column above indicates the type of partition, as follows:
Name 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 |
The data in the Flags column above indicates how the partition is to be mounted, as follows:
Name Number |
MOUNTABLE, READ AND WRITE 0x00 |
NOT MOUNTABLE 0x01 |
MOUNTABLE, READ ONLY 0x10 |
Example 2 Using the prtvtoc Command with the -f Option
The following example uses the prtvtoc command with the -f option on a 424-megabyte hard disk:
example# prtvtoc -f /dev/rdsk/c0t3d0s2 FREE_START=0 FREE_SIZE=0 FREE_COUNT=0 FREE_PART=34
Example 3 Using the prtvtoc Command on a Disk Over One Terabyte
The following example uses uses the prtvtoc command on a disk over one terabyte:.
example# prtvtoc /dev/rdsk/c1t1d0s2 * /dev/rdsk/c1t1d0s2 partition map * * Dimensions: * 512 bytes/sector * 3187630080 sectors * 3187630013 accessible sectors * * Flags: * 1: unmountable * 10: read-only * * First Sector Last * Partition Tag Flags Sector Count Sector Mount Directory 0 2 00 34 262144 262177 1 3 01 262178 262144 524321 6 4 00 524322 3187089340 3187613661 8 11 00 3187613662 16384 318763004
devinfo(1M), fmthard(1M), format(1M), mount(1M), attributes(5)
The mount command does not check the "not mountable" bit.