Before you begin
- The base component and the ECKD 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 ECKD
type device.
- You need to know the device bus-ID for your DASD.
About this task
If you format the DASD with the compatible disk layout,
you must create one, two, or three partitions. You can then use your
partitions as swap areas or to create a Linux file system.
Procedure
Perform these steps to prepare the DASD:
-
Issue lsdasd to find out if the device is online.
-
Format the device with the dasdfmt command. The formatting
process can take hours for large DASDs.
If you want to use the CMS disk layout, and your DASD is already
formatted with the CMS disk layout, skip this step.Tips:
- Use the largest possible block size, ideally 4096; the net capacity of an ECKD DASD decreases for smaller block sizes. For example, a DASD
formatted with a block size of 512 byte has only half of the net capacity of the same DASD
formatted with a block size of 4096 byte.
- For DASDs that have previously been formatted with the
cdl
or ldl
disk layout, use the dasdfmt quick
format mode.
- Use the -p option to display a progress bar.
Example: Assuming that
/dev/dasdzzz is a valid device node for
0.0.b100:# dasdfmt -b 4096 -p /dev/dasdzzz
- Proceed according to your chosen disk layout:
- Depending on the
intended use of each partition, create a file system on the partition
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).
Note: Do not make the block size of
the file system smaller than the block size that was used for formatting
the disk with the dasdfmt command.
Tip: Use the same block size for the file
system that has been used for formatting.
Example: # mke2fs -j -b 4096 /dev/dasdzzz1
- Or define the partition as a swap space with the mkswap command
(see the man page for details).
- Mount each file system to the mount point of your choice
in Linux and enable your
swap partitions.
Example: To
mount a file system in a partition
/dev/dasdzzz1 to
a mount point
/mnt and to enable a swap partition
/dev/dasdzzz2 issue:
# mount /dev/dasdzzz1 /mnt
# swapon /dev/dasdzzz2
If a block
device supports barrier requests, journaling file systems like ext3
or reiserfs can use this feature to achieve better
performance and data integrity. Barrier requests are supported for
the DASD device driver and apply to ECKD,
FBA, and the DIAG discipline.
Write barriers are used by file
systems and are enabled as a file-system specific option. For example,
barrier support can be enabled for an ext3 file system by mounting
it with the option -o barrier=1:
# mount -o barrier=1 /dev/dasdzzz1 /mnt