Changes between Version 23 and Version 24 of extend-disk-on-kvm-guest
- Timestamp:
- May 19, 2013, 6:36:14 PM (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
extend-disk-on-kvm-guest
v23 v24 1 [[PageOutline]] 1 2 = How do I extend the disk space for a KVM guest? = 2 3 … … 59 60 }}} 60 61 62 == Step 2: Reboot and extend the second partition == 63 61 64 Next, 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. 62 65 … … 79 82 Delete 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. 80 83 84 Also - you will likely get a scary warning about the partitions being in use. Press "I" to ignore the warning. 85 81 86 {{{ 82 87 parted /dev/vda 83 88 }}} 84 89 85 The following commands are executed in interactive mode :90 The following commands are executed in interactive mode (replace STARTSECTOR with the start sector you noted above): 86 91 87 92 {{{ … … 106 111 This should show a different end point for the partition for additional verification. Then reboot. 107 112 113 == Step 3: Reboot again == 114 108 115 Once your partition table is reflecting the new size, run the following command: 109 116 … … 114 121 And now your volume group should show additional free space. 115 122 116 == Step 2: Assign free space and resize filesystems ==123 == Step 4: Assign free space and resize filesystems == 117 124 118 125 The 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):