Preparing an FBA-type DASD for use

6.10 LPAR mode z/VM guest KVM guest

Before you can use an FBA-type DASD as a disk for Linux® on IBM® Z, you must create a file system or define a swap space.

Before you begin

  • The base component and the FBA component of the DASD device driver must have been compiled into the kernel or have been loaded as modules.
  • The DASD device driver must have recognized the device as an FBA device.
  • You must know the device bus-ID or the device node through which the DASD can be addressed. The DASD device nodes have the form /dev/dasd<x>, where <x> can be one to four lowercase alphabetic characters.

Procedure

Perform these steps to prepare the DASD:

  1. Assure that device nodes exist to address the DASD as a whole and the partition.
    Example: To check if the device nodes for a DASD dasdzzy exist, change to /dev and issue:
    # ls dasdzzy*
    If necessary, create the device nodes. For example, issue:
    # mknod -m 660 /dev/dasdzzy b 94 73104
    # mknod -m 660 /dev/dasdzzy1 b 94 73105
    The following table shows the mapping of device names and minor numbers:
    Table 1. Mapping of DASD names to minor numbers
    Name for device as a whole Minor number for device as a whole Number of devices
    From To From To
    dasda dasdz 0 100 26
    dasdaa dasdzz 104 2804 676
    dasdaaa dasdzzz 2808 73108 17,576
    dasdaaaa dasdnwtl 73112 1048572 243,866
    Total number of devices: 262,144
  2. Depending on the intended use of the partition, create a file system on it or define it as a swap space.
    • Either create a file system of your choice, for example, with the Linux mke2fs command (see the man page for details).
      Example:
      # mke2fs -b 4096 /dev/dasdzzy1
    • Or define the partition as a swap space with the mkswap command (see the man page for details).
  3. Mount the file system to the mount point of your choice in Linux or enable your swap partition.
    Tip: Mount file systems on FBA devices that are backed by z/VM® VDISKs with the discard mount option. This option frees memory when data is deleted from the device.
    Examples:
    • To mount a file system in a partition /dev/dasdzzy1, issue:
      # mount /dev/dasdzzy1 /mnt
    • To mount a VDISK-backed file system in a partition /dev/dasdzzx1, and use the discard option to free memory when data is deleted, issue:
      # mount -o discard /dev/dasdzzx1 /mnt

What to do next

To access FBA devices, use the DIAG access method.