System Administration Guide: Devices and File Systems

ProcedureHow to Determine If Removable Media Is Still in Use

  1. Become superuser.

  2. Identify the processes that are accessing the media.


    # fuser -u /media
    

    The -u displays the user of the media.

    For more information, see fuser(1M).

  3. (Optional) Kill the process accessing the media.


    # fuser -u -k /media
    

    The -k kills the processes accessing the media.


    Caution – Caution –

    Killing the processes that are accessing the media should only be used in emergency situations.


  4. Verify that the process is gone.


    # pgrep process-ID
    

Example 3–2 Determining If the Media Is Still in Use

The following example shows that the user pmorph, is accessing the /media/sol_10_1008_sparc/Solaris_10/Tools directory.


# fuser -u /media/sol_10_1008_sparc/Solaris_10/Tools
/media/sol_10_1008_sparc/Solaris_10/Tools:      723c(pmorph)     316c(pmorph)