Changes between Version 21 and Version 22 of extend-disk-on-kvm-guest
- Timestamp:
- Apr 4, 2012, 4:05:49 PM (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
extend-disk-on-kvm-guest
v21 v22 114 114 == Step 2: Assign free space and resize filesystems == 115 115 116 The next step would be to assign the free space from the VG to the LV. That's what lv extenddoes. For example (size in GB is the new size you want):116 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): 117 117 118 118 {{{ 119 lv extend--size 50GB /dev/mapper/LVNAME119 lvresize --size 50GB /dev/mapper/LVNAME 120 120 }}} 121 121 122 will add 100% of the VG's free space to the specified LV.122 will change the specified LV to have 50GB. 123 123 124 Finally you would normally need to resize the filesystem as well. This is done for ext2/ext3/ext4 like that: 124 Finally you would normally need to resize the filesystem as well so that it can make use of the extra space in the logical volume. 125 126 If your filesystem is ext3 or ext4, and the filesystem is currently mounted (online), you should be able to do an online resize with just: 127 128 {{{ 129 resize2fs /dev/mapper/LVNAME 130 }}} 131 132 If the filesystem isn't currently mounted, it's good form to check its integrity before resizing, like so: 125 133 126 134 {{{