Views, creates or deletes physical disk partitions. (Itanium-based platform only)
efdisk [ Flags ] hdisk_device_file
The efdisk command is the partition manager for AIX on Itanium-based platforms. This command will manage the partitions on a physical disk. The command is directed at a logical disk hdiskx. The efdisk command provides options to:
The command opens the /dev/hdiskx_all special file associated with the requested logical disk name and displays the existing partition information, prior to waiting for user input.
The hdisk_device_file parameter specifies the disk the efdisk command is to process. The disk can be specified by its logical hdiskx name (for example hdisk0) or its special file name /dev/hdiskx_all. The command opens the specified disk's special file name /dev/hdiskx_all and operate on that disk
Note: Disk partitioning changes made by running the efdisk command become effective after the affected device has been reconfigured, or once the system has been rebooted. Reconfiguration of the disk can be performed by running the rmdev -l hdiskx command followed by the mkdev -l hdiskx command.
|-p .||Displays partition information for the disk.|
|-q||Queries partition data for the disk.|
|-b||Specifies batch mode operation.|
|-c||Applies the changes to the disk in batch mode.|
|-f Directive_File||Specifies the batch mode directives file.|
|-s||Initializes the disk with Default (GPT style) partition tables.|
|-e||Initializes the disk with GPT style partition tables.|
|-l||Initializes the disk with LEGACY (DOS style) partition tables.|
In interactive mode, the command first checks the validity of the partition information on the disk and displays the existing partition information. You are then presented with options to add or delete partitions, display detailed partition information, write changes and exit, and to quit without writing changes. Additional menus and options are presented when adding or deleting partitions. The changes requested are not written to the disk until the you specify the write changes to disk and exit option.
The efdisk command provides a batch mode for use during AIX install or when it is desirable to partition multiple disks from a script file. An additional batch interactive mode is provided where the interactive partitioning menus are displayed to the user and the user's actions are written to a batch mode directive file in order to defer the actual disk modification to a later time.
efdisk -b -f /tmp/partinfo.hdisk3 hdisk3
efdisk -c -f /tmp/partinfo.hdisk3 hdisk3
The batch directive file has the following syntax:
add index direction size type name
|index||Specifies the index for new partition. The value is either an integer starting at 0 or* character indicating to use next available partition index|
|direction||Specifies the allocation direction:
|size||Specifies the size for the new partition. An integer number indicates number of bytes to allocate for the new partition. A *, r, or R character indicates to allocate all of the space in the largest available free space area found on the disk.|
|type||Specifies a partition type for the new partition
Other customer defined partition types can be defined in the /etc/diskpartitions file.
|name||Specifies the name for the new partition. A quoted string up to 35 characters long|
add, *, b, 52428800, system, "System Partition"
Add a 50 megabyte system partition with the first available partition index at the highest available logical block address on the disk
add, *, f, r, physvol, "Physical Volume Partition"
Add a physical volume partition with the first available partition index into the largest free space area on the disk starting at the lowest available logical block address.
delete index type
|index||Specifies the index for partition to be deleted. Value is either an integer starting at 0 or * character indicates to delete all partitions matching the type parameter.|
|type||Specifies the type of partition to be deleted
Other customer defined partition types can be defined in the /etc/diskpartitions file. An * character indicates any partition type
delete 1, physvol
Deletes partition 1 if it is a physical volume.
delete *, physvol
Deletes all physical volume partitions on disk.
delete 1, *
Deletes partition 1 of any partition type.
delete *, *
Deletes all partitions on the disk.
Deletes all non-system partitions from disk. This command does not have any parameters/options.
Displaying partition information
efdisk -p hdisk0
This command begins by displaying information about the disk such as its size, number of blocks, blocksize, and its GUID (Guaranteed Unique Identifier). If the disk has valid partition tables, the command then displays if the disk is formatted with LEGACY or EFI style partition tables. It then displays information about allocated partitions and free space on the disk. The partitions are displayed in logical block address order starting at the lowest address on the disk. The following information is displayed for allocated partitions: partition index, partition type, partition type GUID, partition GUID, starting LBA, ending LBA, number of blocks, partition size, and if EFI partitioned the partition name.
Custom partition types
The efdisk commands functionality can be extended to support custom partition types on GPT partitioned disks. An operator can define custom partition types in the /etc/diskpartitions configuration file. When /etc/diskpartitions contains valid custom partition type entries, the efdisk command allows the user to create partitions of the type described by the entry.
Following is the format of custom partition type entries in the /etc/diskpartitions file:
GUID DESCRIPTION TYPE
|GUID||The partition's type GUID. These have the form:
They must have the exact form shown, 36 characters, hex digits in the grouping shown, separated by - character.
|DESCRIPTION||A quoted (") string describing the partition. The string may be up to 35 characters.|
|TYPE||A string containing a short name for the partition. The string may be up to 7 characters. Lines beginning with '#' character are comment lines|
c2d426f8-1d34-183c-1234-1330d61872b9 "Data Base Partition" db 2372dc84-3ff3-2736-29a1-2562a5b7ff00 "Special Partition" special
|/etc/diskpartitions||Optional custom partition type definition file|
The eformat command.
EFI Disk Partitioning Overview inAIX 5L Version 5.1 Kernel Extensions and Device Support Programming Concepts.