Managing File Systems in Oracle® Solaris 11.2

Exit Print View

Updated: July 2014
 
 

How to Stop All Processes That Are Accessing a File System

  1. Become an administrator.

    For more information, see Using Your Assigned Administrative Rights in Securing Users and Processes in Oracle Solaris 11.2 .

  2. List all the processes that are accessing the file system so that you know which processes you are going to stop.
    # fuser -c [ -u ] /mount-point
    –c

    Reports on files that are mount points for file systems and any files within those mounted file systems.

    –u

    Displays the user login name for each process ID.

    /mount-point

    Specifies the name of the file system for which you want to stop processes.

  3. Stop all processes that are accessing the file system.
    # fuser -c -k /mount-point

    A SIGKILL is sent to each process that is using the file system.


    Note - You should not stop a user's processes without first warning the user.
  4. Verify that no processes are accessing the file system.
    # fuser -c /mount-point
Example 2-12  Stopping All Processes That Are Accessing a File System

The following example shows how to stop process 4006c that is using the /export/home file system.

# fuser -c /export/home
/export/home:     4006c
# fuser -c -k /export/home
/export/home:     4006c
# fuser -c /export/home
/export/home: