主コンテンツへ
Oracle® Exalogic Elastic Cloud管理者ガイド
リリースEL X2-2、X3-2、X4-2およびX5-2
B71910-08
目次へ移動
目次

前
次

スワップ領域の拡大

この項では、LVMコマンドを使用してゲストvServer上のスワップ領域を増やす手順を説明します。

注意:

ここで説明する手順は、EECS 2.0.6.x.xゲスト・ベース・テンプレートを使用して作成したvServerに関連しています。EECSバージョン2.0.6.0.0より前のゲスト・ベース・テンプレートを使用して作成するvServerのディスクの修正に、この手順を使用しないでください

  1. 「ボリュームの作成」の説明に従って、ボリュームを作成します。
  2. 「vServerへのボリュームのアタッチ」の説明に従って、スワップ領域を変更するvServerにボリュームをアタッチします。
  3. スワップ領域を変更するvServerにrootユーザーとしてログインし、ボリュームがアタッチされていることを確認します。
  4. このパーティションをLVM型パーティションとしてフォーマットします。
    # fdisk /dev/xvdc
    Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
    Building a new DOS disklabel. Changes will remain in memory only,
    until you decide to write them. After that, of course, the previouscontent won't be recoverable.
    Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
    
    Command (m for help): n
    Command action
    e   extended
    p   primary partition (1-4)
    p
    Partition number (1-4): 1
    First cylinder (1-261, default 1): Press Enter
    Last cylinder or +size or +sizeM or +sizeK (1-261, default 261): Press Enter
    Using default value 261
    
    Command (m for help): t
    Hex code (type L to list codes): 8e
    Changed system type of partition 2 to 8e (Linux LVM)
    
    Command (m for help): w
    The partition table has been altered!
    
    Calling ioctl() to re-read partition table.
    
    WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
    The kernel still uses the old table.
    The new table will be used at the next reboot.
    Syncing disks.
    
  5. このパーティションの物理ボリュームを作成します。
    # pvcreate /dev/xvdc1
    
  6. 新しくフォーマットされたディスクを既存のボリューム・グループに追加します。
    # vgextend myVolGroup /dev/xvdc1
    
  7. 論理ボリュームを作成します。
    # lvcreate -l 511 myVolGroup -n myVolGroup-LogVol01
    
  8. スワップ用の論理ボリュームをフォーマットします。
    # mkswap /dev/myVolGroup/myVolGroup-LogVol01
    
  9. スワップを有効にします:
    # swapon /dev/myVolGroup/myVolGroup-LogVol01
    
  10. topコマンドを使用するか、/proc/swapsファイルを調べて、更新されたスワップ領域を確認します。次に例を示します。
    ]# cat /proc/swaps
    Filename Type Size Used Priority
    /dev/mapper/VolGroup00-LogVol01 partition 524280 0 -1
    /dev/mapper/myVolGroup-myVolGroup--LogVol01 partition 2093048 0 -2