Digital UNIX disk partitioning

PrevUp

[ Tru64 UNIX 5.x/4.x | DEC OSF/1 3.x ]


Tru64 UNIX 5.x/4.x

Disk layout example for a 4.3 GB disk, 5.x AdvFS:

Partition Size/blocks Offset/blocks Size/MB Usage
a 1048576 0 512 /,/tmp
b 384 swap
g 3072 /usr,/opt,/var
e 64 LSM private
c entire disk entire disk all partitions
d,e,f,h 0 0 0 unused


Disk layout example for a 4.0 GB disk, 4.x AdvFS:

Partition Size/blocks Offset/blocks Size/MB Usage
a 1048576 0 512 /,/tmp
b 384 swap
g 2600 /usr,/opt
f 256 /var
e 64 LSM private
c entire disk entire disk all partitions
d,e,f,h 0 0 0 unused


Establish a shell window where possible, then
disklabel -r dsk0 >/tmp/disklabel # read current config of disk 0
TERM=vt100; export TERM
EDITOR=vi; export EDITOR
vi /tmp/disklabel                 # change partitioning, size/offset suffices
disklabel -R dsk0  /tmp/disklabel # load new partitions, 

DEC OSF/1 3.x

Disk layout example for a 4.x GB disk (UFS):

Partition Size/blocks Offset/blocks Size/MB Usage
a 1048576 0 512 /,/tmp
b 524288 1048576 256 swap
g 5767168 1572864 2816 /usr,/opt
f 1048576 7340032 512 /var
c entire disk 0 entire disk all partitions
d,e,h 0 0 0 unused

  1. If not yet done, create special files:
    cd /dev
    ./MAKEDEV rzN          # assume a disk with SCSI ID=N
    
  2. Write the disklabel. With one of the commands
    disklabel -rw                rzN  rz29   # for UFS   on a disk of type 'rz29' in /etc/disktab
    disklabel -rw          /dev/rrzNc unkown # for UFS   on an unknown disk
    disklabel -rw -t advfs /dev/rrzNc unkown # for AdvFS on an unknown disk
    
    a disklabel will be written with information taken from /etc/disktab, if available, otherwise some default values are taken.
  3. For modifying the partitioning scheme one may use
    • Either: Query pro forma disk geometry with
      disklabel -r rzN                         # re-read label and disk parameters
                                               # output:  
      # /dev/rrzna:
      bytes/sector: 512
      type: SCSI            # dt
      sectors/track: 165    # ns
      tracks/cylinder: 10   # nt
      cylinders: 5172       # nc
      sectors/unit: 8419844 # total size in blocks
      
      and create/modify the appropriate entry in /etc/disktab.
      Then re-write the new label:
      disklabel -rw rzN <disktype>
      
    • Or (as described in the OSF/1 Installation Guide):
      EDITOR=ed
      export EDITOR
      disklabel -e  rzN      # invokes label editor
      
      "Edit" the partition table using commands like:
      1,$p                         # display, position at start
      /b:                          # jump at partition b (swap)
      s/<oldsize>/524288/p         # size=256MB
      s/<oldoffs>/1048576/p        # offset=512MB
      1,$p                         # redisplay, control
      /a                           # continue with next partition
      w                            # save and exit
      
      Then
      disklabel -r rzN
      

Last updated: 12-Sep-2010, M.Kraemer