21.3. 准备使用低级格式化的新 DASD
磁盘在线后,返回 /root 目录并低级格式化该设备。这在 DASD 的整个生命周期中只需要 一 次:
# cd /root
# dasdfmt -b 4096 -d cdl -p /dev/disk/by-path/ccw-0.0.4b2e
Drive Geometry: 10017 Cylinders * 15 Heads = 150255 Tracks
I am going to format the device /dev/disk/by-path/ccw-0.0.4b2e in the following way:
Device number of device : 0x4b2e
Labelling device : yes
Disk label : VOL1
Disk identifier : 0X4B2E
Extent start (trk no) : 0
Extent end (trk no) : 150254
Compatible Disk Layout : yes
Blocksize : 4096
--->> ATTENTION! <<---
All data of that device will be lost.
Type "yes" to continue, no will leave the disk untouched: yes
cyl 97 of 3338 |#----------------------------------------------| 2%
当进度条达到结尾格式化完成时,dasdfmt 会打印以下输出:
Rereading the partition table...
Exiting...
现在,使用 fdasd 对 DASD 进行分区。您最多可在 DASD 中创建三个分区。在我们的示例中,我们创建一个覆盖整个磁盘的分区:
# fdasd -a /dev/disk/by-path/ccw-0.0.4b2e
reading volume label ..: VOL1
reading vtoc ..........: ok
auto-creating one partition for the whole disk...
writing volume label...
writing VTOC...
rereading partition table...
DASD 在线后(低级格式化后),它可以和 Linux 中的其它磁盘一样使用。例如:您可以在其分区(例如 /dev/disk/by-path/ccw-0.0.4b2e-part1)上创建文件系统、LVM 物理卷或交换空间。除了 dasdfmt 和 fdasd 命令,不要使用完整的 DASD 设备(dev/dasdb)。如果您想要使用整个 DASD,创建一个覆盖整个驱动器的分区,如上例中的 fdasd。
要在以后添加附加磁盘而不破坏现有磁盘条目,例如 /etc/fstab,请使用 /dev/disk/by-path/ 中的永久设备符号链接。