14. Mounting

mount will create a file structure (syntax- mount [where to mount]/mnt, i.e. mount /dev/dsk/c0t1d0s0/mnt)

umount /mnt – takes the files and directories and hides them until you mount them So you would remount by mount [device name] [where you want it to go], i.e. mount /dev/dsk/c0t1d0s0 /export/home/mine

All directories and files are mounted on the partitions

Mount is a hook for everything else to attach the first time. Mount ties everything together like /etc to / (root) and so on, kind of like a pyramid, where root is the apex, and the files go down from there all hooked together.

Rules for unmounting

The fuser –c [dir name] will tell who is using the directory

Steps to set up a new disk and to free up space:

  1. format to partition
  2. newfs to create file system on new partition
  3. mount file system to temporary place
  4. cp (copy) old location to temporary directory
  5. rmdir (delete) old copy (if freeing up space)
  6. umount from temp location
  7. mount file system on old location (like linking, except you are putting info on new physical device but making it look the same in the tree, /etc/vfstab is a database for doing this)

In mount option field put re (read-only), nosuid (no setting user id),example: mount[device to mount] [device to fsck] [mount point] [file type] [fsck pass any number but 1] [ mount at boot?] [mount options] i.e. mount /dev/dsk/c0t1d0s0 /dev/dsk/c0t1d0s0 /export/home/paul ufs 5 yes nosuid

Mount has two arguments: mount [physical gear to mount] [mount point] i.e. mount /dev/dsk/c0t0d0s0 /etc/usr

vfstab no blank lines


  Go to Chapter 13       Go to Index        Go to Chapter 15