Fedora 19: How to resize/extend (LVM) partition?

时间:2023-08-19 18:28:14
  1. Enlarge the disk using fdisk
    1. fdisk -l (to see the partition layout, typically we're dealing with /dev/sda2)
    2. fdisk /dev/sda
    3. d (delete a partition)
    4. 2 (if the part we want to grow is /dev/sda2; note this does not delete any data on disk)
    5. n (create a new partition)
    6. p (primary partition)
    7. 2
    8. <return> (default starting block, typically 14 since swap is first)
    9. <return> (default ending block, full size of the partition)
    10. make sure partition type is 8e for Linux LVM
      1. t
      2. 8e
    11. w (write changes to disk)
  2. reboot to get new partition table
  3. pvresize /dev/sda2
  4. pvscan should show new larger size
  5. lvextend -l +100%FREE /dev/vg_centos6/lv_root (-L +10G to add 10GB is another option)
  6. resize2fs /dev/vg_centos6/lv_root
  7. df should show new free space

From:http://superuser.com/questions/335038/how-do-you-add-more-space-to-a-fedora-lvm-partition