lkdev Command

Purpose

Locks a device. Any attempt to modify device characteristics fails.

Syntax

lkdev [ -l Name -a | -d [ -c Text ] ]

lkdev -h

Description

The lkdev command locks the specified device (the -l Name flag). Any attempt to modify device attributes by using the chdev or chpath command is denied. In addition, an attempt to delete the specified device or one of its paths from the Object Data Manager (ODM) by using either the rmdev or rmpath command is denied.

Flags

Item Description
-h Displays the command usage message.
-l Name Specifies the logical device name of the target device for the paths affected by the change. This flag is required in all cases.
-a Locks the specified device.
-d Unlocks the specified device.
-c Text Specifies a text string of up to 64 printable characters that contain no embedded spaces.

Security

Privilege control: Only the root user can execute this command.

Auditing events:
Event Information
DEV_LOCK The device command line

Examples

  1. To enable the lock for the hdisk1 disk device, enter the following command:
    lkdev -l hdisk1 -a
  2. To disable the lock for the hdisk1 disk device, enter the following command:
    lkdev -l hdisk1 –d
  3. To enable the lock for the hdisk1 disk device and create a text label, enter the following command:
    lkdev -l hdisk1 -a –c test_string
  4. To modify the text label for the hdisk1 disk device, enter the following command:
    lkdev -l hdisk1 –c new_test_string

Location

Item Description
/usr/sbin/lkdev Contains the lkdev command