JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
System Administration Guide: Devices and File Systems     Oracle Solaris 10 1/13 Information Library
search filter icon
search icon

Document Information

Preface

1.  Managing Removable Media (Overview/Tasks)

Managing Removable Media (Overview)

Removable Media Features and Benefits

vold is Managed by the Service Management Facility (SMF)

Volume Management (vold) Improvements

Comparison of Manual and Automatic Mounting

Overview of Accessing Removable Media

Managing Removable Media (Tasks)

Removable Media Considerations

Formatting Diskettes

How to Load Removable Media

How to Format a Diskette (rmformat)

How to Create a File System on Removable Media

How to Create a File System on a DVD-RAM

How to Check a File System on Removable Media

How to Repair Bad Blocks on Removable Media

Applying Read or Write Protection and Password Protection to Removable Media

How to Enable or Disable Write Protection on Removable Media

How to Enable or Disable Read or Write Protection and Set a Password on Removable Media

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 Determine If Removable Media Is Still in Use

How to Eject Removable Media

Accessing Removable Media on a Remote System

How to Make Local Media Available to Other Systems

How to Access Removable Media on Remote Systems

2.  Writing CDs and DVDs (Tasks)

3.  Managing Devices (Tasks)

4.  Dynamically Configuring Devices (Tasks)

5.  Managing USB Devices (Tasks)

6.  Using InfiniBand Devices (Overview/Tasks)

7.  Managing Disks (Overview)

8.  Managing Disk Use (Tasks)

9.  Administering Disks (Tasks)

10.  SPARC: Setting Up Disks (Tasks)

11.  x86: Setting Up Disks (Tasks)

12.  Configuring Oracle Solaris iSCSI Targets (Tasks)

13.  The format Utility (Reference)

14.  Managing File Systems (Overview)

15.  Creating and Mounting File Systems (Tasks)

16.  Configuring Additional Swap Space (Tasks)

17.  Checking UFS File System Consistency (Tasks)

18.  UFS File System (Reference)

19.  Backing Up and Restoring UFS File Systems (Overview/Tasks)

20.  Using UFS Snapshots (Tasks)

21.  Copying Files and File Systems (Tasks)

22.  Managing Tape Drives (Tasks)

23.  UFS Backup and Restore Commands (Reference)

Index

Managing Removable Media (Tasks)

The following guidelines and procedures are described in this section:

Removable Media Considerations

Keep the following considerations in mind when working with diskettes:

Formatting Diskettes

You can use the rmformat command to format and perform other management tasks on removable media. File systems are mounted automatically. So, you might have to unmount media before you can format it, if the media contains an existing file system.

The rmformat command has three formatting options:

How to Load Removable Media

For information about removable media hardware considerations, see Removable Media Considerations.

  1. Insert the media.
  2. Ensure that the media is formatted.

    If you aren't sure, insert the media and check the status messages in the system console window, as described in Step 3. If you need to format the media, go to How to Format a Diskette (rmformat).

  3. (Optional) Notify volume management if you are using a legacy, non-USB diskette device.
    $ volcheck -v

    Two status messages are possible:

    media was found

    Volume management detected the media and will attempt to mount it in the directory described in Using Removable Media Names.

    If the media is formatted properly, no error messages appear in the console.

    If the media is not formatted, the “media was found” message is still displayed. However, error messages similar to the following appear in the system console window:

    fd0: unformatted diskette or no diskette in the drive

    fd0: read failed (40 1 0)

    fd0: bad format

    You must format the media before volume management can mount it. For more information, see How to Format a Diskette (rmformat).

    no media was found

    Volume management did not detect the media. Ensure that the media is inserted properly, and run volcheck again. If unsuccessful, check the media, which could be damaged. You can also try to mount the media manually.

  4. Verify that the media was mounted by listing its contents.

    For example, do the following for a diskette:

    $ ls /media/floppy
    lost+found myfiles

How to Format a Diskette (rmformat)

You can use the rmformat command to format a diskette. By default, this command creates two partitions on the media: partition 0 and partition 2 (the whole media).

  1. Verify that removable media service is running. If so, you can use the shorter nickname for the device name.
    # svcs hal dbus rmvolmgr
    STATE          STIME    FMRI
    online         Apr_09   svc:/system/dbus:default
    online         Apr_09   svc:/system/hal:default
    online         Apr_09   svc:/system/filesystem/rmvolmgr:default

    For information on restarting removable media services, see How to Disable or Enable Removable Media Services. For information on identifying media device names, see Using Removable Media Names.

  2. Format the diskette.
    $ rmformat -F [ quick | long | force ] device-name

    See Formatting Diskettes for more information on rmformat formatting options.

    If the rmformat output indicates bad blocks, see How to Repair Bad Blocks on Removable Media.

  3. (Optional) Label the diskette with an 8-character label.
    $ rmformat -b label device-name

    For information on creating a DOS label, see mkfs_pcfs(1M).

Example 1-1 Formatting a Diskette

This example shows how to format a diskette.

$ rmformat -F quick /dev/rdiskette
Formatting will erase all the data on disk.
Do you want to continue? (y/n) y
.........................................................................

How to Create a File System on Removable Media

  1. (Optional) Format a diskette, if necessary.

    To format a USB diskette, use syntax similar to the following:

    $ rmformat -F long /dev/rdsk/c11t0d0p0
  2. (Optional) Create an alternate Solaris partition table.
    $ rmformat -s slice-file device-name

    A sample slice file appears similar to the following:

    slices: 0 = 0, 30MB, "wm", "home" : 
                  1 = 30MB, 51MB : 
                  2 = 0, 94MB, "wm", "backup" : 
                  6 = 81MB, 13MB
  3. Become superuser.
  4. Determine the appropriate file system type and select one of the following:
    • Create a PCFS file system. For example:

      # mkfs -F pcfs -o nofdisk,size=9800 /dev/rdsk/c11t0d0p0
    • Create a UDFS file system. For example:

      # mkfs -F udfs /dev/rdsk/c0t1d0p0

How to Create a File System on a DVD-RAM

Use this procedure to create a file system on a DVD-RAM.

  1. Become superuser.
  2. Create a file system on the DVD-RAM device.

    For example, create a UDFS file system, as follows:

    # mkfs -F udfs /dev/rdsk/c0t0d0s2
  3. Mount the file system.

    For example, mount a UDFS file system, as follows:

    # mount -F udfs /dev/dsk/c0t0d0s2 /mnt
  4. Verify that you can read or write to the file system.
  5. When finished, eject the DVD-RAM.

How to Check a File System on Removable Media

  1. Become superuser.
  2. Identify the file system type and select one of the following:
    • Check a UDFS file system, as follows:
      # fsck -F udfs device-name
    • Check a PCFS file system, as follows:
      # fsck -F pcfs device-name

Example 1-2 Checking a PCFS File System on Removable Media

The following example shows how check the consistency of a PCFS file system on media.

# fsck -F pcfs /dev/rdsk/c0t4d0s2
** /dev/rdsk/c0t4d0s2
** Scanning file system meta-data
** Correcting any meta-data discrepancies
1457664 bytes.
0 bytes in bad sectors.
0 bytes in 0 directories.
0 bytes in 0 files.
1457664 bytes free.
512 bytes per allocation unit.
2847 total allocation units.
2847 available allocation units.

How to Repair Bad Blocks on Removable Media

You can only use the rmformat command to verify, analyze, and repair bad sectors that are found during verification if the drive supports bad block management. Most USB memory sticks do not support bad block management.

If the drive supports bad block management, a best effort is made to rectify the bad block. If the bad block cannot be rectified despite the best effort mechanism, a message indicates the failure to repair the media.

  1. Repair bad blocks on removable media.
    $ rmformat -c block-numbers device-name

    Supply the block number in decimal, octal, or hexadecimal format from a previous rmformat session.

  2. Verify the media.
    $ rmformat -V read device-name

Applying Read or Write Protection and Password Protection to Removable Media

You can apply read protection or write protection, and set a password, on removable media that support this feature.

How to Enable or Disable Write Protection on Removable Media

  1. Determine whether you want to enable or disable write protection and select one of the following:
    • Enable write protection.
      $ rmformat -w enable device-name
    • Disable write protection.
      $ rmformat -w disable device-name
  2. Verify whether the media's write protection is enabled or disabled.
    $ rmformat -p device-name

How to Enable or Disable Read or Write Protection and Set a Password on Removable Media

You can apply a password with a maximum of 32 characters for removable media that support this feature.

You will receive a warning message if you attempt to apply a password on media that does not support this feature.

  1. Determine whether you want to enable or disable read protection or write protection and set a password. Select one of the following:
    • Enable read protection or write protection.
      $ rmformat -W enable device-name
      Please enter password (32 chars maximum): xxx
      Please reenter password:
      $ rmformat -R enable device-name
      Please enter password (32 chars maximum): xxx
      Please reenter password:
    • Disable read protection or write protection and remove the password.
      $ rmformat -W disable device-name
      Please enter password (32 chars maximum): xxx
      $ rmformat -R disable device-name
      Please enter password (32 chars maximum): xxx
  2. Verify whether the media's read protection or write protection is enabled or disabled.
    $ rmformat -p device-name