From Fedora Project Wiki

(Add instructions for making a snapshot first.)
m (Change from .txt to .rst)
 
(5 intermediate revisions by 3 users not shown)
Line 3: Line 3:
{{shortcut|ISOP:DRESIZE}}
{{shortcut|ISOP:DRESIZE}}


Resize disks in our Xen guests


== Contact Information ==
This SOP has moved to the fedora Infrastructure SOP git repo. Please see the current document at: http://infrastructure.fedoraproject.org/infra/docs/guestdisk.rst
Owner: Fedora Infrastructure Team


Contact: #fedora-admin, sysadmin-main
For changes, questions or comments, please contact anyone in the Fedora Infrastructure team.


Location: PHX, Tummy, ibiblio, Telia, OSUOSL


Servers: All xen servers
[[Category:Infrastructure SOPs]]
 
Purpose: Resize guest disks
 
== How to do it ==
 
# SSH to the xen server and resize the guest's logical volume.  If you want to be extra careful, make a snapshot of the LV first: <pre>lvcreate -n [guest name]-snap -L 10G -s /dev/VolGroup00/[guest name] # Optional, but always good to be careful</pre><pre>lvresize -L [new total size]G /dev/VolGroup00/[guest name]</pre>
# Shutdown the guest and then start it up again: <pre>xm shutdown -w [guest name]</pre><pre>xm create [guest name]</pre>
# Login into the guest: <pre>xm console [guest name]</pre>
# On the guest, run <pre>fdisk /dev/xvda</pre>
# Delete the third partition (the LVM partition on the guest) and recreate it with the maximum size.  Make sure to set its type to LVM.
# Run partprobe: <pre>partprobe</pre>
# Check the size of the third partition: <pre>fdisk -l /dev/xvda3</pre>  If this still reflects the old size, then reboot the guest and verify that its size changed correctly when it comes up again.
# Login to the guest again, and run <pre>pvresize /dev/xvda3</pre>
# A vgs should now show the new size.  Use lvresize to resize the root lv: <pre>lvresize -L [new root partition size]G /dev/GuestVolGroup00/root</pre>
# Finally, resize the root partition: <pre>resize2fs /dev/GuestVolGroup00/root</pre>, verify that everything worked out, and delete the snapshot you made if you made one.

Latest revision as of 19:47, 17 July 2015


Shortcut:
ISOP:DRESIZE


This SOP has moved to the fedora Infrastructure SOP git repo. Please see the current document at: http://infrastructure.fedoraproject.org/infra/docs/guestdisk.rst

For changes, questions or comments, please contact anyone in the Fedora Infrastructure team.