JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Oracle Solaris Administration: Devices and File Systems     Oracle Solaris 11 Information Library
search filter icon
search icon

Document Information

About This Book

1.  Managing Removable Media (Overview)

2.  Managing Removable Media (Tasks)

3.  Accessing Removable Media (Tasks)

Accessing Removable Media (Task Map)

Accessing Removable Media

Using Removable Media Names

Guidelines for Accessing Removable Media Data

How to Add a New Removable Media Drive

How to Disable or Enable Removable Media Services

How to Access Information on Removable Media

How to Copy Information From Removable Media

How to Determine If Removable Media Is Still in Use

How to Eject Removable Media

Accessing Removable Media on a Remote System (Task Map)

How to Make Local Media Available to Other Systems

How to Access Removable Media on Remote Systems

4.  Writing CDs and DVDs (Tasks)

5.  Managing Devices (Overview/Tasks)

6.  Dynamically Configuring Devices (Tasks)

7.  Using USB Devices (Overview)

8.  Using USB Devices (Tasks)

9.  Using InfiniBand Devices (Overview/Tasks)

10.  Managing Disks (Overview)

11.  Administering Disks (Tasks)

12.  SPARC: Setting Up Disks (Tasks)

13.  x86: Setting Up Disks (Tasks)

14.  Configuring Storage Devices With COMSTAR

15.  Configuring and Managing the Oracle Solaris Internet Storage Name Service (iSNS)

16.  The format Utility (Reference)

17.  Managing File Systems (Overview)

18.  Creating and Mounting File Systems (Tasks)

19.  Configuring Additional Swap Space (Tasks)

20.  Copying Files and File Systems (Tasks)

21.  Managing Tape Drives (Tasks)

Index

Accessing Removable Media

You can access information on removable media with or without using volume management. For information on accessing information on removable media with GNOME's File Manager, see the GNOME desktop documentation.

Using Removable Media Names

Removable media is now mounted automatically in the /media directory. However, symbolic links to /media are provided from previous media mount points, /cdrom and /rmdisk, for compatibility purposes.

For example, a compact flash memory card (/dev/dsk/c4d0p0:1) is mounted as follows:

$ ls /media/NIKON

For example, a USB memory stick (/dev/dsk/c3t0d0s0) is mounted as follows:

$ ls /media/U3

Guidelines for Accessing Removable Media Data

Most DVDs are formatted to the ISO 9660 standard, which is portable. So, DVDs can be mounted by volume management.

To accommodate possible different formats, a DVD is split into slices. Slices are similar in effect to partitions on hard disks. The 9660 portion is portable. If you are having trouble mounting a DVD, particularly if it is an installation DVD, make sure that its file system is appropriate for your system's architecture. For example, you can check the label on DVD.

How to Add a New Removable Media Drive

Generally, most modern bus types support hot-plugging. This means you can insert a disk in an empty slot and the system recognizes it.

For more information about hot-plugging devices, see Chapter 6, Dynamically Configuring Devices (Tasks).

  1. Become an administrator.
  2. Connect the new media drive.

    See your hardware handbook for specific instructions.

  3. Confirm that the system sees the new media drive.
    # rmformat
    Looking for devices...

How to Disable or Enable Removable Media Services

Occasionally, you might want to manage media without using removable media services. This section describes how to disable and enable removable media services.

Disabling these services means that you would have to mount all media manually by using the mount command.

  1. Ensure that the media is not being used.

    If you are not sure whether you have found all users of the media, use the fuser command, see How to Determine If Removable Media Is Still in Use.

  2. Become an administrator.
  3. Select one of the following:
    • You can disable some or all removable media features in this release:

      • To prevent volumes from mounting outside of user sessions, disable the rmvolmgr service. For example:

        # svcadm disable rmvolmgr
      • To prevent any volume management, disable the dbus, hal, and rmvolmgr services.

        # svcadm disable rmvolmgr
        # svcadm disable dbus
        # svcadm disable hal

        Disabling these services means that you would have to mount all media manually by using the mount command.

    • Enable removable media services.

      # svcadm enable rmvolmgr
      # svcadm enable dbus
      # svcadm enable hal

How to Access Information on Removable Media

  1. Insert the media.

    The media is mounted after a few seconds.

  2. List the contents of the media.
    % ls /media

Example 3-1 Accessing Information on Removable Media

This example shows how to access information on a USB memory stick.

$ ls /media/usb-name

This example shows how to access information on a DVD.

$ ls /media
sol_10_811_sparc  cdrom

How to Copy Information From Removable Media

You can access files and directories on removable media as with any other file system. The only significant restrictions are related to ownership and permissions.

For instance, if you copy a file from a DVD into your file system, you are the owner. However, you won't have write permissions because the file on the DVD never had them. You must change the permissions yourself.

  1. Ensure that the media is mounted.
    $ ls /media

    The ls command displays the contents of a mounted media. If no contents are displayed, see How to Access Information on Removable Media.

  2. (Optional) Copy the files or directories.

    For example, for a DVD, you would do the following:

    $ cp /media/sol_sparc/Solaris_11/file .
    $ ls -l
    -rwxr-xr-x   1 pmorph   gelfs  64065 Aug 2  2010 file

How to Determine If Removable Media Is Still in Use

  1. Become an administrator.
  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)

How to Eject Removable Media

  1. Ensure that the media is not being used.

    Remember, media is “being used” if a shell or an application is accessing any of its files or directories. If you are not sure whether you have found all users of a DVD (for example, a shell hidden behind a desktop tool might be accessing it), use the fuser command. See How to Determine If Removable Media Is Still in Use.

  2. Eject the media.
    # eject media

    For example, for a DVD, you would do the following:

    # eject cdrom

    For example, for a USB memory stick, you would do the following:

    # eject rmdisk0

    Tip - You can view the removable device name with the eject -l command.