Sun Microsystems, Inc.
spacerspacer
spacer www.sun.com docs.sun.com |
spacer
black dot
 
 
32.  ディスクの管理 (手順) ディスクのフォーマット ディスクがフォーマット済みかを調べる方法  戻る   目次   次へ 
   
 

例 -- ディスクがフォーマット済みかを調べる

次の例は、ディスク c0t3d0 がフォーマット済みであることを示しています。

# format
AVAILABLE DISK SELECTIONS:
  0. c0t1d0 <SUN1.05 cyl 2036 alt 2 hd 14 sec 72> 
     /iommu@f,e0000000/sbus@f,e0001000/espdma@f,400000/esp@f,800000/sd@1,0
  1. c0t3d0 <SUN1.05 cyl 2036 alt 2 hd 14 sec 72>
     /iommu@f,e0000000/sbus@f,e0001000/espdma@f,400000/esp@f,800000/sd@3,0
Specify disk (enter its number): 0
selecting c0t1d0
[disk formatted]

ディスクをフォーマットする方法

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

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

    # format
  3. 画面に表示されるリストから、フォーマットするディスクの番号を入力します。

    Specify disk (enter its number): 0

    注意 - システムディスクは選択しないでください。システムディスクをフォーマットすると、オペレーティングシステムや、システムディスク上のデータがすべて削除されます。


  4. ディスクのフォーマットを開始するには、format> プロンプトで format と入力します。y と入力してコマンドを確認します。

    format> format
    Ready to format. Formatting cannot be interrupted
    and takes 26 minutes (estimated). Continue? y
  5. フォーマットが正常に行われたことを、次のメッセージによって確認します。

    Beginning format. The current time Tue ABC xx xx:xx:xx xxxx
    
    Formatting...
    done
    
    Verifying media...
            pass 0 - pattern = 0xc6dec6de
       2035/12/18  
    
            pass 1 - pattern = 0x6db6db6d
       2035/12/18  
    
    Total of 0 defective blocks repaired.

例 -- ディスクをフォーマットする

次の例は、ディスク c0t3d0 のフォーマット方法を示します。

# format
Searching for disks...done
AVAILABLE DISK SELECTIONS:
  0. c0t1d0 <SUN1.05 cyl 2036 alt 2 hd 14 sec 72>
     /iommu@f,e0000000/sbus@f,e0001000/espdma@f,400000/esp@f,800000/sd@1,0
  1. c0t3d0 <SUN1.05 cyl 2036 alt 2 hd 14 sec 72>
     /iommu@f,e0000000/sbus@f,e0001000/espdma@f,400000/esp@f,800000/sd@3,0
Specify disk (enter its number):1
Selecting c0t3d0
[disk formatted]
format> format
Ready to format. Formatting cannot be interrupted
and takes 23 minutes (estimated). Continue? yes
Beginning format. The current time is Thu Dec  6 09:54:40 2001
Formatting ...
done
Verifying media...
        pass 0 - pattern = 0xc6dec6de
   2035/12/18  

        pass 1 - pattern = 0x6db6db6d
   2035/12/18  

Total of 0 defective blocks repaired.
format>

ディスクスライスの表示

format ユーティリティを使用すると、ディスクに適切なディスクスライスがあるかどうかをチェックできます。使用したいスライスがディスクに入っていないことが判明した場合は、format ユーティリティを使用してスライスを作成し直し、ディスクにラベルを付けます。ディスクスライスの作成方法については、SPARC: ディスクスライスとディスクラベルを作成する方法または IA: ディスクスライスとディスクラベルを作成する方法を参照してください。


注 - format ユーティリティでは、スライスではなくパーティションという用語を使用します。


ディスクスライス情報を表示する方法

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

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

    # format
  3. 画面に表示されたリストから、スライス情報を表示するディスクの番号を入力します。

    Specify disk (enter its number):1
  4. パーティションメニューを選択します。

    format> partition 
  5. 現在のディスクドライブのスライス情報を表示します。

    partition> print
  6. format ユーティリティを終了します。

    partition> q
    format> q
    #
  7. 特定のスライスのタグとサイズについてスライス情報が表示されることを確認します。

    画面の出力に、スライスサイズが割り当てられていないことが示された場合は、ディスクにスライスがないものと思われます。

例 -- ディスクスライス情報を表示する

次の例では、ディスク /dev/rdsk/c0t3d0 のスライス情報を表示します。

# format
Searching for disks...done
Specify disk (enter its number):1
Selecting c0t3d0
format> partition
partition> print
Current partition table (original):
Total disk cylinders available: 2036 + 2 (reserved cylinders)

Part      Tag    Flag     Cylinders        Size            Blocks
  0       root    wm       0 -  300      148.15MB    (301/0/0)   303408
  1       swap    wu     301 -  524      110.25MB    (224/0/0)   225792
  2     backup    wm       0 - 2035     1002.09MB    (2036/0/0) 2052288
  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     525 - 2035      743.70MB    (1511/0/0) 1523088
  7 unassigned    wm       0               0         (0/0/0)          0
partition> q
format> q
#

これらの例に表示されるスライス情報についての説明は、第 31 章「ディスクの管理 (概要)」を参照してください。

次の例では、ディスク /dev/dsk/c0t0d0 のスライス情報を表示します。

# format
Searching for disks...done
Specify disk (enter its number): 0
selecting c0t0d0
[disk formatted]
format> partition
partition> print
Current partition table (original):
Total disk cylinders available: 817 + 2 (reserved cylinders)

Part      Tag    Flag     Cylinders       Size            Blocks
  0 unassigned    wm       3 - 816        6.26GB    (814/0/0) 13128192
  1 unassigned    wm       0              0         (0/0/0)          0
  2     backup    wm       0 - 816        6.28GB    (817/0/0) 13176576
  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 unassigned    wm       0              0         (0/0/0)          0
  7 unassigned    wm       0              0         (0/0/0)          0
  8       boot    wu       0 -   0        7.88MB    (1/0/0)      16128
  9 alternates    wu       1 -   2       15.75MB    (2/0/0)      32256
partition> q
format> q
 
 
 
  戻る   目次   次へ