Solaris のシステム管理 (基本編)

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

  1. スーパーユーザーになるか、同等の役割を引き受けます。

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


    # format
    

    利用可能なディスクのリストが表示されます。詳細については、format(1M) のマニュアルページを参照してください。

  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) (省略可能)

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

    ディスクスライスの作成例については、SPARC: 例 — システムディスクのディスクスライスとラベルを作成するを参照してください。

  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. ディスクラベルを検査します。


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


    format> q
    

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

次の例では、format ユーティリティを使用して 18G バイトのディスクを 3 つのスライスに分割します。各スライスをルート (/) ファイルシステム、スワップ領域、/usr ファイルシステムに割り当てます。


# format
AVAILABLE DISK SELECTIONS:
       0. /dev/rdsk/c1t0d0s0 <SUN18G cyl 7506 alt 2 hd 19 sec 248>
          /sbus@2,0/QLGC,isp@2,10000/sd@0,0
       1. /dev/rdsk/c1t1d0s0 <SUN18G cyl 7506 alt 2 hd 19 sec 248>
          /sbus@2,0/QLGC,isp@2,10000/sd@1,0
       2. /dev/rdsk/c1t8d0s0 <SUN18G cyl 7506 alt 2 hd 19 sec 248>
          /sbus@2,0/QLGC,isp@2,10000/sd@8,0
       3. /dev/rdsk/c1t9d0s0 <SUN18G cyl 7506 alt 2 hd 19 sec 248>
          /sbus@2,0/QLGC,isp@2,10000/sd@9,0
Specify disk (enter its number): 0
selecting c1t0d0
[disk formatted]
format> partition
partition> print
partition> modify
Select partitioning base:
	0. Current partition table (original)
	1. All Free Hog
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 - 7505       16.86GB    (7506/0/0) 35368272
  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

Choose base (enter number) [0]? 1
table based on above table[yes]? yes
Free Hog partition[6]? 6
Enter size of partition '0' [0b, 0c, 0.00mb, 0.00gb]: 4gb
Enter size of partition '1' [0b, 0c, 0.00mb, 0.00gb]: 4gb
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 '7' [0b, 0c, 0.00mb, 0.00gb]: 
Part      Tag    Flag     Cylinders        Size            Blocks
  0       root    wm       0 - 1780        4.00GB    (1781/0/0)  8392072
  1       swap    wu    1781 - 3561        4.00GB    (1781/0/0)  8392072
  2     backup    wu       0 - 7505       16.86GB    (7506/0/0) 35368272
  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    3562 - 7505        8.86GB    (3944/0/0) 18584128
  7 unassigned    wm       0               0         (0/0/0)           0
 
Okay to make this the current partition table[yes]? yes
Enter table name (remember quotes): "disk0"
Ready to label disk, continue? yes
partition> quit
format> verify
format> quit

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

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


# format /dev/rdsk/c1*
AVAILABLE DISK SELECTIONS:
       0. /dev/rdsk/c1t0d0s0 <SUN18G cyl 7506 alt 2 hd 19 sec 248>
          /sbus@2,0/QLGC,isp@2,10000/sd@0,0
       1. /dev/rdsk/c1t1d0s0 <SUN18G cyl 7506 alt 2 hd 19 sec 248>
          /sbus@2,0/QLGC,isp@2,10000/sd@1,0
       2. /dev/rdsk/c1t8d0s0 <SUN18G cyl 7506 alt 2 hd 19 sec 248>
          /sbus@2,0/QLGC,isp@2,10000/sd@8,0
       3. /dev/rdsk/c1t9d0s0 <SUN18G cyl 7506 alt 2 hd 19 sec 248>
          /sbus@2,0/QLGC,isp@2,10000/sd@9,0
Specify disk (enter its number): 1
selecting c1t1d0
[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)           0
  1       swap    wu       0               0         (0/0/0)           0
  2     backup    wu       0 - 7505       16.86GB    (7506/0/0) 35368272
  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

Do you wish to continue creating a new partition
table based on above table[yes]? y
Free Hog partition[6]? 7
Enter size of partition '0' [0b, 0c, 0.00mb, 0.00gb]: 
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]:
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 - 7505       16.86GB    (7506/0/0) 35368272
  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 - 7505       16.86GB    (7506/0/0) 35368272
Okay to make this the current partition table[yes]? yes
Enter table name (remember quotes): "home"
Ready to label disk, continue? y
partition> q
format> verify
format> q
# 

次の例では、format ユーティリティを使って EFI ラベル付きの 1.15T バイトのディスクを 3 つのスライスに分割します。


# format
.
.
.
partition> modify
Select partitioning base:
        0. Current partition table (original)
        1. All Free Hog
Choose base (enter number) [0]? 1
Part      Tag    Flag     First Sector          Size          Last Sector
  0       root    wm                 0            0                0    
  1        usr    wm                 0            0                0    
  2 unassigned    wm                 0            0                0    
  3 unassigned    wm                 0            0                0    
  4 unassigned    wm                 0            0                0    
  5 unassigned    wm                 0            0                0    
  6        usr    wm                 0            0                0    
  8   reserved    wm        2576924638         8.00MB           2576941021
Do you wish to continue creating a new partition
table based on above table[yes]? y
Free Hog partition[6]? 4
Enter size of partition 0 [0b, 34e, 0mb, 0gb, 0tb]: 
Enter size of partition 1 [0b, 34e, 0mb, 0gb, 0tb]: 
Enter size of partition 2 [0b, 34e, 0mb, 0gb, 0tb]: 400gb
Enter size of partition 3 [0b, 838860834e, 0mb, 0gb, 0tb]: 400gb
Enter size of partition 5 [0b, 1677721634e, 0mb, 0gb, 0tb]: 
Enter size of partition 6 [0b, 1677721634e, 0mb, 0gb, 0tb]: 
Part      Tag    Flag     First Sector          Size          Last Sector
  0 unassigned    wm                 0            0                0    
  1 unassigned    wm                 0            0                0    
  2        usr    wm                34       400.00GB           838860833
  3        usr    wm         838860834       400.00GB           1677721633
  4        usr    wm        1677721634       428.77GB           2576924637
  5 unassigned    wm                 0            0                0    
  6 unassigned    wm                 0            0                0    
  8   reserved    wm        2576924638         8.00MB           2576941021
Ready to label disk, continue? yes

partition> q

次に進む手順

ディスクスライスとディスクラベルを作成し終ったら、ディスク上にファイルシステムを作成できます。SPARC: ファイルシステムを作成する方法を参照してください。