Managing Devices in Oracle® Solaris 11.2

Exit Print View

Updated: July 2014
 
 

Creating File Systems on USB Storage Devices

The file systems are automatically mounted on hot-pluggable devices. On certain removable devices, you might need to create the file system after the devices are connected. This section provides some examples of how to create the file systems.

Before you create the file system, ensure that the device is unmounted. To create a file system, use the following command syntax:

# mkfs -F FS-type -o FS-type-specific-options raw-device-file
FS-type

Type of file system you want to create.

FS-type-specific-options

Options that are specific to the type of file system you are creating such as size for FAT file systems.

raw-device-file

Disk partition on which to write the file system.


Note -  You must format USB diskettes first before creating file systems on the diskettes. All other mass storage devices require only a file system before you can use them.

The following example shows how to create a PCFS file system on a 1.4-MB diskette on a SPARC system:

# mkfs -F pcfs /dev/rdsk/c2t0d0p0
Construct a new FAT file system on /dev/rdsk/c2t0d0p0: (y/n)? y

The following example shows how to create a PCFS file system on a 1.4-MB diskette on an x86 system:

# mkfs -F pcfs /dev/rdsk/c2t0d0s2
Construct a new FAT file system on /dev/rdsk/c2t0d0s2: (y/n)? y

The following example shows how to create a PCFS file system on a 100-MB USB memory stick on a SPARC system:

# mkfs -F pcfs /dev/rdsk/c5t0d0s2:c

The following example shows how to create a PCFS file system on a 100-MB USB memory stick on an x86 system:

# mkfs -F pcfs /dev/rdsk/c5t0d0p0:c

The following example shows how to create a legacy UFS file system.

# newfs /dev/rdsk/c0t0d0s6

Consider using the newfs -f 4096 option or newfs -T option for large USB hard disks.


Note -  UFS file system overhead consumes a significant portion of space on a diskette, due to a diskette's limited storage capacity.