Cover V07, I11
Article
Figure 1
Sidebar 1

nov98.tar


Sidebar: prtvtoc Output

The prtvtoc command is used to display vital information about how a disk is formatted. Here's how to read it. (The line numbers are displayed for reference only. They are not part of prtvtoc output.)

  1. */dev/rdsk/c0t0d0s2 partition map
  2. *
  3. *Dimensions:
  4. *512 bytes/sector
  5. *135 sectors/track
  6. *16 tracks/cylinder
  7. *2160 sectors/cylinder
  8. *3882 cylinders
  9. *3880 accessible cylinders
  10. *
  11. *Flags:
  12. *1: unmountable
  13. *10: read-only
  14. *
  15. *Unallocated space:
  16. * First Sector Last
  17. * Sector Count Sector
  18. * 410400 2160 412559
  19. * 2542320 4320 2546639
  20. *
  21. * First Sector Last
  22. * Partition Tag Flags Sector Count Sector Mount Directory
  23. 0 2 00 0 410400 410399 /
  24. 1 3 01 412560 2129760 2542319
  25. 2 5 00 0 8380800 8380799
  26. 3 4 00 2546640 1639440 4186079 /usr
  27. 4 7 00 4186080 2097360 6283439 /var
  28. 5 4 00 6283440 2097360 8380799 /opt

  • Lines 3-9 describe the geometry of the disk.

  • Lines 11-13 define the "Flags" column. A flag of 01 means that that partition is not mountable. In this output, you will see that the swap slice has a flag of 01 (line 24). A flag of 10 means that the partition can be mounted as read-only. One flag that isn't listed (but is the one used most) is 00. 00 means that the partition can be mounted as read-write. Note that all of the filesystems (Lines 23, 26-28) have a flag of 00.

  • Lines 15-19 define any free space that may be available on the disk (if there is no free space, these lines are not present). This information can help you take advantage of any free space. If this information weren't provided, you'd have to try to calculate the free space yourself.

  • Lines 23-28 describe the layout of the partitions on the disk (partition 2 is always the whole disk). The partition column displays the number of the partition being displayed. This field is the "s" in a disks device name (e.g., c0t0d0s1 is partition 1 of the disk at location c0t0d0).

The "Tag" field is defined as:

NAME           NUMBER
UNASSIGNED       0
BOOT             1
ROOT             2
SWAP             3
USR              4
BACKUP           5
VAR              7
HOME             8

The "First Sector" field is the sector that the partition starts at. "Sector Count" is the size of the partition (in sectors) and "Last Sector" is the ending sector of the partition. "Mount Directory" shows the mountpoint that the partition is currently mounted on (as reported in /etc/mnttab).