Linux LVMディスクパーティションのサイズを増やす

Linux LVMディスクパーティションのサイズを増やす

仮想空間からディスクのサイズを30Gbに増やそうとしています。fdiskの出力

Disk /dev/sda: 32.2 GB, 32212254720 bytes
255 heads, 63 sectors/track, 3916 cylinders, total 62914560 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0001c7c7

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048      499711      248832   83  Linux
/dev/sda2          501758    33552383    16525313    5  Extended
/dev/sda5          501760    33552383    16525312   8e  Linux LVM

次の手順を実行した後:

 > fdisk /dev/sda
    >     n
    >     p 
    >     3 
    >     for selecting the first and last sector values,
    >     press the enter button twice for using default size   ( may be prob
    >     is here i missed something) 
    >     t 
    >     3 
    >     8e 
    >     p

以下のように表示されます。

> Disk /dev/sda: 32.2 GB, 32212254720 bytes 255 heads, 63 sectors/track,
> 3916 cylinders, total 62914560 sectors Units = sectors of 1 * 512 =
> 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O
> size (minimum/optimal): 512 bytes / 512 bytes Disk identifier:
> 0x0001c7c7
> 
>    Device Boot      Start         End      Blocks   Id  System
> /dev/sda1   *        2048      499711      248832   83  Linux
> /dev/sda2          501758    33552383    16525313    5  Extended
> /dev/sda3          499712      501757        1023   8e  Linux LVM
> /dev/sda5          501760    33552383    16525312   8e  Linux LVM

なぜフルサイズではなく 1023 が表示されるのでしょうか。また、最初と最後のセクターに指定されたブロック値を入力しようとしましたが、範囲外の値が表示されます。何を見逃していたのでしょうか。:( よろしくお願いします。

答え1

新しいパーティションを作成しましたが、これはあなたが望んでいることではありません。そして、fdiskのデフォルトの開始位置、つまりsda1とsda2の間の小さなスペースを受け入れました。新しいresizeパーティションをまったく作成せず、既存の sda5にしたい場合、 を使用してこれを行うことができますgparted

関連情報