Unmounting a file system

If you no longer need to access the data in a file system, you can unmount the file system using the umount command.

Before unmounting a file system, review the following:

Prerequisites

  • A file system must exist and be mounted in order to be unmounted.

Usage notes

  • You cannot unmount a file system that is in use.

    See the umount (1M) manual page for more information on mounting file systems.

To unmount a file system

  1. Use the fuser command to make sure that the file system is not being used:

    # fuser -c /mount_point
    

    where the -c option provides information on file system mount points and any files within mounted file systems.

    If the file system is being used and you need to unmount it, use the fuser -ck command. See the fuser(1M) man page for more information.

  2. Unmount the file system using one of the umount command options:

    • umount special

    • umount /mount_point

    • umount -f /mount_point

      where:

    • special is a block special device

    • /mount_point is the location where the file system is mounted

    • -f forcibly unmounts the mount point

    The following is an example of unmounting a file system:

    To verify that the file system /db01 is not in use and then unmount the file system:

    # fuser -c /db01
    /db01: 
    # umount /db01