#fdisk -l
Intermission to add new disk and power on if necessary
# fdisk -l
To see the new disk size on /dev/sda which we just extended, or to see new disks we just presented (/dev/sdb, /dev/sdc, etc.) # fdisk /dev/sda To create new partitions for the OS to use. These new partitions will be added to the VG so we can extend the LV that the “/” partition is on. My newly created partition in the example is /dev/sda3. For new disks you would use /dev/sdb, or /dev/sdc. If you are using an extended /dev/sda like in my case, you will need to reboot for the changes to be seen # fdisk -l To see the new partitions # pvdisplay View current physical volumes a.k.a. pv # pvcreate /dev/sda3 Allow Linux OS to use the new partition in LVM # pvdisplay See the new pv /dev/sda3 # vgdisplay View the current volume groups # vgextend vg_cents6364bit /dev/sda3 Add the new PV /dev/sda3 to the existing VG vg_cents6364bit # vgdisplay Now you can see the new size of the VG vg_cents6364bit. Note the new amount of free PE’s (physical extents) # lvdisplay View the current LV. In my example, /dev/vg_cents6364bit/lv_root which is the root partition # lvextend -l +2559 /dev/vg_cents6364bit/lv_root Now make the LV larger. Growing the LV /dev/vg_cents6364bit/lv_root by 2559 PEs # lvdisplay Now you can see the larger size of the LV # resize2fs /dev/vg_cents6364bit/lv_root Online resize of the actual filesystem now on that LV # df -h You can see the new size now using the “df” command DONE!!
|
יום שני, 13 במאי 2013
Extend an LVM root filesystem
הירשם ל-
תגובות לפרסום (Atom)
אין תגובות:
הוסף רשומת תגובה