Review guestdisk SOP
Signed-off-by: Michal Konečný <mkonecny@redhat.com>
This commit is contained in:
parent
c5856741b1
commit
9508bc76ca
2 changed files with 19 additions and 15 deletions
|
@ -43,7 +43,7 @@
|
||||||
** xref:github2fedmsg.adoc[github2fedmsg - SOP]
|
** xref:github2fedmsg.adoc[github2fedmsg - SOP]
|
||||||
** xref:github.adoc[Using github for Infra Projects - SOP]
|
** xref:github.adoc[Using github for Infra Projects - SOP]
|
||||||
** xref:greenwave.adoc[Greenwave - SOP]
|
** xref:greenwave.adoc[Greenwave - SOP]
|
||||||
** xref:guestdisk.adoc[guestdisk - SOP in review ]
|
** xref:guestdisk.adoc[Guest Disk Resize - SOP]
|
||||||
** xref:guestedit.adoc[guestedit - SOP in review ]
|
** xref:guestedit.adoc[guestedit - SOP in review ]
|
||||||
** xref:haproxy.adoc[haproxy - SOP in review ]
|
** xref:haproxy.adoc[haproxy - SOP in review ]
|
||||||
** xref:hotfix.adoc[hotfix - SOP in review ]
|
** xref:hotfix.adoc[hotfix - SOP in review ]
|
||||||
|
|
|
@ -4,14 +4,9 @@ Resize disks in our kvm guests
|
||||||
|
|
||||||
== Contents
|
== Contents
|
||||||
|
|
||||||
[arabic]
|
* <<_contact_information>>
|
||||||
. Contact Information
|
* <<_how_to_do_it>>
|
||||||
. How to do it
|
** <<_kvmlibvirt_guests>>
|
||||||
|
|
||||||
____
|
|
||||||
[arabic]
|
|
||||||
. KVM/libvirt Guests
|
|
||||||
____
|
|
||||||
|
|
||||||
== Contact Information
|
== Contact Information
|
||||||
|
|
||||||
|
@ -31,26 +26,27 @@ Purpose:::
|
||||||
=== KVM/libvirt Guests
|
=== KVM/libvirt Guests
|
||||||
|
|
||||||
[arabic]
|
[arabic]
|
||||||
. {blank}
|
. SSH to the kvm server and resize the guest's logical volume. If you
|
||||||
+
|
|
||||||
SSH to the kvm server and resize the guest's logical volume. If you::
|
|
||||||
want to be extra careful, make a snapshot of the LV first:
|
want to be extra careful, make a snapshot of the LV first:
|
||||||
+
|
+
|
||||||
....
|
....
|
||||||
lvcreate -n [guest name]-snap -L 10G -s /dev/VolGroup00/[guest name]
|
lvcreate -n [guest name]-snap -L 10G -s /dev/VolGroup00/[guest name]
|
||||||
....
|
....
|
||||||
+
|
+
|
||||||
Optional, but always good to be careful
|
Optional, but always good to be careful
|
||||||
|
|
||||||
. Shutdown the guest:
|
. Shutdown the guest:
|
||||||
+
|
+
|
||||||
....
|
....
|
||||||
sudo virsh shutdown [guest name]
|
sudo virsh shutdown [guest name]
|
||||||
....
|
....
|
||||||
|
|
||||||
. Disable the guests lv:
|
. Disable the guests lv:
|
||||||
+
|
+
|
||||||
....
|
....
|
||||||
lvchange -an /dev/VolGroup00/[guest name]
|
lvchange -an /dev/VolGroup00/[guest name]
|
||||||
....
|
....
|
||||||
|
|
||||||
. Resize the lv:
|
. Resize the lv:
|
||||||
+
|
+
|
||||||
....
|
....
|
||||||
|
@ -66,6 +62,7 @@ lvresize -L +XG /dev/VolGroup00/[guest name]
|
||||||
....
|
....
|
||||||
lvchange -ay /dev/VolGroup00/[guest name]
|
lvchange -ay /dev/VolGroup00/[guest name]
|
||||||
....
|
....
|
||||||
|
|
||||||
. Bring the guest back up:
|
. Bring the guest back up:
|
||||||
+
|
+
|
||||||
....
|
....
|
||||||
|
@ -77,11 +74,13 @@ sudo virsh start [guest name]
|
||||||
sudo virsh console [guest name]
|
sudo virsh console [guest name]
|
||||||
You may wish to boot single user mode to avoid services coming up and going down again
|
You may wish to boot single user mode to avoid services coming up and going down again
|
||||||
....
|
....
|
||||||
|
|
||||||
. On the guest, run:
|
. On the guest, run:
|
||||||
+
|
+
|
||||||
....
|
....
|
||||||
fdisk /dev/vda
|
fdisk /dev/vda
|
||||||
....
|
....
|
||||||
|
|
||||||
. Delete the the LVM partition on the guest you want to add space to and
|
. Delete the the LVM partition on the guest you want to add space to and
|
||||||
recreate it with the maximum size. Make sure to set its type to LV (8e):
|
recreate it with the maximum size. Make sure to set its type to LV (8e):
|
||||||
+
|
+
|
||||||
|
@ -92,11 +91,13 @@ n to create new partition (default values should be ok)
|
||||||
t to change partition type (set to 8e)
|
t to change partition type (set to 8e)
|
||||||
w to write changes
|
w to write changes
|
||||||
....
|
....
|
||||||
|
|
||||||
. Run partprobe:
|
. Run partprobe:
|
||||||
+
|
+
|
||||||
....
|
....
|
||||||
partprobe
|
partprobe
|
||||||
....
|
....
|
||||||
|
|
||||||
. Check the size of the partition:
|
. Check the size of the partition:
|
||||||
+
|
+
|
||||||
....
|
....
|
||||||
|
@ -105,11 +106,13 @@ fdisk -l /dev/vdaN
|
||||||
+
|
+
|
||||||
If this still reflects the old size, then reboot the guest and verify
|
If this still reflects the old size, then reboot the guest and verify
|
||||||
that its size changed correctly when it comes up again.
|
that its size changed correctly when it comes up again.
|
||||||
|
|
||||||
. Login to the guest again, and run:
|
. Login to the guest again, and run:
|
||||||
+
|
+
|
||||||
....
|
....
|
||||||
pvresize /dev/vdaN
|
pvresize /dev/vdaN
|
||||||
....
|
....
|
||||||
|
|
||||||
. A vgs should now show the new size. Use lvresize to resize the root
|
. A vgs should now show the new size. Use lvresize to resize the root
|
||||||
lv:
|
lv:
|
||||||
+
|
+
|
||||||
|
@ -118,6 +121,7 @@ lvresize -L [new root partition size]G /dev/GuestVolGroup00/root
|
||||||
|
|
||||||
(pvs will tell you how much space is available)
|
(pvs will tell you how much space is available)
|
||||||
....
|
....
|
||||||
|
|
||||||
. Finally, resize the root partition:
|
. Finally, resize the root partition:
|
||||||
+
|
+
|
||||||
....
|
....
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue