Solstice DiskSuite 4.2.1 ユーザーズガイド

x86: ルート (/) からミラーを作成する方法 (コマンド行)

この作業は、x86 システム上でルート (/) をミラー化するために使用します。


注 -

ルート (/) をミラー化するとき、一次サブミラーに障害が発生した場合にシステムをリブートするときのために、二次ルートのスライス名を記録しておくことが不可欠です。この情報は、動作できなくなるかもしれないシステム上に記録するのではなく、紙などに書き留めておきます。代替ブートデバイスの記録と代替ブートデバイスからのブート操作の詳細については、第 7 章「システムのトラブルシューティング」を参照してください。


この作業での手順を次に示します。


注 -

IDE ドライブ上にルート (/) があるときはミラー化することはできません。


次の作業では、代替ディスクは c0t1d0 であるとします。

Solaris パーティションの作成

次の手順は、x86 システム上に Solaris パーティションを作成するために使用します。

  1. fdisk(1M) コマンドを使用して、ディスクパーティションを作成する。


    # fdisk /dev/rdsk/c0t1d0p0
    
    1. fdisk(1M) を初めて実行する場合は、次のように表示されます。


          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.
    2. 以前 fdisk(1M) を実行したことがある場合は、次のようなメニューが表示されます。


                  Total disk size is 1855 cylinders
                  Cylinder size is 1110 (512 byte) blocks
       
          Partition    Status    Type        Start    End    Length    %
          =========    ======    ========    =====    ===    ======   ===
              1        Active    SOLARIS         1   1854     1854    100
       
       
          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:
  2. メニュー項目を選択して、ルート (/) ミラー用に十分な大きさの Solaris パーティションがあることを確認する。

    この Solaris パーティションは、ルート (/) スライスを保持するために必要なサイズより 5 シリンダ分大きくします。

    Solaris パーティションがアクティブであることを確認します。そうでない場合、ここからブートすることはできません。

  3. Solaris パーティション上で format(1M) コマンドを実行し、ルート (/) ミラー用のスライスを作成する。


    # format
    Searching for disks...done
     
    AVAILABLE DISK SELECTIONS:
           0. c0t0d0 <DEFAULT cyl 2676 alt 2 hd 9 sec 85>
              /eisa/ncrs@8000,0/cmdk@0,0
           1. c1t1d0 <DEFAULT cyl 1865 alt 2 hd 7 sec 80>
              /eisa/eha@1000,0/cmdk@1,0
           2. c1t2d0 <DEFAULT cyl 1461 alt 2 hd 9 sec 64>
              /eisa/eha@1000,0/cmdk@2,0
           3. c1t3d0 <DEFAULT cyl 1461 alt 2 hd 9 sec 64>
              /eisa/eha@1000,0/cmdk@3,0
           4. c1t4d0 <DEFAULT cyl 1865 alt 2 hd 7 sec 80>
              /eisa/eha@1000,0/cmdk@4,0
    Specify disk (enter its number): 1
     
    selecting c1t1d0: ABCDEFG
    [disk formatted]
     
    FORMAT MENU:
       disk          - select a disk
       type          - select (define) a disk type
       partition     - select (define) a partition table
       current       - describe the current disk
       format        - format and analyze the disk
       fdisk         - run the fdisk program
       repair        - repair a defective sector
       label         - write label to the disk
       analyze       - surface analysis
       defect        - defect list management
       backup        - search for backup labels
       verify        - read and display labels
       save          - save new disk/partition definitions
       inquiry       - show vendor, product and revision
       volname       - set 8-character volume name
       quit
  4. partition を選択して、パーティションを定義する。


    format> partition
     
    PARTITION MENU:
            0      - change `0' partition
            1      - change `1' partition
            2      - change `2' partition
            3      - change `3' partition
            4      - change `4' partition
            5      - change `5' partition
            6      - change `6' partition
            7      - change `7' partition
            select - select a predefined table
            modify - modify a predefined partition table
            name   - name the current table
            print  - display the current table
            label  - write partition map and label to the disk
            quit
    partition> 0
    Part    Tag       Flag   Cylinders      Size    Blocks
      0   unassigned   wm      0              0    (0/0/0)
     
    Enter partition id tag [unassigned]: root
    Enter partition permission flags [wm]: wm
    Enter new starting cyl [0]: 4
    Enter partition size [0b, 0c, 0.00mb]: 400mb
    partition> label
    Ready to label disk, continue? y
    partition>
  5. quit コマンドを 2 回入力して、partition メニューと format(1M) プログラムを終了する。


    partition> quit
     
    FORMAT MENU:
            disk       - select a disk
            type       - select (define) a disk type
            partition  - select (define) a partition table
            current    - describe the current disk
            format     - format and analyze the disk
            repair     - repair a defective sector
            label      - write label to the disk
            analyze    - surface analysis
            defect     - defect list management
            backup     - search for backup labels
            verify     - read and display labels
            save       - save new disk/partition definitions
            inquiry    - show vendor, product and revision
            volname    - set 8-character volume name
            quit
    format> quit
    

    Solaris のルート (/) パーティションに関する次の重要な情報に注意してください。

    • I.D. タグは root でなければならない

    • サイズは元のルートパーティションのサイズ以上でなければならない

    • シリンダ 0 〜 2 を使用してはいけない

ブート情報のインストール

代替ブートディスクにブート情報をインストールするには、installboot コマンドを使用します。


# installboot /usr/lib/fs/ufs/pboot ¥
/usr/lib/fs/ufs/bootblk ¥
/dev/rdsk/c0t1d0s0

例 - x86: ルート (/) からミラーを作成する方法

この例では、上の作業を使用して Solaris パーティションが作成され、ブート情報がインストールされているものと想定します。


# metainit -f d10 1 1 c0t0d0s0
d10:Concat/Stripe is setup
# metainit d20 1 1 c1t0d0s0
d20: Concat/Stripe is setup
# metainit d0 -m d10
d10: Mirror is setup
# metaroot d0
# lockfs -fa
# reboot
...
# metattach d0 d20
d0: Submirror d20 is attached
# ls -l /dev/rdsk/c1t0d0s0
lrwxrwxrwx 1  root root  55 Mar 5 12:54  /dev/rdsk/c1t0d0s0 -> ../.
devices/eisa/eha@1000,0/cmdk@1,0:a

-f オプションによって、マウントされたファイルシステムルート (/) を /dev/dsk/c0t0d0s0 にもつ、最初の連結 d10 が作成されます。2 番目の連結 d20 は、/dev/dsk/c1t0d0s0 から作成されます (このスライスのサイズは、d10 のサイズ以上でなければなりません)。-m オプションを付けた metainit コマンドは、ルート (/) を含む連結を使用して 1 面ミラー d0 を作成します。次に、メタデバイス上のルートファイルシステム (/) でシステムをブートできるよう、metaroot コマンドは /etc/vfstab/etc/system のファイルを編集します。リブートの後、サブミラー d20 がミラーに接続され、ミラーの再同期が行われます (システムは、連結とミラーが設定されていること、およびサブミラー d20 が接続されていることを確認します)。システムを代替ルートデバイスからブートする必要がある場合、ルート raw デバイス上で ls -l コマンドを実行して、代替ルートデバイスへのパスを調べます。