Go to main content

Managing Devices in Oracle® Solaris 11.4

Exit Print View

Updated: November 2020
 
 

How to Format a Removable Device (rmformat)

You can use the rmformat command to format a removable USB storage device. 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 about restarting removable media services, see How to Disable or Enable Removable Media Services. For information about identifying media device names, see Using Removable Media Names.

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

    where device-name includes the full path to the device, such as /dev/device.

    See About Formatting Removable Media for more information about rmformat formatting options.

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

  3. (Optional) Label the device.
    $ rmformat -b label device-name

    For information about creating a DOS label, see the mkfs_pcfs(8) man page.