Solaris のシステム管理

SPARC: ディスクスライスとディスクラベルを作成する方法

  1. スーパーユーザーになります。

  2. format ユーティリティを起動します。

    # format
    

    利用可能なディスクのリストが表示されます。

  3. 画面に表示されるリストから、パーティションに分割し直したいディスクの番号を入力します。

    Specify disk (enter its number): disk-number
    

    disk-number

    パーティションに分割し直したいディスクの番号 

  4. partition メニューにアクセスします (スライスを設定できます)。

    format> partition
    
  5. 現在のパーティション (スライス) テーブルを表示します。

    partition> print
    
  6. 変更作業を開始します。

    partition> modify
    
  7. ディスクをすべて free hog に設定します。

    Choose base (enter number) [0]? 1
    

    free hog スライスについて詳しくは、「free hog スライスの使用方法」を参照してください。

  8. 続行するかどうかを尋ねるプロンプトが表示されたら、y と応答して新しいパーティションテーブルを作成します。

    Do you wish to continue creating a new partition table based on 
    above table[yes]?y
    
  9. プロンプトが表示されたら、free hog パーティション (スライス) と各スライスのサイズを指定します。

    システムディスクを追加するときは、次のどちらか、または両方のスライスを設定しなければなりません。

    • ルート (スライス 0)、スワップ (スライス 1)

    • /usr (スライス 6)

    スライスを設定すると、新しいパーティションテーブルが表示されます。

  10. プロンプトが表示されたら y と応答して、表示されたパーティションテーブルを現在のパーティションテーブルにします。

    Okay to make this the current partition table[yes]? y
    

    現在のパーティションテーブルが希望どおりでないために変更したい場合は、no と応答して手順 6 に戻ります。

  11. パーティションテーブルに名前を付けます。

    Enter table name (remember quotes): "partition-name"
    

    partition-name

    新しいパーティションテーブルの名前 

  12. 新しいディスク上のスライスを割り当て終わったら、新しいパーティションテーブルを使用してディスクにラベルを付けます。

    Ready to label disk, continue? yes
    
  13. partition メニューを終了します。

    partition> q
    
  14. verify コマンドを使用して、ディスクラベルを確認します。

    format> verify
    
  15. format メニューを終了します。

    format> q
    

SPARC: 例 - システムディスクのディスクスライスとラベルを作成する

次の例では、format ユーティリティを使用して 200M バイトのディスクを 2 つのスライスに分割します。一方のスライスはルート (/) ファイルシステム用で、他方はスワップ領域用です。

# format
Searching for disks...done
AVAILABLE DISK SELECTIONS:
       0. c0t2d0 <SUN0207 cyl 1254 alt 2 hd 9 sec 36>
          /sbus@1,f8000000/esp@0,800000/sd@2,0
       1. c0t3d0 <SUN0424 cyl 1151 alt 2 hd 9 sec 80>
          /sbus@1,f8000000/esp@0,800000/sd@3,0
Specify disk (enter its number): 0
selecting c0t2d0
[disk formatted]
format> partition
partition> print
partition> modify
Select partitioning base:
	0. Current partition table (original)
	1. All Free Hog
Choose base (enter number) [0]? 1

Part      Tag    Flag     Cylinders        Size       Blocks
  0       root    wm       0               0         (0/0/0)
  1       swap    wu       0               0         (0/0/0)
  2     backup    wu       0 - 1253      198.39MB    (1254/0/0)
  3 unassigned    wm       0               0         (0/0/0)
  4 unassigned    wm       0               0         (0/0/0)
  5 unassigned    wm       0               0         (0/0/0)
  6        usr    wm       0               0         (0/0/0)
  7 unassigned    wm       0               0         (0/0/0)

SPARC: 例 - システムディスクのディスクスライスとラベルを作成する (続き)

Do you wish to continue creating a new partition
table based on above table[yes]? yes
Free Hog partition[6]? 5
Enter size of partition `0' [0b, 0c, 0.00mb]: 100mb
Enter size of partition `1' [0b, 0c, 0.00mb]: 98mb
Enter size of partition `3' [0b, 0c, 0.00mb]:
Enter size of partition `4' [0b, 0c, 0.00mb]:
Enter size of partition `6' [0b, 0c, 0.00mb]:
Enter size of partition `7' [0b, 0c, 0.00mb]:

Part      Tag    Flag     Cylinders        Size       Blocks
  0       root    wm       0 -  632      100.14MB    (633/0/0)
  1       swap    wu     633 - 1233       95.08MB    (601/0/0)
  2     backup    wu       0 - 1253      198.39MB    (1254/0/0)
  3 unassigned    wm       0               0         (0/0/0)
  4 unassigned    wm       0               0         (0/0/0)
  5 unassigned    wm    1234 - 1253        3.16MB    (20/0/0)
  6        usr    wm       0               0         (0/0/0)
  7 unassigned    wm       0               0         (0/0/0)

Okay to make this the current partition table[yes]? yes
Enter table name (remember quotes): "disk2"
Ready to label disk, continue? yes

partition> quit
format> verify
format> quit

SPARC: 例 - 二次ディスクのディスクスライスとラベルを作成する

次の例では、format ユーティリティを使用して 200M バイトのディスクを /export/home1 ファイルシステム用の 1 つのスライスにします。

# format
Searching for disks...done
AVAILABLE DISK SELECTIONS:
       0. c0t2d0 <SUN0207 cyl 1254 alt 2 hd 9 sec 36>
          /sbus@1,f8000000/esp@0,800000/sd@2,0
       1. c0t3d0 <SUN0424 cyl 1151 alt 2 hd 9 sec 80>
          /sbus@1,f8000000/esp@0,800000/sd@3,0
Specify disk (enter its number): 0
selecting c0t2d0
[disk formatted]
format> partition
partition> print
partition> modify
Select partitioning base:
	0. Current partition table (original)
	1. All Free Hog
Choose base (enter number) [0]? 1

Part      Tag    Flag     Cylinders        Size       Blocks
  0       root    wm       0               0         (0/0/0)
  1       swap    wu       0               0         (0/0/0)
  2     backup    wu       0 - 1253      198.39MB    (1254/0/0)
  3 unassigned    wm       0               0         (0/0/0)
  4 unassigned    wm       0               0         (0/0/0)
  5 unassigned    wm       0               0         (0/0/0)
  6        usr    wm       0               0         (0/0/0)
  7 unassigned    wm       0               0         (0/0/0)
Do you wish to continue creating a new partition
table based on above table[yes]? y
Free Hog partition[6]? 5
Enter size of partition `0' [0b, 0c, 0.00mb]:
Enter size of partition `1' [0b, 0c, 0.00mb]:
Enter size of partition `3' [0b, 0c, 0.00mb]:
Enter size of partition `4' [0b, 0c, 0.00mb]: 198mb
Enter size of partition `6' [0b, 0c, 0.00mb]:
Enter size of partition `7' [0b, 0c, 0.00mb]: 

SPARC: 例 - 二次ディスクのディスクスライスとラベルを作成する (続き)

Part      Tag    Flag     Cylinders        Size
      Blocks
  0       root    wm       0               0         (0/0/0)
  1       swap    wu       0               0         (0/0/0)
  2     backup    wu       0 - 1253      198.39MB    (1254/0/0)
  3 unassigned    wm       0               0         (0/0/0)
  4 unassigned    wm       0 - 1251      198.07MB    (1252/0/0)
  5 unassigned    wm    1252 - 1253        0.32MB    (2/0/0)
  6        usr    wm       0               0         (0/0/0)
  7 unassigned    wm       0               0         (0/0/0)

Okay to make this the current partition table[yes]? yes
Enter table name (remember quotes): "home1"
Ready to label disk, continue? y
partition> q
format> verify
format> q
# 

このあとの手順

ディスクスライスを作成してディスクのラベル付けが終わったら、ディスク上にファイルシステムを作成します。「SPARC: ファイルシステムを作成する方法」を参照してください。