Solaris のシステム管理 (第 1 巻)

欠陥セクターの修復

システム上のディスクに欠陥セクターが存在する場合は、次の手順にしたがって修復できます。欠陥セクターを発見するのは次のような場合です。

上記のコンソールメッセージは、ブロック 179 が不良であり、format ユーティリティの repair コマンドを使用して配置し直すか、または修復機能を使用可能にして表面解析を実行する必要があることを示しています。

表面解析を使用して欠陥セクターを調べる方法

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

  2. 欠陥セクターの存在するスライス内のファイルシステムをマウント解除します。

    詳細は、mount(1M) のマニュアルページを参照してください。


    # umount /dev/dsk/device-name
    
  3. format と入力して format ユーティリティを起動します。


    # format
    
  4. 調べるディスクを選択します。


    Specify disk (enter its number):1
    selecting c0t2d0:
    [disk formatted]
    Warning: Current Disk has mounted partitions.
  5. format> プロンプトで analyze と入力して、analyze メニューに入ります。


    format> analyze
    
  6. analyze> プロンプトで setup と入力して、検索手順に使用する解析パラメータを設定します。次のパラメータを使用してください。


    analyze> setup
    Analyze entire disk [yes]? n
    Enter starting block number [0, 0/0/0]: 12330
    Enter ending block number [2052287, 2035/13/71]: 12360
    Loop continuously [no]? y
    Repair defective blocks [yes]? n
    Stop after first error [no]? n
    Use random bit patterns [no]? n
    Enter number of blocks per transfer [126, 0/1/54]: 1
    Verify media after formatting [yes]? y
    Enable extended messages [no]? n
    Restore defect list [yes]? y
    Create defect label [yes]? y
    
  7. read コマンドを使用して欠陥を見つけます。


    analyze> read
    Ready to analyze (won't harm SunOS). This takes a long time,
    but is interruptible with Control-C. Continue? y
            pass 0
       2035/12/1825/7/24
            pass 1
    Block 12354  (18/4/18), Corrected media error (hard data ecc)
       25/7/24
    ^C
    Total of 1 defective blocks repaired.

欠陥セクターを修復する方法

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

  2. format ユーティリティに入り、欠陥セクターの存在するディスクを選択します。


    # format
    Searching for disks...done
    AVAILABLE DISK SELECTIONS:
      0. c0t2d0 <SUN1.05 cyl 2036 alt 2 hd 14 sec 72>
         /iommu@f,e0000000/sbus@f,e0001000/espdma@f,400000/esp@f,800000/sd@2,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> 
  3. format> プロンプトで repair コマンドを入力します。


    format> repair
    
  4. 欠陥ブロック番号を入力します。


    Enter absolute block number of defect: 12354
       Ready to repair defect, continue? y
       Repairing block 12354 (18/4/18)...ok.
    format>

    format を使って欠陥セクターを調べる方法については、「表面解析を使用して欠陥セクターを調べる方法」を参照してください。