fdasd - Partition a DASD

6.10 LPAR mode z/VM guest KVM guest

Use the fdasd command to manage partitions on ECKD-type DASD that were formatted with the compatible disk layout.

With fdasd you can create, change, and delete partitions, and also change the volume serial number.

fdasd checks that the volume has a valid volume label and VTOC. If either is missing or incorrect, fdasd re-creates it.

Calling fdasd with a node, but without options, enters interactive mode. In interactive mode, you are given a menu through which you can display DASD information, add or remove partitions, or change the volume identifier. Your changes are not written to disk until you type the write option on the menu. You can quit without altering the disk at any time before this.

Before you begin:
  • To partition a SCSI disk, use fdisk rather than fdasd.
  • The disk must be formatted with dasdfmt, using the compatible disk layout.
Attention: Careless use of fdasd can result in loss of data.

fdasd syntax

Read syntax diagramSkip visual syntax diagramfdasd -s-r -C -a-k-l <volser>1-c <conf_file>-i-p-f3390,4096<device_type>, <blocksize><node>
Notes:
  • 1 If neither the -l option nor the -k option is specified, a VOLSER is generated from the device number through which the volume is accessed.
Where:
-s or --silent
suppresses messages.
-r or --verbose
displays additional messages that are normally suppressed.
-a or --auto
auto-creates one partition using the whole disk in non-interactive mode.
-k or --keep_volser
keeps the volume serial number when writing the volume label (see VOLSER). Keeping the serial number is useful if the volume already has a serial number that should not be overwritten.
-l <volser> or --label <volser>
specifies the volume serial number.

A volume serial consists of one through six alphanumeric characters or the following special characters:

$ # @ %

All other characters are ignored. Avoid using special characters in the volume serial. Special characters can cause problems when accessing a disk by VOLSER. If you must use special characters, enclose the VOLSER in single quotation marks. In addition, any '$' character in the VOLSER must be preceded by a backslash ('\').

For example, specify:

-l 'a@b\$c#' 
to get:
A@B$C#

VOLSER is interpreted as an ASCII string and is automatically converted to uppercase, padded with blanks and finally converted to EBCDIC before it is written to disk.

Do not use the following reserved volume serials:
  • SCRTCH
  • PRIVAT
  • MIGRAT
  • Lnnnnn (L followed by a five-digit number)
These volume serials are used as keywords by other IBM Z® operating systems, such as z/OS®.

Omitting this parameter causes fdasd to prompt for it, if it is needed.

-c <conf_file> or --config <conf_file>
creates partitions, in non-interactive mode, according to specifications in the configuration file <conf_file>.
For each partition you want to create, add one line of the following format to <conf_file>:
[<first_track>,<last_track>,<type>]

<first_track> and <last_track> are required and specify the first and last track of the partition. You can use the keyword first for the first possible track on the disk and the keyword last for the last possible track on the disk.

<type> describes the partition type and is one of:
native
for partitions to be used for Linux® file systems.
gpfs
for partitions to be used as part of an Elastic Storage file system setup.
swap
for partitions to be used as swap devices.
raid
for partitions to be used as part of a RAID setup.
lvm
for partitions to be used as part of a logical volume group.

The type specification is optional. If the type is omitted, native is used.

The type describes the intended use of a partition to tools or other operating systems. For example, swap partitions could be skipped by backup programs. How Linux actually uses the partition depends on how the partition is formatted and set up. For example, a partition of type native can still be used in an LVM logical volume or in a RAID configuration.

Example: With the following sample configuration file, you can create three partitions:
[first,1000,raid]
[1001,2000,swap]
[2001,last]
-i or --volser
displays the volume serial number and exits.
-p or --table
displays the partition table and exits.
-f or --force
specifies values for the disk geometry instead of detecting them.
Note: Specifying incorrect values can render the disk unusable. Do not use this option if fdasd can automatically detect the disk geometry. For example, do not use the force option for native DASD or any disk with the disk geometry of a type 3390 DASD.
<device_type>,<blocksize>
specifies the disk device type. Valid device types are: 3390, 3380, and 9345. Valid block sizes are: 4096, 2048, 1024, and 512. The default specification is the combination of disk type 3390 with block size 4096.
For disks with the default geometry, you can omit the specifications for the device type and block size, and the following specifications are all valid:
  • -f
  • -f3390,4096
  • --force
  • --force=3390,4096
For all other disks, you must specify both values with the command. The following specifications are all valid for a disk of type 3390 and block size 512:
  • -f3390,512
  • --force=3390,512

Use the verbose option for information about the disk geometry as computed from the specified or default device type and block size.

<node>
specifies the device node of the DASD you want to partition, for example, /dev/dasdzzz. See DASD naming scheme for more details about device nodes.
-C or --check_host_count
checks the host-access open count to ensure that the device is not online to another operating system instance. The operation is canceled if another operating system instance is accessing the device.
-h or --help
displays help on command-line arguments. To view the man page, enter man fdasd.
-v or --version
displays the version of fdasd.