20.3. ローレベルフォーマットによる新規 DASD の準備
ディスクがオンラインになったら、/root ディレクトリーに戻り、このデバイスにローレベルフォーマットを行います。DASD の有効期間中に必要なローレベルフォーマットは、この 1 回のみです。
# 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 には最大 3 つのパーティションを作成できます。この例では、ディスク全体にまたがるパーティションを 1 つ作成します。
# 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 環境下の他のディスクと同様に使用できます。たとえば、ファイルシステム、LVM 物理ボリューム、またはそのパーティション (例: /dev/disk/by-path/ccw-0.0.4b2e-part1) にスワップ領域を作成できます。dasdfmt コマンドおよび fdasd コマンド以外では、絶対に DASD デバイス全体 (dev/dasdb) を使用しないでください。DASD 全体を使用する場合は、上述の fdasd の例で示すように、ドライブ全体にまたがるパーティションを 1 つ作成します。
たとえば /etc/fstab の既存のディスクエントリーの設定を壊さずに新しいディスクを後で追加するには、/dev/disk/by-path/ 配下で永続的なデバイスシンボリックリンクを使用します。