System Administration Guide: Devices and File Systems
  Search only this book
View this book in:
Download this book in PDF (3009 KB)

Improved Device In Use Error Checking

Solaris 10 6/06: This feature was undocumented previously.

The following utilities have been enhanced to detect when a specified device is in use:

  • dumpadm

  • format

  • mkfs and newfs

  • swap

These enhancements mean that the above utilities might detect some of the following usage scenarios:

  • Device is part of a ZFS storage pool

  • Device is a dump or swap device

  • Mounted file system or an entry for the device exists in the /etc/vfstab file

  • Device is part of live upgrade configuration

  • Device is part of a Solaris Volume Manager configuration or Veritas Volume Manager configuration

For example, if you attempt to use the format utility to access an active device, you will see a message similar to the following:


# format
.
.
.
Specify disk (enter its number): 1
selecting c0t1d0
[disk formatted]
Warning: Current Disk has mounted partitions.
/dev/dsk/c0t1d0s0 is currently mounted on /. Please see umount(1M).
/dev/dsk/c0t1d0s1 is currently used by swap. Please see swap(1M).

However, these utilities do not detect all scenarios in the same way. For example, you can use the newfs command to create a new file system on a device in a live upgrade configuration. You cannot use the newfs command to create a new file system on a device that is part of a live upgrade configuration if it also has a mounted file system.