fdasd – Partition a DASD

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 diagram
>>-fdasd--+-----+--+------+--+--------------------------+------->
          +- -s-+  '- -C -'  +- -a-+------------------+-+   
          '- -r-'            |     +- -k--------------+ |   
                             |     |              (1) | |   
                             |     '- -l <volser>-----' |   
                             +- -c <conf_file>----------+   
                             +- -i----------------------+   
                             '- -p----------------------'   

>-- <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:
-h or --help
displays help on command line arguments.
-v or --version
displays the version of fdasd.
-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. Keeping the serial number is useful, for example, if the volume serial number was written with a z/VM® tool and should not be overwritten.
-l <volser> or --label <volser>
specifies the volume serial number (see VOLSER).
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 operating systems (z/OS®).

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

-c <conf_file> or --config <conf_file>
creates several partitions in non-interactive mode, according to specifications in the plain-text 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 disk and, correspondingly, the keyword last for the last possible track on 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.
<node>
specifies the device node of the DASD you want to partition, for example, /dev/dasdzzz.
-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.