HMC Homepage CS Home

Bass.syslab.cs.hmc.edu Disk Layout

CS181a: System, Network, & Security Administration

Assignment 2

Shantanu Bhattacharyya & Ben Feinstein

This qref is meant to describe the disk layout of Bass, including physical disk partition sizes, where filesystems are located, and the mount table.

  1. View the physical disk partitions (as root):

    % fdisk -s /dev/ad0(Assuming /dev/ad0 is the raw device file of the disk whose partitions we wish to view)

    FreeBSD uses disk labels, a form of partition that operates one level below the physical disk partition as seen by fdisk and the machine's BIOS. In most cases with FreeBSD, you'll want to simply create one large partition spanning the whole HD.

    Our single partition is configured as follows:

    /dev/ad0: 3720 cyl 255 hd 63 sec
    Part Start Size Type Flags
    1: 63 59761737 0xa5 0x80

  2. View the FreeBSD disk labels within a partition (as root):

    % disklabel -r /dev/ad0s1(Assuming /dev/ad0s1 is the partition whose disk labels we wish to view)

    Our FreeBSD disk labels are configured as follows:

    # /dev/ad0s1:
    type: ESDI
    disk: ad0s1
    label:
    flags:
    bytes/sector: 512
    sectors/track: 63
    tracks/cylinder: 255
    sectors/cylinder: 16065
    cylinders: 3719
    sectors/unit: 59761737
    rpm: 3600
    interleave: 1
    trackskew: 0
    cylinderskew: 0
    headswitch: 0 # milliseconds
    track-to-track seek: 0# milliseconds
    drivedata: 0

    8 partitions:
    # size offset fstype [fsize bsize bps/cpg]
    a: 2048000 0 4.2BSD 1024 8192 16 # (Cyl. 0 - 127*)
    b: 1024000 2048000 swap # (Cyl. 127*- 191*)
    c: 59761737 0 unused 0 0 # (Cyl. 0 - 3719*)
    e: 10240000 3072000 4.2BSD 1024 8192 16 # (Cyl. 191*- 828*)
    f: 20480000 13312000 4.2BSD 1024 8192 16 # (Cyl. 828*- 2103*)
    g: 12288000 33792000 4.2BSD 1024 8192 16 # (Cyl. 2103*- 2868*)

  3. View the filesystem layout:

    % more /etc/fstab

    Our filesystems are configured as follows:

    # Device Mountpoint FStype Options Dump Pass#
    /dev/ad0s1b none swap sw 0 0
    /dev/ad0s1a / ufs rw 1 1
    /dev/ad0s1g /home ufs rw 2 2
    /dev/ad0s1f /usr ufs rw 2 2
    /dev/ad0s1e /var ufs rw 2 2
    /dev/acd0c /cdrom cd9660 ro,noauto 0 0
    proc /proc procfs rw 0 0

    Note that the letters of the disk labels displayed with the disklabel program (in this case [a-g]) correspond to /dev/ad0s1[a-g] in the systems fstab file.


Last Modified Tuesday, 26-Sep-2000