システムディスクには、ルート (/) ファイルシステムと /usr ファイルシステムのうちのいずれか、またはその両方が入っています。この 2 つのファイルシステムのどちらかが入っているディスクが損傷した場合、復元方法は次の 2 つがあります。
Solaris 環境全体をインストールし直す。
システムディスクを交換し、ファイルシステムをバックアップメディアから復元する。
二次ディスクには、ルート (/) ファイルシステムも /usr ファイルシステムも入っていません。通常はユーザーファイル用の領域が入っています。システムに二次ディスクを追加してディスク容量を増やしたり、損傷した二次ディスクを交換できます。システム上の二次ディスクを交換すると、古いディスクのデータを新しいディスク上に復元できます。
この手順は、システムがシャットダウンされていることを前提としています。
損傷したシステムディスクをシステムから外します。
追加しようとするディスクに、システム上の他のデバイスとは異なるターゲット番号が設定されているかどうかを確認します。
通常は、ディスクの背面にそのための小型スイッチが付いています。
交換用のディスクをシステムに正しく接続します。
インストールについての詳細は、ディスクのハードウェアインストールガイドを参照してください。
ローカルとリモートのどちらの Solaris CD (または DVD) からブートするかに応じて、手順 a から e を実行します。
ネットワークからブートする場合は、手順 a をスキップします。
ローカルの Solaris CD または DVD からブートする場合は、ドライブに Solaris 9 Installation CD または DVD を挿入します。
Solaris ブートフロッピーディスクを主フロッピーディスクドライブ (DOS ドライブ A) に挿入します。
Type any key to continue プロンプトが表示されたら、任意のキーを押してシステムをリブートします。システムがシャットダウンされている場合は、リセットボタンを押してシステムを再起動します。
数分後に Boot Solaris 画面が表示されます。
Boot Solaris 画面から、ブートデバイスを CD-ROM ドライブにするか、ネットワークにするかを選択します。
Current Boot Parameters 画面が表示されます。
システムをシングルユーザーモードでブートします。
Select the type of installation: b -s |
数分後に、スーパーユーザーのプロンプト (#) が表示されます。
システムのブート後に、fdisk パーティションを作成できます。x86: Solaris fdisk パーティションを作成する方法を参照してください。
スーパーユーザーになるか、同等の役割を引き受けます。
ディスクが Solaris ソフトウェアでサポートされない場合は、ハードウェアに添付された説明書に従って、そのディスクのデバイスドライバを追加します。
システムのブート時に読み込まれる /reconfigure ファイルを作成します。
# touch /reconfigure |
/reconfigure ファイルを作成すると、電源を入れるとき、または後からシステムをブートするときに、SunOS ソフトウェアは新しくインストールされた周辺デバイスの有無をチェックします。
システムをシャットダウンします。
# shutdown -i0 -gn -y |
-i0 |
システムを実行レベル 0 (電源切断状態) にする。 |
-g n |
ログインしているユーザーに、n 秒後にシステムのシャットダウンを開始することを通知する。 |
-y |
ユーザーの介入なしでコマンドを実行するように指定する。 |
Type any key to continue プロンプトが表示されます。
システムとすべての外部周辺デバイスの電源を切ります。
追加しようとするディスクに、システム上の他のデバイスとは異なるターゲット番号が設定されているかどうかを確認します。
通常は、ディスクの背面にそのための小型スイッチが付いています。
ディスクがシステムに正しく接続されているかどうかを確認します。
インストールについての詳細は、ディスクのハードウェアインストールガイドを参照してください。
すべての外部周辺デバイスの電源を入れます。
システムの電源を入れます。
システムがブートし、ログインプロンプトが表示されます。
システムのブート後に、fdisk パーティションを作成できます。x86: Solaris fdisk パーティションを作成する方法を参照してください。
次のガイドラインに従って fdisk パーティションを設定してください。
ディスクは最大 4 つの fdisk パーティションに分割できます。いずれか 1 つのパーティションを Solaris パーティションにしなければなりません。
Solaris パーティションをディスク上でアクティブなパーティションにしなければなりません。アクティブなパーティションとは、システム起動時にデフォルトでオペレーティングシステムがブートされるパーティションです。
Solaris の fdisk パーティションは、シリンダ境界から開始しなければなりません。
最初のディスクの先頭のセクターには、ブート情報 (マスターブートレコードを含む) が書き込まれるので、最初のディスクの 1 番目の fdisk パーティションとして、Solaris の fdisk パーティションを作成する場合は、ディスクのシリンダ 0 ではなくシリンダ 1 から開始しなければなりません。
Solaris の fdisk パーティションにディスク全体を使用するか、それより小さくして DOS パーティションに使用する余地を残すことができます。また、既存のパーティションに影響を与えずに、ディスク上に新しい fdisk パーティションを作成できます (それを作成する余地がある場合)。
Solaris スライスはパーティションと呼ばれることがあります。このマニュアルでは「スライス」という用語を使用しますが、Solaris のマニュアルやプログラムによっては、スライスを「パーティション」と呼ぶ場合があります。
混乱を避けるために、Solaris のマニュアルでは、 fdisk パーティション (x86 版 Solaris でのみサポート) と、スライスやパーティションと呼ばれる Solaris の fdisk パーティションを区別しています。
スーパーユーザーになるか、同等の役割を引き受けます。
# format |
詳細は、format(1M) のマニュアルページを参照してください。
画面に表示されたリストから、Solaris fdisk パーティションを作成するディスクの番号を入力します。
Specify disk (enter its number): disk-number |
disk-number は、Solaris fdisk パーティションを作成するディスクの番号です。
fdisk メニューを選択します。
format> fdisk |
表示される fdisk メニューは、fdisk パーティションがすでにディスク上に存在しているかどうかによって異なります。次の表を使用して、次に行う手順を決定してください。
目的の作業 |
次の手順 |
参照先 |
---|---|---|
ディスク全体を占有する Solaris fdisk パーティションを作成する。 |
手順 6 | |
Solaris fdisk パーティションを作成し、既存の Solaris 以外の fdisk パーティションは変更しない。 |
手順 7 | |
Solaris fdisk パーティションと、Solaris 以外の fdisk パーティションを追加作成する。 |
手順 7 |
ディスク全体にまたがる Solaris fdisk パーティションを作成してそれをアクティブにするには、プロンプトで y を入力します。次に、手順 14 に進みます。
The recommended default partitioning for your disk is: a 100% “SOLARIS System” partition. To select this, please type “y”. To partition your disk differently, type “n” and the “fdisk” program will let you select other partitions. y |
ディスク全体にまたがる Solaris fdisk パーティションを作成しない場合は、プロンプトで n を入力します。
To select this, please type "y". To partition your disk differently, type "n" and the "fdisk" program will let you select other partitions. n Total disk size is 2694 cylinders Cylinder size is 765 (512 byte) blocks Cylinders Partition Status Type Start End Length % ========= ====== ======== ===== === ====== === THERE ARE NO PARTITIONS CURRENTLY DEFINED SELECT ONE OF THE FOLLOWING: 1. Create a partition 2. Change Active (Boot from) partition 3. Delete a partition 4. Exit (Update disk configuration and exit) 5. Cancel (Exit without updating disk configuration) Enter Selection: |
「1. Create a partition」を選択し、fdisk パーティションを作成します。
Total disk size is 2694 cylinders Cylinder size is 765 (512 byte) blocks Cylinders Partition Status Type Start End Length % ========= ====== ======== ===== === ====== === THERE ARE NO PARTITIONS CURRENTLY DEFINED SELECT ONE OF THE FOLLOWING: 1. Create a partition 2. Change Active (Boot from) partition 3. Delete a partition 4. Exit (Update disk configuration and exit) 5. Cancel (Exit without updating disk configuration) Enter Selection: 1 |
「1(=Solaris)」を選択して、Solaris fdisk パーティションを作成します。
Indicate the type of partition you want to create (1=SOLARIS, 2=UNIX, 3=PCIXOS, 4=Other, 8=DOSBIG) (5=DOS12, 6=DOS16, 7=DOSEXT, 0=Exit) ? 1 |
Solaris fdisk パーティション用に割り当てるディスクのパーセントを指定します。このパーセントを計算するときには、既存の fdisk パーティションのサイズを考慮してください。
Indicate the percentage of the disk you want this partition to use (or enter "c" to specify in cylinders). nn |
プロンプトで y を入力して、Solaris fdisk パーティションをアクティブにします。
Do you want this to become the Active partition? If so, it will be activated each time you reset your computer or when you turn it on again. Please type "y" or "n". y |
fdisk パーティションがアクティブになった後、Enter Selection: プロンプトが表示されます。
別の fdisk パーティションを作成する場合は、「1. Create a partition」を選択します。
fdisk パーティションを作成する手順については、手順 9 〜 11 を参照してください。
ディスク構成を更新し、Selection メニューから fdisk メニューに戻ります。
Selection: 4 |
label コマンドを使用して、ディスクに新しいラベルを付けます。
WARNING: Solaris fdisk partition changed - Please relabel the disk format> label Ready to label disk, continue? yes format> |
format メニューを終了します。
format> quit |
ディスク上に Solaris fdisk パーティションを作成し終わったら、ディスク上にスライスを作成できます。x86: ディスクスライスとディスクラベルを作成する方法を参照してください。
次の例は、format の fdisk オプションを使用して、ディスク全体にまたがる Solaris fdisk パーティションを作成する方法を説明しています。
# format Searching for disks...done AVAILABLE DISK SELECTIONS: 0. c0d0 <DEFAULT cyl 2466 alt 2 hd 16 sec 63> /pci@0,0/pci-ide@7,1/ide@0/cmdk@0,0 1. c0d1 <DEFAULT cyl 522 alt 2 hd 32 sec 63> /pci@0,0/pci-ide@7,1/ide@0/cmdk@1,0 2. c1d0 <DEFAULT cyl 13102 alt 2 hd 16 sec 63> /pci@0,0/pci-ide@7,1/ide@1/cmdk@0,0 Specify disk (enter its number): 0 selecting c0d0 Controller working list found [disk formatted] format> fdisk The recommended default partitioning for your disk is: a 100% "SOLARIS System" partition. To select this, please type "y". To partition your disk differently, type "n" and the "fdisk" program will let you select other partitions. y WARNING: Solaris fdisk partition changed - Please relabel the disk format> label Ready to label disk, continue? yes format> quit |
次の例は、DOS-BIG fdisk パーティションがすでに存在しているディスクに、Solaris fdisk パーティションを作成する方法を説明しています。
format> fdisk Total disk size is 2694 cylinders Cylinder size is 765 (512 byte) blocks Cylinders Partition Status Type Start End Length % ========= ====== ======== ===== === ====== === 1 DOS-BIG 1 538 538 20 SELECT ONE OF THE FOLLOWING: 1. Create a partition 2. Change Active (Boot from) partition 3. Delete a partition 4. Exit (Update disk configuration and exit) 5. Cancel (Exit without updating disk configuration) Enter Selection: 1 Indicate the type of partition you want to create (1=SOLARIS, 2=UNIX, 3=PCIXOS, 4=Other, 8=DOSBIG) (5=DOS12, 6=DOS16, 7=DOSEXT, 0=Exit) ?1 Indicate the percentage of the disk you want this partition to use (or enter "c" to specify in cylinders). 80 Do you want this to become the Active partition? If so, it will be activated each time you reset your computer or when you turn it on again. Please type "y" or "n". y Partition 2 is now the Active partition Total disk size is 2694 cylinders Cylinder size is 765 (512 byte) blocks Cylinders Partition Status Type Start End Length % ========= ====== ======== ===== === ====== === 1 DOS-BIG 1 538 538 20 2 Active SOLARIS 539 2693 2155 80 SELECT ONE OF THE FOLLOWING: 1. Create a partition 2. Change Active (Boot from) partition 3. Delete a partition 4. Exit (Update disk configuration and exit) 5. Cancel (Exit without updating disk configuration) Enter Selection: Selection: 4 WARNING: Solaris fdisk partition changed - Please relabel the disk format> label Ready to label disk, continue? yes format> q |
次の例は、Solaris fdisk パーティションと DOSBIG fdisk パーティションを作成する方法を説明しています。
format> fdisk The recommended default partitioning for your disk is: a 100% "SOLARIS System" partition. To select this, please type "y". To partition your disk differently, type "n" and the "fdisk" program will let you select other partitions. n Total disk size is 2694 cylinders Cylinder size is 765 (512 byte) blocks Cylinders Partition Status Type Start End Length % ========= ====== ======== ===== === ====== === THERE ARE NO PARTITIONS CURRENTLY DEFINED SELECT ONE OF THE FOLLOWING: 1. Create a partition 2. Change Active (Boot from) partition 3. Delete a partition 4. Exit (Update disk configuration and exit) 5. Cancel (Exit without updating disk configuration) Enter Selection: 1 Indicate the type of partition you want to create (1=SOLARIS, 2=UNIX, 3=PCIXOS, 4=Other, 8=DOSBIG) (5=DOS12, 6=DOS16, 7=DOSEXT, 0=Exit) ?8 Indicate the percentage of the disk you want this partition to use (or enter "c" to specify in cylinders). 20 Do you want this to become the Active partition? If so, it will be activated each time you reset your computer or when you turn it on again. Please type "y" or "n". n Total disk size is 2694 cylinders Cylinder size is 765 (512 byte) blocks Cylinders Partition Status Type Start End Length % ========= ====== ======== ===== === ====== === 1 DOS-BIG 1 538 538 20 SELECT ONE OF THE FOLLOWING: 1. Create a partition 2. Change Active (Boot from) partition 3. Delete a partition 4. Exit (Update disk configuration and exit) 5. Cancel (Exit without updating disk configuration)Enter Selection: 1 Indicate the type of partition you want to create (1=SOLARIS, 2=UNIX, 3=PCIXOS, 4=Other, 8=DOSBIG) (5=DOS12, 6=DOS16, 7=DOSEXT, 0=Exit) ?1 Indicate the percentage of the disk you want this partition to use (or enter "c" to specify in cylinders). 80 Do you want this to become the Active partition? If so, it will be activated each time you reset your computer or when you turn it on again. Please type "y" or "n". y Partition 2 is now the Active partition Total disk size is 2694 cylinders Cylinder size is 765 (512 byte) blocks Cylinders Partition Status Type Start End Length % ========= ====== ======== ===== === ====== === 1 DOS-BIG 1 538 538 20 2 Active SOLARIS 539 2693 2155 80 SELECT ONE OF THE FOLLOWING: 1. Create a partition 2. Change Active (Boot from) partition 3. Delete a partition 4. Exit (Update disk configuration and exit) 5. Cancel (Exit without updating disk configuration) Enter Selection: 4 format> q |
スーパーユーザーになるか、同等の役割を引き受けます。
# format |
画面に表示されるリストから、パーティション分割をし直したいディスクの番号を入力します。
Specify disk (enter its number): disk-number |
disk-number は、パーティションの再分割を実行するディスクの番号です。
partition メニューを選択します。
format> partition |
現在のパーティション (スライス) テーブルを表示します。
partition> print |
変更作業を開始します。
partition> modify |
ディスクをすべて free hog に設定します。
Choose base (enter number) [0]? 1 |
free hog スライスの詳細は、free hog スライスの使用方法を参照してください。
続行するかどうかを尋ねるプロンプトが表示されたら、yes と応答して新しいパーティションテーブルを作成します。
Do you wish to continue creating a new partition table based on above table[yes]? yes |
プロンプトが表示されたら、free hog パーティション (スライス) と各スライスのサイズを指定します。
システムディスクを追加するときは、次のスライスを設定しなければなりません。
ルート (スライス 0)、スワップ (スライス 1) (必須) および
/usr (スライス 6)
スライスの情報を設定すると、新しいパーティションテーブルが表示されます。
プロンプトが表示されたら yes と応答して、表示されたパーティションテーブルを現在のパーティションテーブルにします。
Okay to make this the current partition table[yes]? yes |
表示されたパーティションテーブルが希望どおりでないために変更したい場合は、no と応答して 手順 6 に戻ります。
パーティションテーブルに名前を付けます。
Enter table name (remember quotes): "partition-name" |
partition-name には、新しいパーティションテーブルの名前を指定します。
新しいディスク上でスライスを割り当て終ったら、新しいパーティションテーブルを使用してディスクにラベルを付けます。
Ready to label disk, continue? yes |
partition メニューを終了します。
partition> quit |
新しいディスクラベルを検査します。
format> verify |
format メニューを終了します。
format> quit |
ディスクスライスとディスクラベルを作成し終ったら、ディスク上にファイルシステムを作成できます。x86: ファイルシステムを作成する方法を参照してください。
スーパーユーザーになるか、同等の役割を引き受けます。
スライスごとにファイルシステムを作成します。
# newfs /dev/rdsk/cwtxdysz |
/dev/rdsk/cwt xdysz は、作成するファイルシステム用の raw デバイスです。
newfs コマンドの詳細は、第 39 章「ファイルシステムの作成 (手順)」または newfs(1M) のマニュアルページを参照してください。
マウントして、新規ファイルシステムを確認します。
# mount /dev/dsk/cwtxdysz /mnt # ls /mnt lost+found |
追加するディスク |
作業 |
---|---|
システムディスク |
ディスク上にルート (/) と /usr のファイルシステムを復元する必要がある。第 49 章「ファイルとファイルシステムの復元 (手順)」を参照。 ルート (/) と /usr ファイルシステムの復元後、ブートブロックをインストールする。x86: システムディスクにブートブロックをインストールする方法を参照。 |
二次ディスク |
新しいディスク上にファイルシステムを復元しなければならないことがある。第 49 章「ファイルとファイルシステムの復元 (手順)」を参照。
新しいディスク上にファイルシステムを復元しない場合は、二次ディスクを追加する作業が終わったことになる。ファイルシステムをユーザーが利用できるようにする方法については、第 40 章「ファイルシステムのマウントとマウント解除 (手順)」を参照。 |
スーパーユーザーになるか、同等の役割を引き受けます。
# installboot /usr/platform/`uname -i`/lib/fs/ufs/pboot /usr/platform/`uname -i` /lib/fs/ufs/bootblk /dev/rdsk/cwtxdys2 |
/usr/platform/`uname -i`/lib/fs/ufs/pboot |
パーティションのブートファイル |
/usr/platform/`uname -i`/lib/fs/ufs/bootblk |
ブートブロックコード |
/dev/rdsk/ cwtxdys2 |
ディスク全体を表す raw デバイス名 |
システムをリブートし、レベル 3 で実行することによって、ブートブロックがインストールされていることを確認します。
# init 6 |
# installboot /usr/platform/i86pc/lib/fs/ufs/pboot /usr/platform/i86pc/lib/fs/ufs/bootblk /dev/rdsk/c0t6d0s2 |