| ナビゲーションリンクをスキップ | |
| 印刷ビューの終了 | |
|
Solaris のシステム管理 (デバイスとファイルシステム) Oracle Solaris 10 8/11 Information Library (日本語) |
14. Oracle Solaris iSCSI ターゲットおよびイニシエータの構成 (手順)
22. UFS ファイルシステムのバックアップと復元 (概要)
23. UFS ファイルとファイルシステムのバックアップ (手順)
一般に、ディスクにラベルを付ける操作は、システムのインストール時、または新しいディスクを使用するときに行います。ディスクラベルが破損したときは、新しくラベルを付け直す必要があります。ディスクラベルの破損は、電源障害が発生した場合などに起こります。
format ユーティリティーは、ラベルが付いていない SCSI ディスクを自動構成しようとします。format ユーティリティーがラベルの付いていないディスクを自動構成できる場合、次のようなメッセージが表示されます。
c2t3d0: configured with capacity of 136.73GB
次の処理を行う手順について説明します。
VTOC または EFI ラベルを使って、2T バイトのサイズのディスクにラベルを付ける。
EFI ラベルを使って、2T バイトを超えるサイズのディスクにラベルを付ける。
2T バイト未満のディスクに EFI ラベルを付ける方法については、例 11-5 を参照してください。
# format
番号付きのディスクのリストが表示されます。
Specify disk (enter its number):1
format ユーティリティーでディスクタイプが認識されたら、次の手順はバックアップラベルを検索 してディスクにラベルを付けることです。バックアップラベルを使用してディスクにラベルを付けると、ディスクタイプとジオメトリだけでなく、正しいパーティション情報を使用してディスクラベルが作成されます。
ディスクが正常に構成されていて、ラベルが付いていない場合は、手順 5 に進みます。
format ユーティリティーにより、ディスクラベルを付けるかを尋ねるプロンプトが表示されます。
ラベル付きディスクのディスクタイプを変更する場合、またはこのディスクを format ユーティリティーで自動構成できなかった場合は、手順 6 に進んでディスクタイプを設定し、ラベルを付けます。
Disk not labeled. Label it now? y
これでディスクラベルが作成されました。手順 10 に進んで format ユーティリティーを終了します。
format> type
Available Drive Types メニューが表示されます。
Specify disk type (enter its number)[12]: 12
または、0 を選択して SCSI-2 ディスクを自動構成します。
Disk not labeled. Label it now? y
ディスクラベルが付いている場合は、次のメッセージが表示されます。
Ready to label disk, continue? y
format> verify
format> q #
例 11-4 ディスクラベルを作成する
次の例では、36G バイトのディスクを自動構成してラベルを付ける方法を示します。
# format
AVAILABLE DISK SELECTIONS:
0. c0t0d0 <SUN36G cyl 24620 alt 2 hd 27 sec 107>
/pci@1c,600000/scsi@2/sd@0,0
1. c0t1d0 <SEAGATE-ST336607LSUN36G-0307-33.92GB>
/pci@1c,600000/scsi@2/sd@1,0
2. c0t2d0 <SEAGATE-ST336607LSUN36G-0507-33.92GB>
/pci@1c,600000/scsi@2/sd@2,0
3. c0t3d0 <SEAGATE-ST336607LSUN36G-0507-33.92GB>
/pci@1c,600000/scsi@2/sd@3,0
Specify disk (enter its number): 3
c0t3d0: configured with capacity of 33.92GB
Disk not labeled. Label it now? yes
format> verify
format> q
#例 11-5 ディスクに EFI ラベルを付ける
次に、format -e コマンドを使ってディスクに EFI ラベルを付ける例を示します。階層化されたソフトウェア製品が EFI ラベル付きディスクのシステムでも動作することを確認しておいてください。EFI ラベルの一般的な制限事項については、「EFI ディスクラベルの制限」を参照してください。
# format -e
Searching for disks...done
AVAILABLE DISK SELECTIONS:
0. c2t0d0 <SUN72G cyl 14087 alt 2 hd 24 sec 424>
/pci@1c,600000/scsi@2/sd@0,0
1. c2t1d0 <SUN72G cyl 14087 alt 2 hd 24 sec 424>
/pci@1c,600000/scsi@2/sd@1,0
2. c2t2d0 <FUJITSU-MAP3147N SUN146G-0501-136.73GB>
/pci@1c,600000/scsi@2/sd@2,0
3. c2t3d0 <FUJITSU-MAP3147N SUN146G-0501-136.73GB>
/pci@1c,600000/scsi@2/sd@3,0
Specify disk (enter its number): 3
selecting c2t3d0
[disk formatted]
format> label
[0] SMI Label
[1] EFI Label
Specify Label type[0]: 1
Ready to label disk, continue? yes
format> quit例 11-6 EFI ラベル付きディスクを SMI ラベル付きディスクに変更する
次の例は、format - e コマンドを使用して、EFI ラベル付きディスクを ZFS ルートプールで使用可能な SMI ラベル付きディスクに変更する方法を示したものです。
# format -e
Searching for disks...done
AVAILABLE DISK SELECTIONS:
0. c2t0d0 <SUN72G cyl 14087 alt 2 hd 24 sec 424>
/pci@1c,600000/scsi@2/sd@0,0
1. c2t1d0 <SUN72G cyl 14087 alt 2 hd 24 sec 424>
/pci@1c,600000/scsi@2/sd@1,0
2. c2t2d0 <FUJITSU-MAP3147N SUN146G-0501-136.73GB>
/pci@1c,600000/scsi@2/sd@2,0
3. c2t3d0 <FUJITSU-MAP3147N SUN146G-0501-136.73GB>
/pci@1c,600000/scsi@2/sd@3,0
Specify disk (enter its number): 3
selecting c2t0d0
[disk formatted]
format> label
[0] SMI Label
[1] EFI Label
Specify Label type[1]: 0
Ready to label disk, continue? yes
さらに、デフォルトのパーティションテーブルをチェックし、テーブルがルートプールスライスに最適なものになっていること、つまり、ディスク領域の全体がスライス 0 に含まれていることを確認してください。スライス 0 のサイズを増やす方法については、次の手順を参照してください。
format> partition
partition> print
Current partition table (default):
Total disk cylinders available: 14085 + 2 (reserved cylinders)
Part Tag Flag Cylinders Size Blocks
0 root wm 1 - 13 129.19MB (13/0/0) 264576
1 swap wu 14 - 26 129.19MB (13/0/0) 264576
2 backup wu 0 - 14086 136.71GB (14087/0/0) 286698624
3 unassigned wm 0 0 (0/0/0) 0
4 unassigned wm 0 0 (0/0/0) 0
5 unassigned wm 0 0 (0/0/0) 0
6 usr wm 27 - 14084 136.43GB (14058/0/0) 286108416
7 unassigned wm 0 0 (0/0/0) 0
8 boot wu 0 - 0 9.94MB (1/0/0) 20352
9 alternates wm 0 0 (0/0/0) 0
partition> modify
Select partitioning base:
0. Current partition table (default)
1. All Free Hog
Choose base (enter number) [0]? 1
Part Tag Flag Cylinders Size Blocks
0 root wm 0 0 (0/0/0) 0
1 swap wu 0 0 (0/0/0) 0
2 backup wu 0 - 14084 136.69GB (14085/0/0) 286657920
3 unassigned wm 0 0 (0/0/0) 0
4 unassigned wm 0 0 (0/0/0) 0
5 unassigned wm 0 0 (0/0/0) 0
6 usr wm 0 0 (0/0/0) 0
7 unassigned wm 0 0 (0/0/0) 0
8 boot wu 0 - 0 9.94MB (1/0/0) 20352
9 alternates wm 0 0 (0/0/0) 0
Do you wish to continue creating a new partition
table based on above table[yes]? yes
Free Hog partition[6]? 0
Enter size of partition '1' [0b, 0c, 0.00mb, 0.00gb]:
Enter size of partition '3' [0b, 0c, 0.00mb, 0.00gb]:
Enter size of partition '4' [0b, 0c, 0.00mb, 0.00gb]:
Enter size of partition '5' [0b, 0c, 0.00mb, 0.00gb]:
Enter size of partition '6' [0b, 0c, 0.00mb, 0.00gb]:
Enter size of partition '7' [0b, 0c, 0.00mb, 0.00gb]:
Part Tag Flag Cylinders Size Blocks
0 root wm 1 - 14084 136.68GB (14084/0/0) 286637568
1 swap wu 0 0 (0/0/0) 0
2 backup wu 0 - 14084 136.69GB (14085/0/0) 286657920
3 unassigned wm 0 0 (0/0/0) 0
4 unassigned wm 0 0 (0/0/0) 0
5 unassigned wm 0 0 (0/0/0) 0
6 usr wm 0 0 (0/0/0) 0
7 unassigned wm 0 0 (0/0/0) 0
8 boot wu 0 - 0 9.94MB (1/0/0) 20352
9 alternates wm 0 0 (0/0/0) 0
Okay to make this the current partition table[yes]? yes
Enter table name (remember quotes): "c2t0d0"
Ready to label disk, continue? yes
partition> quit
format> quit例 11-7 複数のディスクにラベルを付ける
prtvtoc コマンドと fmthard コマンドを使用すると、同じディスクジオメトリを持つ複数のディスクにラベルを付けることができます。
この for ループをスクリプト内で使用して、1 台のディスクからディスクラベルをコピーし、複数のディスク上で複製します。
# for i in x y z
> do
> prtvtoc /dev/rdsk/cwtxdysz | fmthard -s - /dev/rdsk/cwt${i}d0s2
> done
この例では、ディスクラベルがディスク c2t0d0s0 からほかの 4 台のディスクにコピーされます。
# for i in 1 2 3 5
> do
> prtvtoc /dev/rdsk/c2t0d0s0 | fmthard -s - /dev/rdsk/c2t${i}d0s2
> done
fmthard: New volume table of contents now in place.
fmthard: New volume table of contents now in place.
fmthard: New volume table of contents now in place.
fmthard: New volume table of contents now in place.
ディスクラベル情報の検査には、prtvtoc コマンドを使用します。ディスクラベルと prtvtoc コマンドの出力結果の詳しい説明については、第 10 章ディスクの管理 (概要)を参照してください。
# prtvtoc /dev/rdsk/device-name
device-name には、検査する raw ディスクデバイスを指定してください。
例 11-8 ディスクラベルを検査する
次に示すのは、VTOC ラベル付きディスクのディスクラベル情報を表示する例です。
# prtvtoc /dev/rdsk/c2t3d0s0
* /dev/rdsk/c2t3d0s0 partition map
*
* Dimensions:
* 512 bytes/sector
* 848 sectors/track
* 24 tracks/cylinder
* 20352 sectors/cylinder
* 14089 cylinders
* 14087 accessible cylinders
*
* Flags:
* 1: unmountable
* 10: read-only
*
* First Sector Last
* Partition Tag Flags Sector Count Sector Mount Directory
0 2 00 0 286698624 286698623
2 5 01 0 286698624 286698623
次に示すのは、EFI ラベル付きディスクのディスクラベル情報を表示する例です。
# prtvtoc /dev/rdsk/c2t3d0s0
* /dev/rdsk/c2t3d0s0 partition map
*
* Dimensions:
* 512 bytes/sector
* 848 sectors/track
* 24 tracks/cylinder
* 20352 sectors/cylinder
* 14089 cylinders
* 14087 accessible cylinders
*
* Flags:
* 1: unmountable
* 10: read-only
*
* First Sector Last
* Partition Tag Flags Sector Count Sector Mount Directory
0 2 00 0 286698624 286698623
2 5 01 0 286698624 286698623