LVM にディスク追加してみた

# vgextend VolGroup00 /dev/sdb1
  No physical volume label read from /dev/sdb1
  Physical volume "/dev/sdb1" successfully created
  Volume group "VolGroup00" successfully extended

# vgdisplay
  --- Volume group ---
  VG Name               VolGroup00
  System ID
  Format                lvm2
  Metadata Areas        2
  Metadata Sequence No  4
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                2
  Open LV               2
  Max PV                0
  Cur PV                2
  Act PV                2
  VG Size               511.84 GB
  PE Size               32.00 MB
  Total PE              16379
  Alloc PE / Size       8188 / 255.88 GB
  Free  PE / Size       8191 / 255.97 GB <- 現在フリーで利用可能なスペース
  VG UUID               yPnBn7-WKAm-w80G-C2I0-ITxj-1rYS-f1XPwc

# /usr/sbin/lvextend -L +255G /dev/mapper/VolGroup00-LogVol00
  Extending logical volume LogVol00 to 493.25 GB
  Logical volume LogVol00 successfully resized

# cd /boot <- いらないかも。ルートパーティションをリサイズするので念のため

# /sbin/resize2fs -p /dev/mapper/VolGroup00-LogVol00
resize2fs 1.39 (29-May-2006)
Filesystem at /dev/mapper/VolGroup00-LogVol00 is mounted on /; on-line resizing required
Performing an on-line resize of /dev/mapper/VolGroup00-LogVol00 to 129302528 (4k) blocks.
The filesystem on /dev/mapper/VolGroup00-LogVol00 is now 129302528 blocks long.

# df -h
Filesystem          サイズ  使用  残り 使用% マウント位置
/dev/mapper/VolGroup00-LogVol00
                      478G  193G  261G  43% /   ← 増えた!
/dev/sda1              99M   20M   75M  21% /boot
tmpfs                 7.9G     0  7.9G   0% /dev/shm