Changes between Version 23 and Version 24 of extend-disk-on-kvm-guest


Ignore:
Timestamp:
May 19, 2013, 2:36:14 PM (6 years ago)
Author:
Jamie McClelland
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • extend-disk-on-kvm-guest

    v23 v24  
     1[[PageOutline]]
    12= How do I extend the disk space for a KVM guest? =
    23
     
    5960}}}
    6061
     62== Step 2: Reboot and extend the second partition ==
     63
    6164Next, you will need to reboot the guest before the change in disk space is recognized by the guest ([http://comments.gmane.org/gmane.comp.emulators.kvm.devel/64203 this is apparently a requirement until someone implements online disk resizing]).  You will need to execute: `shutdown -h now`, so that the underlying block devices get reinitialized by a new process.
    6265
     
    7982Delete the last partition, and re-create it with a higher end sector (yes, you can do this without destroying the data on the disk). Replace STARTSECTOR with the start sector of the output from the command above (including the s after the number). Specifying -1 as the end sector means go as far to the end as possible. If you get a message saying that the sector you requested is not possible, accept a different one, you can safely say yes.
    8083
     84Also - you will likely get a scary warning about the partitions being in use. Press "I" to ignore the warning.
     85
    8186{{{
    8287parted /dev/vda
    8388}}}
    8489
    85 The following commands are executed in interactive mode:
     90The following commands are executed in interactive mode (replace STARTSECTOR with the start sector you noted above):
    8691
    8792{{{
     
    106111This should show a different end point for the partition for additional verification.  Then reboot.
    107112
     113== Step 3: Reboot again ==
     114
    108115Once your partition table is reflecting the new size, run the following command:
    109116
     
    114121And now your volume group should show additional free space.
    115122
    116 == Step 2: Assign free space and resize filesystems ==
     123== Step 4: Assign free space and resize filesystems ==
    117124
    118125The next step would be to assign the free space from the VG to the LV. That's what lvresize does. For example (size in GB is the new size you want):